aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index fb2dc84e1061..e7e90610cc6f 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -874,9 +874,6 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
874 struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); 874 struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
875 u32 temp; 875 u32 temp;
876 876
877 if (crtc->config->has_audio)
878 intel_audio_codec_disable(encoder);
879
880 temp = I915_READ(intel_hdmi->hdmi_reg); 877 temp = I915_READ(intel_hdmi->hdmi_reg);
881 878
882 temp &= ~(SDVO_ENABLE | SDVO_AUDIO_ENABLE); 879 temp &= ~(SDVO_ENABLE | SDVO_AUDIO_ENABLE);
@@ -906,6 +903,29 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
906 } 903 }
907} 904}
908 905
906static void g4x_disable_hdmi(struct intel_encoder *encoder)
907{
908 struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
909
910 if (crtc->config->has_audio)
911 intel_audio_codec_disable(encoder);
912
913 intel_disable_hdmi(encoder);
914}
915
916static void pch_disable_hdmi(struct intel_encoder *encoder)
917{
918 struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
919
920 if (crtc->config->has_audio)
921 intel_audio_codec_disable(encoder);
922}
923
924static void pch_post_disable_hdmi(struct intel_encoder *encoder)
925{
926 intel_disable_hdmi(encoder);
927}
928
909static int hdmi_portclock_limit(struct intel_hdmi *hdmi, bool respect_dvi_limit) 929static int hdmi_portclock_limit(struct intel_hdmi *hdmi, bool respect_dvi_limit)
910{ 930{
911 struct drm_device *dev = intel_hdmi_to_dev(hdmi); 931 struct drm_device *dev = intel_hdmi_to_dev(hdmi);
@@ -1786,7 +1806,12 @@ void intel_hdmi_init(struct drm_device *dev, int hdmi_reg, enum port port)
1786 DRM_MODE_ENCODER_TMDS); 1806 DRM_MODE_ENCODER_TMDS);
1787 1807
1788 intel_encoder->compute_config = intel_hdmi_compute_config; 1808 intel_encoder->compute_config = intel_hdmi_compute_config;
1789 intel_encoder->disable = intel_disable_hdmi; 1809 if (HAS_PCH_SPLIT(dev)) {
1810 intel_encoder->disable = pch_disable_hdmi;
1811 intel_encoder->post_disable = pch_post_disable_hdmi;
1812 } else {
1813 intel_encoder->disable = g4x_disable_hdmi;
1814 }
1790 intel_encoder->get_hw_state = intel_hdmi_get_hw_state; 1815 intel_encoder->get_hw_state = intel_hdmi_get_hw_state;
1791 intel_encoder->get_config = intel_hdmi_get_config; 1816 intel_encoder->get_config = intel_hdmi_get_config;
1792 if (IS_CHERRYVIEW(dev)) { 1817 if (IS_CHERRYVIEW(dev)) {