static void sti_dvo_encoder_disable(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); /* Reset VIP register */ tvout_write(tvout, 0x0, TVO_VIP_DVO); }
static void sti_hdmi_encoder_disable(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); /* reset VIP register */ tvout_write(tvout, 0x0, TVO_VIP_HDMI); }
static void sti_hdmi_encoder_enable(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); tvout_preformatter_set_matrix(tvout, &encoder->crtc->mode); tvout_hdmi_start(tvout, sti_crtc_is_main(encoder->crtc)); }
static void sti_tvout_early_unregister(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); if (!tvout->debugfs_registered) return; tvout->debugfs_registered = false; }
static void sti_hda_encoder_disable(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); /* reset VIP register */ tvout_write(tvout, 0x0, TVO_VIP_HDF); /* power down HD DAC */ tvout_write(tvout, 1, TVO_HD_DAC_CFG_OFF); }
static int sti_tvout_late_register(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); int ret; if (tvout->debugfs_registered) return 0; ret = tvout_debugfs_init(tvout, encoder->dev->primary); if (ret) return ret; tvout->debugfs_registered = true; return 0; }
static void sti_hdmi_encoder_commit(struct drm_encoder *encoder) { struct sti_tvout *tvout = to_sti_tvout(encoder); tvout_hdmi_start(tvout, sti_drm_crtc_is_main(encoder->crtc)); }