Skip to content

Commit a4790ce

Browse files
vsyrjaladanvet
authored andcommitted
drm/i915: Disable HDMI port after the pipe on PCH platforms
BSpec says we should disable all ports after the pipe on PCH platforms. Do so. Fixes a pipe off timeout on ILK now caused by the transcoder B workaround. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 1612c8b commit a4790ce

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

drivers/gpu/drm/i915/intel_hdmi.c

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,6 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
874874
struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
875875
u32 temp;
876876

877-
if (crtc->config->has_audio)
878-
intel_audio_codec_disable(encoder);
879-
880877
temp = I915_READ(intel_hdmi->hdmi_reg);
881878

882879
temp &= ~(SDVO_ENABLE | SDVO_AUDIO_ENABLE);
@@ -906,6 +903,29 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
906903
}
907904
}
908905

906+
static 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+
916+
static 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+
924+
static void pch_post_disable_hdmi(struct intel_encoder *encoder)
925+
{
926+
intel_disable_hdmi(encoder);
927+
}
928+
909929
static int hdmi_portclock_limit(struct intel_hdmi *hdmi, bool respect_dvi_limit)
910930
{
911931
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)
17861806
DRM_MODE_ENCODER_TMDS);
17871807

17881808
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+
}
17901815
intel_encoder->get_hw_state = intel_hdmi_get_hw_state;
17911816
intel_encoder->get_config = intel_hdmi_get_config;
17921817
if (IS_CHERRYVIEW(dev)) {

0 commit comments

Comments
 (0)