aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdmi.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-04-24 17:54:56 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-05-16 05:59:02 -0400
commit4cde8a215fe0a97b3f2f452a8c03232600b1b56b (patch)
tree0c7963df842c2dc1e7f833fbb36996021edc773c /drivers/gpu/drm/i915/intel_hdmi.c
parente55dd225c806201dd4b084a03a46a7928c603a89 (diff)
drm/i915/hdmi: Remove ->mode_set callback
Similar to dp the only thing we do is call intel_write_eld and prepare a bit of state for the enable hooks. The only difference is that we write that to the hardware instead of keeping track of it somewhere in software. Still we can just move all this to the very first enable hook. Reviewed-by: Naresh Kumar Kachhi <naresh.kumar.kachhi@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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index bf6d91d8b55e..e978c12bde1d 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -633,7 +633,7 @@ static void hsw_set_infoframes(struct drm_encoder *encoder,
633 intel_hdmi_set_hdmi_infoframe(encoder, adjusted_mode); 633 intel_hdmi_set_hdmi_infoframe(encoder, adjusted_mode);
634} 634}
635 635
636static void intel_hdmi_mode_set(struct intel_encoder *encoder) 636static void intel_hdmi_prepare(struct intel_encoder *encoder)
637{ 637{
638 struct drm_device *dev = encoder->base.dev; 638 struct drm_device *dev = encoder->base.dev;
639 struct drm_i915_private *dev_priv = dev->dev_private; 639 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -1138,6 +1138,8 @@ static void intel_hdmi_pre_enable(struct intel_encoder *encoder)
1138 struct drm_display_mode *adjusted_mode = 1138 struct drm_display_mode *adjusted_mode =
1139 &intel_crtc->config.adjusted_mode; 1139 &intel_crtc->config.adjusted_mode;
1140 1140
1141 intel_hdmi_prepare(encoder);
1142
1141 intel_hdmi->set_infoframes(&encoder->base, 1143 intel_hdmi->set_infoframes(&encoder->base,
1142 intel_crtc->config.has_hdmi_sink, 1144 intel_crtc->config.has_hdmi_sink,
1143 adjusted_mode); 1145 adjusted_mode);
@@ -1202,6 +1204,8 @@ static void vlv_hdmi_pre_pll_enable(struct intel_encoder *encoder)
1202 enum dpio_channel port = vlv_dport_to_channel(dport); 1204 enum dpio_channel port = vlv_dport_to_channel(dport);
1203 int pipe = intel_crtc->pipe; 1205 int pipe = intel_crtc->pipe;
1204 1206
1207 intel_hdmi_prepare(encoder);
1208
1205 /* Program Tx lane resets to default */ 1209 /* Program Tx lane resets to default */
1206 mutex_lock(&dev_priv->dpio_lock); 1210 mutex_lock(&dev_priv->dpio_lock);
1207 vlv_dpio_write(dev_priv, pipe, VLV_PCS_DW0(port), 1211 vlv_dpio_write(dev_priv, pipe, VLV_PCS_DW0(port),
@@ -1448,7 +1452,6 @@ void intel_hdmi_init(struct drm_device *dev, int hdmi_reg, enum port port)
1448 DRM_MODE_ENCODER_TMDS); 1452 DRM_MODE_ENCODER_TMDS);
1449 1453
1450 intel_encoder->compute_config = intel_hdmi_compute_config; 1454 intel_encoder->compute_config = intel_hdmi_compute_config;
1451 intel_encoder->mode_set = intel_hdmi_mode_set;
1452 intel_encoder->disable = intel_disable_hdmi; 1455 intel_encoder->disable = intel_disable_hdmi;
1453 intel_encoder->get_hw_state = intel_hdmi_get_hw_state; 1456 intel_encoder->get_hw_state = intel_hdmi_get_hw_state;
1454 intel_encoder->get_config = intel_hdmi_get_config; 1457 intel_encoder->get_config = intel_hdmi_get_config;