Lines Matching full:disp
83 struct nvkm_gsp *gsp = chan->disp->engine.subdev.device->gsp; in r535_chan_push()
131 args = nvkm_gsp_rm_alloc_get(&chan->disp->rm.object, in r535_curs_init()
159 return nvkm_ramht_insert(chan->disp->ramht, object, chan->chid.user, -9, handle, in r535_dmac_bind()
161 (chan->disp->rm.client.object.handle & 0x3fff)); in r535_dmac_bind()
167 struct nvkm_device *device = chan->disp->engine.subdev.device; in r535_dmac_fini()
184 args = nvkm_gsp_rm_alloc_get(&chan->disp->rm.object, in r535_dmac_init()
240 struct nvkm_device *device = chan->disp->engine.subdev.device; in r535_core_fini()
265 struct nvkm_disp *disp = sor->disp; in r535_sor_bl_set() local
268 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_bl_set()
277 return nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl); in r535_sor_bl_set()
283 struct nvkm_disp *disp = sor->disp; in r535_sor_bl_get() local
287 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_bl_get()
295 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_sor_bl_get()
297 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_sor_bl_get()
302 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_sor_bl_get()
315 struct nvkm_disp *disp = sor->disp; in r535_sor_hda_eld() local
321 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_hda_eld()
334 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_hda_eld()
340 struct nvkm_disp *disp = sor->disp; in r535_sor_hda_hpd() local
346 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_hda_hpd()
354 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_hda_hpd()
366 struct nvkm_disp *disp = sor->disp; in r535_sor_dp_audio_mute() local
369 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_dp_audio_mute()
376 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_dp_audio_mute()
382 struct nvkm_disp *disp = sor->disp; in r535_sor_dp_audio() local
388 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_dp_audio()
395 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_dp_audio()
404 struct nvkm_disp *disp = sor->disp; in r535_sor_dp_vcpi() local
407 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_dp_vcpi()
430 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_dp_vcpi()
437 struct nvkm_disp *disp = sor->disp; in r535_sor_dp_sst() local
440 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_dp_sst()
459 return nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl); in r535_sor_dp_sst()
474 struct nvkm_disp *disp = outp->disp; in r535_sor_hdmi_scdc() local
477 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_hdmi_scdc()
491 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_hdmi_scdc()
497 struct nvkm_disp *disp = outp->disp; in r535_sor_hdmi_ctrl_audio_mute() local
500 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_hdmi_ctrl_audio_mute()
507 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_hdmi_ctrl_audio_mute()
513 struct nvkm_disp *disp = outp->disp; in r535_sor_hdmi_ctrl_audio() local
516 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_hdmi_ctrl_audio()
540 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_hdmi_ctrl_audio()
546 struct nvkm_device *device = sor->disp->engine.subdev.device; in r535_sor_hdmi_audio()
561 struct nvkm_disp *disp = sor->disp; in r535_sor_hdmi_ctrl() local
567 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_sor_hdmi_ctrl()
575 WARN_ON(nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl)); in r535_sor_hdmi_ctrl()
597 r535_sor_new(struct nvkm_disp *disp, int id) in r535_sor_new() argument
599 return nvkm_ior_new_(&r535_sor, disp, SOR, id, true/*XXX: hda cap*/); in r535_sor_new()
603 r535_sor_cnt(struct nvkm_disp *disp, unsigned long *pmask) in r535_sor_cnt() argument
612 struct nvkm_device *device = head->disp->engine.subdev.device; in r535_head_vblank_put()
620 struct nvkm_device *device = head->disp->engine.subdev.device; in r535_head_vblank_get()
639 r535_conn_new(struct nvkm_disp *disp, u32 id) in r535_conn_new() argument
646 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_conn_new()
654 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_conn_new()
656 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_conn_new()
660 list_for_each_entry(conn, &disp->conns, head) { in r535_conn_new()
662 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_conn_new()
669 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_conn_new()
671 ret = nvkm_conn_new(disp, index, &dcbE, &conn); in r535_conn_new()
675 list_add_tail(&conn->head, &disp->conns); in r535_conn_new()
682 outp->disp->rm.assigned_sors &= ~BIT(outp->ior->id); in r535_outp_release()
690 struct nvkm_disp *disp = outp->disp; in r535_outp_acquire() local
695 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_outp_acquire()
702 ctrl->sorExcludeMask = disp->rm.assigned_sors; in r535_outp_acquire()
706 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_outp_acquire()
708 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_acquire()
714 disp->rm.assigned_sors |= BIT(or); in r535_outp_acquire()
719 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_acquire()
724 ior = nvkm_ior_find(disp, SOR, or); in r535_outp_acquire()
733 r535_disp_head_displayid(struct nvkm_disp *disp, int head, u32 *displayid) in r535_disp_head_displayid() argument
738 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_disp_head_displayid()
746 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_disp_head_displayid()
748 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_disp_head_displayid()
753 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_disp_head_displayid()
760 struct nvkm_disp *disp = outp->disp; in r535_outp_inherit() local
765 list_for_each_entry(head, &disp->heads, head) { in r535_outp_inherit()
766 ret = r535_disp_head_displayid(disp, head->id, &displayid); in r535_outp_inherit()
775 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_outp_inherit()
784 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_outp_inherit()
786 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_inherit()
792 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_inherit()
794 ior = nvkm_ior_find(disp, SOR, id); in r535_outp_inherit()
826 disp->rm.assigned_sors |= BIT(ior->id); in r535_outp_inherit()
838 struct nvkm_disp *disp = outp->disp; in r535_outp_dfp_get_info() local
841 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, NV0073_CTRL_CMD_DFP_GET_INFO, sizeof(*ctrl)); in r535_outp_dfp_get_info()
847 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_outp_dfp_get_info()
849 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_dfp_get_info()
853 nvkm_debug(&disp->engine.subdev, "DFP %08x: flags:%08x flags2:%08x\n", in r535_outp_dfp_get_info()
856 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_dfp_get_info()
864 struct nvkm_disp *disp = outp->disp; in r535_outp_detect() local
867 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_outp_detect()
875 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_outp_detect()
877 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_detect()
889 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_detect()
897 struct nvkm_disp *disp = outp->disp; in r535_dp_mst_id_put() local
899 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_dp_mst_id_put()
906 return nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl); in r535_dp_mst_id_put()
913 struct nvkm_disp *disp = outp->disp; in r535_dp_mst_id_get() local
916 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_dp_mst_id_get()
924 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_dp_mst_id_get()
926 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_dp_mst_id_get()
931 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_dp_mst_id_get()
939 struct nvkm_disp *disp = outp->disp; in r535_dp_drive() local
941 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_dp_drive()
952 return nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl); in r535_dp_drive()
958 struct nvkm_disp *disp = outp->disp; in r535_dp_train_target() local
983 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, NV0073_CTRL_CMD_DP_CTRL, in r535_dp_train_target()
994 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_dp_train_target()
1000 nvkm_debug(&disp->engine.subdev, in r535_dp_train_target()
1004 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_dp_train_target()
1009 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_dp_train_target()
1035 struct nvkm_disp *disp = outp->disp; in r535_dp_rates() local
1044 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_dp_rates()
1053 return nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl); in r535_dp_rates()
1059 struct nvkm_disp *disp = outp->disp; in r535_dp_aux_xfer() local
1066 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, NV0073_CTRL_CMD_DP_AUXCH_CTRL, sizeof(*ctrl)); in r535_dp_aux_xfer()
1082 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_dp_aux_xfer()
1088 nvkm_debug(&disp->engine.subdev, in r535_dp_aux_xfer()
1092 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_dp_aux_xfer()
1097 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_dp_aux_xfer()
1157 struct nvkm_disp *disp = outp->disp; in r535_tmds_edid_get() local
1160 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_tmds_edid_get()
1168 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_tmds_edid_get()
1170 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_tmds_edid_get()
1181 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_tmds_edid_get()
1195 r535_outp_new(struct nvkm_disp *disp, u32 id) in r535_outp_new() argument
1205 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_outp_new()
1213 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_outp_new()
1215 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_new()
1256 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_new()
1258 conn = r535_conn_new(disp, id); in r535_outp_new()
1272 dcbE.heads = disp->head.mask; in r535_outp_new()
1277 ret = nvkm_outp_new_(&r535_tmds, disp, id, &dcbE, &outp); in r535_outp_new()
1284 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_outp_new()
1291 ret = nvkm_gsp_rm_ctrl_push(&disp->rm.objcom, &ctrl, sizeof(*ctrl)); in r535_outp_new()
1293 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_new()
1317 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_outp_new()
1324 ret = nvkm_outp_new_(&r535_dp, disp, id, &dcbE, &outp); in r535_outp_new()
1334 list_add_tail(&outp->head, &disp->outps); in r535_outp_new()
1341 struct nvkm_disp *disp = container_of(event, typeof(*disp), rm.irq); in r535_disp_irq() local
1347 nvkm_debug(&disp->engine.subdev, "event: dp irq displayId %08x\n", irq->displayId); in r535_disp_irq()
1350 nvkm_event_ntfy(&disp->rm.event, fls(irq->displayId) - 1, NVKM_DPYID_IRQ); in r535_disp_irq()
1356 struct nvkm_disp *disp = container_of(event, typeof(*disp), rm.hpd); in r535_disp_hpd() local
1362 nvkm_debug(&disp->engine.subdev, "event: hpd plug %08x unplug %08x\n", in r535_disp_hpd()
1374 nvkm_event_ntfy(&disp->rm.event, i, mask); in r535_disp_hpd()
1383 r535_disp_intr_head_timing(struct nvkm_disp *disp, int head) in r535_disp_intr_head_timing() argument
1385 struct nvkm_subdev *subdev = &disp->engine.subdev; in r535_disp_intr_head_timing()
1390 nvkm_disp_vblank(disp, head); in r535_disp_intr_head_timing()
1399 struct nvkm_disp *disp = container_of(inth, typeof(*disp), engine.subdev.inth); in r535_disp_intr() local
1400 struct nvkm_subdev *subdev = &disp->engine.subdev; in r535_disp_intr()
1406 r535_disp_intr_head_timing(disp, head); in r535_disp_intr()
1412 r535_disp_fini(struct nvkm_disp *disp, bool suspend) in r535_disp_fini() argument
1414 if (!disp->engine.subdev.use.enabled) in r535_disp_fini()
1417 nvkm_gsp_rm_free(&disp->rm.object); in r535_disp_fini()
1420 nvkm_gsp_event_dtor(&disp->rm.irq); in r535_disp_fini()
1421 nvkm_gsp_event_dtor(&disp->rm.hpd); in r535_disp_fini()
1422 nvkm_event_fini(&disp->rm.event); in r535_disp_fini()
1424 nvkm_gsp_rm_free(&disp->rm.objcom); in r535_disp_fini()
1425 nvkm_gsp_device_dtor(&disp->rm.device); in r535_disp_fini()
1426 nvkm_gsp_client_dtor(&disp->rm.client); in r535_disp_fini()
1431 r535_disp_init(struct nvkm_disp *disp) in r535_disp_init() argument
1435 ret = nvkm_gsp_rm_alloc(&disp->rm.device.object, disp->func->root.oclass << 16, in r535_disp_init()
1436 disp->func->root.oclass, 0, &disp->rm.object); in r535_disp_init()
1444 r535_disp_oneinit(struct nvkm_disp *disp) in r535_disp_oneinit() argument
1446 struct nvkm_device *device = disp->engine.subdev.device; in r535_disp_oneinit()
1452 ret = nvkm_gpuobj_new(device, 0x10000, 0x10000, false, NULL, &disp->inst); in r535_disp_oneinit()
1456 if (WARN_ON(nvkm_memory_target(disp->inst->memory) != NVKM_MEM_TARGET_VRAM)) in r535_disp_oneinit()
1465 ctrl->instMemPhysAddr = nvkm_memory_addr(disp->inst->memory); in r535_disp_oneinit()
1466 ctrl->instMemSize = nvkm_memory_size(disp->inst->memory); in r535_disp_oneinit()
1475 ret = nvkm_gsp_client_device_ctor(gsp, &disp->rm.client, &disp->rm.device); in r535_disp_oneinit()
1479 ret = nvkm_gsp_rm_alloc(&disp->rm.device.object, 0x00730000, NV04_DISPLAY_COMMON, 0, in r535_disp_oneinit()
1480 &disp->rm.objcom); in r535_disp_oneinit()
1493 disp->wndw.mask = ctrl->windowPresentMask; in r535_disp_oneinit()
1494 disp->wndw.nr = fls(disp->wndw.mask); in r535_disp_oneinit()
1502 struct nvkm_gsp_object *subdevice = &disp->rm.client.gsp->internal.device.subdevice; in r535_disp_oneinit()
1573 ctrl = nvkm_gsp_rm_ctrl_get(&disp->rm.objcom, in r535_disp_oneinit()
1579 ret = nvkm_gsp_rm_ctrl_wr(&disp->rm.objcom, ctrl); in r535_disp_oneinit()
1588 ctrl = nvkm_gsp_rm_ctrl_rd(&disp->rm.objcom, in r535_disp_oneinit()
1593 disp->head.nr = ctrl->numHeads; in r535_disp_oneinit()
1594 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_disp_oneinit()
1601 ctrl = nvkm_gsp_rm_ctrl_rd(&disp->rm.objcom, in r535_disp_oneinit()
1607 disp->head.mask = ctrl->headMask; in r535_disp_oneinit()
1608 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_disp_oneinit()
1610 for_each_set_bit(i, &disp->head.mask, disp->head.nr) { in r535_disp_oneinit()
1611 ret = nvkm_head_new_(&r535_head, disp, i); in r535_disp_oneinit()
1617 disp->sor.nr = disp->func->sor.cnt(disp, &disp->sor.mask); in r535_disp_oneinit()
1618 nvkm_debug(&disp->engine.subdev, " SOR(s): %d (%02lx)\n", disp->sor.nr, disp->sor.mask); in r535_disp_oneinit()
1619 for_each_set_bit(i, &disp->sor.mask, disp->sor.nr) { in r535_disp_oneinit()
1620 ret = disp->func->sor.new(disp, i); in r535_disp_oneinit()
1631 ctrl = nvkm_gsp_rm_ctrl_rd(&disp->rm.objcom, in r535_disp_oneinit()
1637 nvkm_gsp_rm_ctrl_done(&disp->rm.objcom, ctrl); in r535_disp_oneinit()
1640 ret = r535_outp_new(disp, i); in r535_disp_oneinit()
1646 ret = nvkm_event_init(&r535_disp_event, &gsp->subdev, 3, 32, &disp->rm.event); in r535_disp_oneinit()
1650 ret = nvkm_gsp_device_event_ctor(&disp->rm.device, 0x007e0000, NV2080_NOTIFIERS_HOTPLUG, in r535_disp_oneinit()
1651 r535_disp_hpd, &disp->rm.hpd); in r535_disp_oneinit()
1655 ret = nvkm_gsp_device_event_ctor(&disp->rm.device, 0x007e0001, NV2080_NOTIFIERS_DP_IRQ, in r535_disp_oneinit()
1656 r535_disp_irq, &disp->rm.irq); in r535_disp_oneinit()
1661 ret = nvkm_ramht_new(device, disp->func->ramht_size ? disp->func->ramht_size : in r535_disp_oneinit()
1662 0x1000, 0, disp->inst, &disp->ramht); in r535_disp_oneinit()
1666 ret = nvkm_gsp_intr_stall(gsp, disp->engine.subdev.type, disp->engine.subdev.inst); in r535_disp_oneinit()
1670 ret = nvkm_inth_add(&device->vfn->intr, ret, NVKM_INTR_PRIO_NORMAL, &disp->engine.subdev, in r535_disp_oneinit()
1671 r535_disp_intr, &disp->engine.subdev.inth); in r535_disp_oneinit()
1675 nvkm_inth_allow(&disp->engine.subdev.inth); in r535_disp_oneinit()
1680 r535_disp_dtor(struct nvkm_disp *disp) in r535_disp_dtor() argument
1682 kfree(disp->func); in r535_disp_dtor()