[1/3] drm/i915: HDCP: fix Ri prime check done during link check
diff mbox series

Message ID 20200226080645.7421-1-oliver.barta@aptiv.com
State New
Headers show
Series
  • [1/3] drm/i915: HDCP: fix Ri prime check done during link check
Related show

Commit Message

Oliver Barta Feb. 26, 2020, 8:06 a.m. UTC
The check was always succeeding even in case of a mismatch
due to the HDCP_STATUS_ENC bit being set. Make sure both
bits are actually set.

Signed-off-by: Oliver Barta <oliver.barta@aptiv.com>
Fixes: 2320175feb74 ("drm/i915: Implement HDCP for HDMI")
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 93ac0f296852..14912daad7ff 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1526,7 +1526,8 @@  bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
 	I915_WRITE(HDCP_RPRIME(dev_priv, cpu_transcoder, port), ri.reg);
 
 	/* Wait for Ri prime match */
-	if (wait_for(I915_READ(HDCP_STATUS(dev_priv, cpu_transcoder, port)) &
+	if (wait_for((I915_READ(HDCP_STATUS(dev_priv, cpu_transcoder, port)) &
+		     (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC)) ==
 		     (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1)) {
 		DRM_ERROR("Ri' mismatch detected, link check failed (%x)\n",
 			  I915_READ(HDCP_STATUS(dev_priv, cpu_transcoder,