@@ -1054,8 +1054,16 @@ void intel_ddi_disable(struct drm_encoder *encoder)
{
struct drm_i915_private *dev_priv = encoder->dev->dev_private;
struct drm_crtc *crtc = encoder->crtc;
- struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
- int port = intel_hdmi->ddi_port;
+ struct intel_encoder *intel_encoder = to_intel_encoder(encoder);
+ int port;
+
+ if (intel_encoder->type == INTEL_OUTPUT_HDMI) {
+ struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
+ port = intel_hdmi->ddi_port;
+ } else {
+ struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+ port = intel_dp->port;
+ }
if (intel_ddi_port_disabled(dev_priv, port))
return;