[Intel-gfx] [RFC 18/30] drm/i915: add DP support to intel_ddi_disable

Paulo Zanoni przanoni at gmail.com
Wed Aug 29 00:06:49 CEST 2012


From: Paulo Zanoni <paulo.r.zanoni at intel.com>

Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index ed38bb3..c2377b0 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -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;
-- 
1.7.11.2




More information about the Intel-gfx mailing list