drm/i915: mask the video DIP port select
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 4 May 2012 20:18:19 +0000 (17:18 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 8 May 2012 12:04:21 +0000 (14:04 +0200)
Should prevent bugs when changing the port.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_hdmi.c

index 833052ef7cf5b9cf787308783642de8058ed6bf1..71e7af91f1b1b25a17ad04bf77e48250c5ee8cb0 100644 (file)
 #define   VIDEO_DIP_ENABLE             (1 << 31)
 #define   VIDEO_DIP_PORT_B             (1 << 29)
 #define   VIDEO_DIP_PORT_C             (2 << 29)
+#define   VIDEO_DIP_PORT_MASK          (3 << 29)
 #define   VIDEO_DIP_ENABLE_AVI         (1 << 21)
 #define   VIDEO_DIP_ENABLE_VENDOR      (2 << 21)
 #define   VIDEO_DIP_ENABLE_SPD         (8 << 21)
index af88313d72d039c8b83b16a07ac5cc031db3d476..952eaf777ac5fa747d62a9b44e699ee3103487a7 100644 (file)
@@ -125,6 +125,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,
 
 
        /* XXX first guess at handling video port, is this corrent? */
+       val &= ~VIDEO_DIP_PORT_MASK;
        if (intel_hdmi->sdvox_reg == SDVOB)
                val |= VIDEO_DIP_PORT_B;
        else if (intel_hdmi->sdvox_reg == SDVOC)