Lines Matching refs:nv_encoder

371 	struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);  in nv50_outp_atomic_fix_depth()  local
375 switch (nv_encoder->dcb->type) { in nv50_outp_atomic_fix_depth()
377 max_rate = nv_encoder->dp.link_nr * nv_encoder->dp.link_bw; in nv50_outp_atomic_fix_depth()
474 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_dac_atomic_disable() local
478 core->func->dac->ctrl(core, nv_encoder->outp.or.id, ctrl, NULL); in nv50_dac_atomic_disable()
479 nv_encoder->crtc = NULL; in nv50_dac_atomic_disable()
480 nvif_outp_release(&nv_encoder->outp); in nv50_dac_atomic_disable()
486 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_dac_atomic_enable() local
487 struct nouveau_crtc *nv_crtc = nv50_outp_get_new_crtc(state, nv_encoder); in nv50_dac_atomic_enable()
505 nvif_outp_acquire_rgb_crt(&nv_encoder->outp); in nv50_dac_atomic_enable()
507 core->func->dac->ctrl(core, nv_encoder->outp.or.id, ctrl, asyh); in nv50_dac_atomic_enable()
510 nv_encoder->crtc = &nv_crtc->base; in nv50_dac_atomic_enable()
516 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_dac_detect() local
524 ret = nvif_outp_load_detect(&nv_encoder->outp, loadval); in nv50_dac_detect()
542 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_dac_destroy() local
544 nvif_outp_dtor(&nv_encoder->outp); in nv50_dac_destroy()
562 struct nouveau_encoder *nv_encoder; in nv50_dac_create() local
566 nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL); in nv50_dac_create()
567 if (!nv_encoder) in nv50_dac_create()
569 nv_encoder->dcb = dcbe; in nv50_dac_create()
573 nv_encoder->i2c = &bus->i2c; in nv50_dac_create()
575 encoder = to_drm_encoder(nv_encoder); in nv50_dac_create()
583 return nvif_outp_ctor(disp->disp, nv_encoder->base.base.name, dcbe->id, &nv_encoder->outp); in nv50_dac_create()
605 struct nouveau_encoder *nv_encoder; in nv50_audio_component_get_eld() local
619 nv_encoder = nouveau_encoder(encoder); in nv50_audio_component_get_eld()
620 nv_connector = nouveau_connector(nv_encoder->audio.connector); in nv50_audio_component_get_eld()
621 nv_crtc = nouveau_crtc(nv_encoder->crtc); in nv50_audio_component_get_eld()
623 if (!nv_crtc || nv_encoder->outp.or.id != port || nv_crtc->index != dev_id) in nv50_audio_component_get_eld()
626 *enabled = nv_encoder->audio.enabled; in nv50_audio_component_get_eld()
723 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_audio_disable() local
724 struct nvif_outp *outp = &nv_encoder->outp; in nv50_audio_disable()
730 if (nv_encoder->audio.enabled) { in nv50_audio_disable()
731 nv_encoder->audio.enabled = false; in nv50_audio_disable()
732 nv_encoder->audio.connector = NULL; in nv50_audio_disable()
733 nvif_outp_hda_eld(&nv_encoder->outp, nv_crtc->index, NULL, 0); in nv50_audio_disable()
746 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_audio_enable() local
747 struct nvif_outp *outp = &nv_encoder->outp; in nv50_audio_enable()
754 nvif_outp_hda_eld(&nv_encoder->outp, nv_crtc->index, nv_connector->base.eld, in nv50_audio_enable()
756 nv_encoder->audio.enabled = true; in nv50_audio_enable()
757 nv_encoder->audio.connector = &nv_connector->base; in nv50_audio_enable()
773 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_hdmi_enable() local
793 ret = drm_scdc_readb(nv_encoder->i2c, SCDC_TMDS_CONFIG, &scdc); in nv50_hdmi_enable()
805 ret = drm_scdc_writeb(nv_encoder->i2c, SCDC_TMDS_CONFIG, scdc); in nv50_hdmi_enable()
811 ret = nvif_outp_acquire_tmds(&nv_encoder->outp, nv_crtc->index, true, in nv50_hdmi_enable()
829 nvif_outp_infoframe(&nv_encoder->outp, NVIF_OUTP_INFOFRAME_V0_AVI, &args.infoframe, size); in nv50_hdmi_enable()
839 nvif_outp_infoframe(&nv_encoder->outp, NVIF_OUTP_INFOFRAME_V0_VSI, &args.infoframe, size); in nv50_hdmi_enable()
1510 nv50_sor_update(struct nouveau_encoder *nv_encoder, u8 head, in nv50_sor_update() argument
1513 struct nv50_disp *disp = nv50_disp(nv_encoder->base.base.dev); in nv50_sor_update()
1517 nv_encoder->ctrl &= ~BIT(head); in nv50_sor_update()
1518 if (NVDEF_TEST(nv_encoder->ctrl, NV507D, SOR_SET_CONTROL, OWNER, ==, NONE)) in nv50_sor_update()
1519 nv_encoder->ctrl = 0; in nv50_sor_update()
1521 nv_encoder->ctrl |= NVVAL(NV507D, SOR_SET_CONTROL, PROTOCOL, proto); in nv50_sor_update()
1522 nv_encoder->ctrl |= BIT(head); in nv50_sor_update()
1526 core->func->sor->ctrl(core, nv_encoder->outp.or.id, nv_encoder->ctrl, asyh); in nv50_sor_update()
1537 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_sor_atomic_disable() local
1538 struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc); in nv50_sor_atomic_disable()
1539 struct nouveau_connector *nv_connector = nv50_outp_get_old_connector(state, nv_encoder); in nv50_sor_atomic_disable()
1541 struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); in nv50_sor_atomic_disable()
1557 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) { in nv50_sor_atomic_disable()
1567 nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0); in nv50_sor_atomic_disable()
1569 nvif_outp_release(&nv_encoder->outp); in nv50_sor_atomic_disable()
1570 nv_encoder->crtc = NULL; in nv50_sor_atomic_disable()
1576 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_sor_atomic_enable() local
1577 struct nouveau_crtc *nv_crtc = nv50_outp_get_new_crtc(state, nv_encoder); in nv50_sor_atomic_enable()
1582 struct nvif_outp *outp = &nv_encoder->outp; in nv50_sor_atomic_enable()
1594 nv_connector = nv50_outp_get_new_connector(state, nv_encoder); in nv50_sor_atomic_enable()
1595 nv_encoder->crtc = &nv_crtc->base; in nv50_sor_atomic_enable()
1602 switch (nv_encoder->dcb->type) { in nv50_sor_atomic_enable()
1610 if (nv_encoder->outp.or.link & 1) { in nv50_sor_atomic_enable()
1619 nv_encoder->dcb->duallink_possible && in nv50_sor_atomic_enable()
1653 nvif_outp_acquire_lvds(&nv_encoder->outp, lvds_dual, lvds_8bpc); in nv50_sor_atomic_enable()
1656 nvif_outp_acquire_dp(&nv_encoder->outp, nv_encoder->dp.dpcd, 0, 0, hda, false); in nv50_sor_atomic_enable()
1659 if (nv_encoder->outp.or.link & 1) in nv50_sor_atomic_enable()
1679 nv_encoder->update(nv_encoder, nv_crtc->index, asyh, proto, depth); in nv50_sor_atomic_enable()
1692 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_sor_destroy() local
1694 nvif_outp_dtor(&nv_encoder->outp); in nv50_sor_destroy()
1696 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1699 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) in nv50_sor_destroy()
1700 mutex_destroy(&nv_encoder->dp.hpd_irq_lock); in nv50_sor_destroy()
1726 struct nouveau_encoder *nv_encoder; in nv50_sor_create() local
1740 nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL); in nv50_sor_create()
1741 if (!nv_encoder) in nv50_sor_create()
1743 nv_encoder->dcb = dcbe; in nv50_sor_create()
1744 nv_encoder->update = nv50_sor_update; in nv50_sor_create()
1746 encoder = to_drm_encoder(nv_encoder); in nv50_sor_create()
1755 disp->core->func->sor->get_caps(disp, nv_encoder, ffs(dcbe->or) - 1); in nv50_sor_create()
1756 nv50_outp_dump_caps(drm, nv_encoder); in nv50_sor_create()
1762 mutex_init(&nv_encoder->dp.hpd_irq_lock); in nv50_sor_create()
1770 nv_encoder->i2c = &aux->i2c; in nv50_sor_create()
1772 nv_encoder->i2c = &nv_connector->aux.ddc; in nv50_sor_create()
1774 nv_encoder->aux = aux; in nv50_sor_create()
1779 ret = nv50_mstm_new(nv_encoder, &nv_connector->aux, in nv50_sor_create()
1781 &nv_encoder->dp.mstm); in nv50_sor_create()
1789 nv_encoder->i2c = &bus->i2c; in nv50_sor_create()
1792 return nvif_outp_ctor(disp->disp, nv_encoder->base.base.name, dcbe->id, &nv_encoder->outp); in nv50_sor_create()
1813 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_pior_atomic_disable() local
1817 core->func->pior->ctrl(core, nv_encoder->outp.or.id, ctrl, NULL); in nv50_pior_atomic_disable()
1818 nv_encoder->crtc = NULL; in nv50_pior_atomic_disable()
1819 nvif_outp_release(&nv_encoder->outp); in nv50_pior_atomic_disable()
1825 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_pior_atomic_enable() local
1826 struct nouveau_crtc *nv_crtc = nv50_outp_get_new_crtc(state, nv_encoder); in nv50_pior_atomic_enable()
1847 switch (nv_encoder->dcb->type) { in nv50_pior_atomic_enable()
1850 nvif_outp_acquire_tmds(&nv_encoder->outp, false, false, 0, 0, 0, false); in nv50_pior_atomic_enable()
1854 nvif_outp_acquire_dp(&nv_encoder->outp, nv_encoder->dp.dpcd, 0, 0, false, false); in nv50_pior_atomic_enable()
1861 core->func->pior->ctrl(core, nv_encoder->outp.or.id, ctrl, asyh); in nv50_pior_atomic_enable()
1862 nv_encoder->crtc = &nv_crtc->base; in nv50_pior_atomic_enable()
1875 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv50_pior_destroy() local
1877 nvif_outp_dtor(&nv_encoder->outp); in nv50_pior_destroy()
1881 mutex_destroy(&nv_encoder->dp.hpd_irq_lock); in nv50_pior_destroy()
1900 struct nouveau_encoder *nv_encoder; in nv50_pior_create() local
1919 nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL); in nv50_pior_create()
1920 if (!nv_encoder) in nv50_pior_create()
1922 nv_encoder->dcb = dcbe; in nv50_pior_create()
1923 nv_encoder->i2c = ddc; in nv50_pior_create()
1924 nv_encoder->aux = aux; in nv50_pior_create()
1926 mutex_init(&nv_encoder->dp.hpd_irq_lock); in nv50_pior_create()
1928 encoder = to_drm_encoder(nv_encoder); in nv50_pior_create()
1937 disp->core->func->pior->get_caps(disp, nv_encoder, ffs(dcbe->or) - 1); in nv50_pior_create()
1938 nv50_outp_dump_caps(drm, nv_encoder); in nv50_pior_create()
1940 return nvif_outp_ctor(disp->disp, nv_encoder->base.base.name, dcbe->id, &nv_encoder->outp); in nv50_pior_create()
2532 struct nouveau_encoder *nv_encoder = in nv50_display_init() local
2534 nv50_mstm_init(nv_encoder, runtime); in nv50_display_init()