drm/i915/hdmi: fix vlv infoframe port check
authorJani Nikula <jani.nikula@intel.com>
Wed, 29 Apr 2015 11:29:39 +0000 (14:29 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 30 Apr 2015 07:51:29 +0000 (10:51 +0300)
Due to missing shifting, the vlv infoframe port check only works for
port A. Fix it. Broken since introduction 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

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90059
Tested-by: xubin <bin.a.xu@intel.com>
Tested-by: Ye Tian <yex.tian@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_hdmi.c

index 56d1d13c075a21fac1690457da25e57172ac2790..3b9c1176be5b534a21c78ebcf4313a2a57b1fb23 100644 (file)
@@ -327,9 +327,8 @@ static bool vlv_infoframe_enabled(struct drm_encoder *encoder)
        struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
        int reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
        u32 val = I915_READ(reg);
-       u32 port = intel_dig_port->port;
 
-       if (port == (val & VIDEO_DIP_PORT_MASK))
+       if (VIDEO_DIP_PORT(intel_dig_port->port) == (val & VIDEO_DIP_PORT_MASK))
                return val & VIDEO_DIP_ENABLE;
 
        return false;