drm/i915/g4x: fix g4x infoframe readout
authorJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 20 Nov 2014 21:24:13 +0000 (13:24 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Nov 2014 21:51:25 +0000 (22:51 +0100)
Need to check the port too.

Reported-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_hdmi.c

index f58e8834ebfb4f1006aa173de11d99fc131cf770..ec873338e84d348b63af5b5815767a46f531dee4 100644 (file)
@@ -170,9 +170,13 @@ static bool g4x_infoframe_enabled(struct drm_encoder *encoder)
 {
        struct drm_device *dev = encoder->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
+       struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
        u32 val = I915_READ(VIDEO_DIP_CTL);
 
-       return val & VIDEO_DIP_ENABLE;
+       if (VIDEO_DIP_PORT(intel_dig_port->port) == (val & VIDEO_DIP_PORT_MASK))
+               return val & VIDEO_DIP_ENABLE;
+
+       return false;
 }
 
 static void ibx_write_infoframe(struct drm_encoder *encoder,