Lines Matching refs:nv_encoder

186 	struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);  in nv04_dfp_mode_fixup()  local
187 struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder); in nv04_dfp_mode_fixup()
193 nv_encoder->mode = *adjusted_mode; in nv04_dfp_mode_fixup()
196 nv_encoder->mode = *nv_connector->native_mode; in nv04_dfp_mode_fixup()
204 struct nouveau_encoder *nv_encoder, int head) in nv04_dfp_prepare_sel_clk() argument
207 uint32_t bits1618 = nv_encoder->dcb->or & DCB_OUTPUT_A ? 0x10000 : 0x40000; in nv04_dfp_prepare_sel_clk()
209 if (nv_encoder->dcb->location != DCB_LOC_ON_CHIP) in nv04_dfp_prepare_sel_clk()
236 if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS && nv04_display(dev)->saved_reg.sel_clk & 0xf0) { in nv04_dfp_prepare_sel_clk()
246 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_dfp_prepare() local
256 nv04_dfp_prepare_sel_clk(dev, nv_encoder, head); in nv04_dfp_prepare()
261 if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP) in nv04_dfp_prepare()
264 *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30; in nv04_dfp_prepare()
265 if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS) in nv04_dfp_prepare()
290 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_dfp_mode_set() local
291 struct drm_display_mode *output_mode = &nv_encoder->mode; in nv04_dfp_mode_set()
341 if (nv_encoder->dcb->location != DCB_LOC_ON_CHIP && in nv04_dfp_mode_set()
344 if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS) { in nv04_dfp_mode_set()
451 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_dfp_commit() local
452 struct dcb_output *dcbe = nv_encoder->dcb; in nv04_dfp_commit()
457 run_tmds_table(dev, dcbe, head, nv_encoder->mode.clock); in nv04_dfp_commit()
459 call_lvds_script(dev, dcbe, head, LVDS_RESET, nv_encoder->mode.clock); in nv04_dfp_commit()
476 slave_encoder, &nv_encoder->mode, &nv_encoder->mode); in nv04_dfp_commit()
481 nouveau_encoder_connector_get(nv_encoder)->base.name, in nv04_dfp_commit()
482 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); in nv04_dfp_commit()
517 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_lvds_dpms() local
518 bool was_powersaving = is_powersaving_dpms(nv_encoder->last_dpms); in nv04_lvds_dpms()
520 if (nv_encoder->last_dpms == mode) in nv04_lvds_dpms()
522 nv_encoder->last_dpms = mode; in nv04_lvds_dpms()
525 mode, nv_encoder->dcb->index); in nv04_lvds_dpms()
530 if (nv_encoder->dcb->lvdsconf.use_power_scripts) { in nv04_lvds_dpms()
535 nv04_dfp_get_bound_head(dev, nv_encoder->dcb); in nv04_lvds_dpms()
538 call_lvds_script(dev, nv_encoder->dcb, head, in nv04_lvds_dpms()
539 LVDS_PANEL_ON, nv_encoder->mode.clock); in nv04_lvds_dpms()
544 call_lvds_script(dev, nv_encoder->dcb, head, in nv04_lvds_dpms()
552 nv04_dfp_prepare_sel_clk(dev, nv_encoder, nouveau_crtc(crtc)->index); in nv04_lvds_dpms()
563 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_tmds_dpms() local
565 if (nv_encoder->last_dpms == mode) in nv04_tmds_dpms()
567 nv_encoder->last_dpms = mode; in nv04_tmds_dpms()
570 mode, nv_encoder->dcb->index); in nv04_tmds_dpms()
578 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_dfp_save() local
582 nv_encoder->restore.head = in nv04_dfp_save()
583 nv04_dfp_get_bound_head(dev, nv_encoder->dcb); in nv04_dfp_save()
588 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_dfp_restore() local
590 int head = nv_encoder->restore.head; in nv04_dfp_restore()
592 if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS) { in nv04_dfp_restore()
594 nouveau_encoder_connector_get(nv_encoder); in nv04_dfp_restore()
597 call_lvds_script(dev, nv_encoder->dcb, head, in nv04_dfp_restore()
601 } else if (nv_encoder->dcb->type == DCB_OUTPUT_TMDS) { in nv04_dfp_restore()
605 run_tmds_table(dev, nv_encoder->dcb, head, clock); in nv04_dfp_restore()
608 nv_encoder->last_dpms = NV_DPMS_CLEARED; in nv04_dfp_restore()
613 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); in nv04_dfp_destroy() local
619 kfree(nv_encoder); in nv04_dfp_destroy()
680 struct nouveau_encoder *nv_encoder = NULL; in nv04_dfp_create() local
697 nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL); in nv04_dfp_create()
698 if (!nv_encoder) in nv04_dfp_create()
701 nv_encoder->enc_save = nv04_dfp_save; in nv04_dfp_create()
702 nv_encoder->enc_restore = nv04_dfp_restore; in nv04_dfp_create()
704 encoder = to_drm_encoder(nv_encoder); in nv04_dfp_create()
706 nv_encoder->dcb = entry; in nv04_dfp_create()
707 nv_encoder->or = ffs(entry->or) - 1; in nv04_dfp_create()