aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdmi.c
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni.dodonov@intel.com>2012-05-09 14:37:31 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-19 16:39:51 -0400
commit72662e103c7dd305725dcf4aabcbd8f69483dfbc (patch)
tree050be1f68909b16eec28e24d24ff81f899d9802f /drivers/gpu/drm/i915/intel_hdmi.c
parentf5bbfca3e5aedc7e7b299b48b8ec2509b1052acf (diff)
drm/i915: prepare HDMI link for Haswell
On Haswell, we need to properly train the DDI buffers prior to enabling HDMI, and enable the required clocks with correct dividers for the desired frequency. Also, we cannot simple reuse HDMI routines from previous generations of GPU, as most of HDMI-specific stuff is being done via the DDI port programming instead of HDMI-specific registers. This commit take advantage of the WR PLL clock table which is in a separate (previous) commit to select the right divisors for each mode. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_hdmi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index a7871b18c201..03b3524a6ba2 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -560,6 +560,14 @@ static void intel_hdmi_destroy(struct drm_connector *connector)
560 kfree(connector); 560 kfree(connector);
561} 561}
562 562
563static const struct drm_encoder_helper_funcs intel_hdmi_helper_funcs_hsw = {
564 .dpms = intel_ddi_dpms,
565 .mode_fixup = intel_hdmi_mode_fixup,
566 .prepare = intel_encoder_prepare,
567 .mode_set = intel_ddi_mode_set,
568 .commit = intel_encoder_commit,
569};
570
563static const struct drm_encoder_helper_funcs intel_hdmi_helper_funcs = { 571static const struct drm_encoder_helper_funcs intel_hdmi_helper_funcs = {
564 .dpms = intel_hdmi_dpms, 572 .dpms = intel_hdmi_dpms,
565 .mode_fixup = intel_hdmi_mode_fixup, 573 .mode_fixup = intel_hdmi_mode_fixup,
@@ -699,7 +707,10 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
699 I915_WRITE(TVIDEO_DIP_CTL(i), 0); 707 I915_WRITE(TVIDEO_DIP_CTL(i), 0);
700 } 708 }
701 709
702 drm_encoder_helper_add(&intel_encoder->base, &intel_hdmi_helper_funcs); 710 if (IS_HASWELL(dev))
711 drm_encoder_helper_add(&intel_encoder->base, &intel_hdmi_helper_funcs_hsw);
712 else
713 drm_encoder_helper_add(&intel_encoder->base, &intel_hdmi_helper_funcs);
703 714
704 intel_hdmi_add_properties(intel_hdmi, connector); 715 intel_hdmi_add_properties(intel_hdmi, connector);
705 716