[PATCH 5/8] drm/i915/hdcp: use intel_de_wait_for_set() instead of wait_for()
Jani Nikula
jani.nikula at intel.com
Thu Jun 26 17:43:03 UTC 2025
Prefer the register read specific wait function over i915 wait_for().
Note that there's a slight functional change: both HDCP_STATUS_R0_READY
and HDCP_STATUS_ENC need to be set instead of just one or the
other. This is likely the intention, though, as this was fixed for HDMI
in commit 3ffaf56e912e ("drm/i915: HDCP: fix Ri prime check done during
link check").
Cc: Suraj Kandpal <suraj.kandpal at intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 619ccfc33000..c480a75b5fb9 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -903,8 +903,9 @@ static int intel_hdcp_auth(struct intel_connector *connector)
HDCP_CONF_AUTH_AND_ENC);
/* Wait for R0 ready */
- if (wait_for(intel_de_read(display, HDCP_STATUS(display, cpu_transcoder, port)) &
- (HDCP_STATUS_R0_READY | HDCP_STATUS_ENC), 1)) {
+ ret = intel_de_wait_for_set(display, HDCP_STATUS(display, cpu_transcoder, port),
+ HDCP_STATUS_R0_READY | HDCP_STATUS_ENC, 1);
+ if (ret) {
drm_err(display->drm, "Timed out waiting for R0 ready\n");
return -ETIMEDOUT;
}
@@ -936,8 +937,9 @@ static int intel_hdcp_auth(struct intel_connector *connector)
ri.reg);
/* Wait for Ri prime match */
- if (!wait_for(intel_de_read(display, HDCP_STATUS(display, cpu_transcoder, port)) &
- (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1))
+ ret = intel_de_wait_for_set(display, HDCP_STATUS(display, cpu_transcoder, port),
+ HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC, 1);
+ if (!ret)
break;
}
--
2.39.5
More information about the Intel-xe
mailing list