drm/i915/hdmi: check port in ibx_infoframe_enabled
authorJani Nikula <jani.nikula@intel.com>
Wed, 29 Apr 2015 12:30:07 +0000 (15:30 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 30 Apr 2015 08:09:39 +0000 (11:09 +0300)
Add port check for ibx similar to vlv in

commit 535afa2e9e3c1867460d6981d879b04d8b2b9ab3
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Apr 15 16:52:29 2015 -0700

    drm/i915/vlv: check port in infoframe_enabled v2

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_hdmi.c

index 3b9c1176be5b534a21c78ebcf4313a2a57b1fb23..f8d0d81da47de62995e0cb48afa68c9bd41e5d1a 100644 (file)
@@ -223,10 +223,14 @@ static bool ibx_infoframe_enabled(struct drm_encoder *encoder)
        struct drm_device *dev = encoder->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
+       struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
        int reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
        u32 val = I915_READ(reg);
 
-       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 cpt_write_infoframe(struct drm_encoder *encoder,