Commit 018532e9 authored by Ramalingam C's avatar Ramalingam C

drm/i915/hdcp: Fix the return handling of drm_hdcp_check_ksvs_revoked

drm_hdcp_check_ksvs_revoked() returns the number of revoked keys and
error codes when the SRM parsing is failed.

Errors in SRM parsing can't affect the HDCP auth, hence with this patch,
I915 will look out for revoked key count alone.
Signed-off-by: default avatarRamalingam C <ramalingam.c@intel.com>
cc: Sean Paul <seanpaul@chromium.org>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20200429134555.22106-1-ramalingam.c@intel.com
parent 33f9a623
...@@ -576,7 +576,7 @@ int intel_hdcp_auth_downstream(struct intel_connector *connector) ...@@ -576,7 +576,7 @@ int intel_hdcp_auth_downstream(struct intel_connector *connector)
goto err; goto err;
if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm, ksv_fifo, if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm, ksv_fifo,
num_downstream)) { num_downstream) > 0) {
drm_err(&dev_priv->drm, "Revoked Ksv(s) in ksv_fifo\n"); drm_err(&dev_priv->drm, "Revoked Ksv(s) in ksv_fifo\n");
ret = -EPERM; ret = -EPERM;
goto err; goto err;
...@@ -682,7 +682,7 @@ static int intel_hdcp_auth(struct intel_connector *connector) ...@@ -682,7 +682,7 @@ static int intel_hdcp_auth(struct intel_connector *connector)
if (ret < 0) if (ret < 0)
return ret; return ret;
if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm, bksv.shim, 1)) { if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm, bksv.shim, 1) > 0) {
drm_err(&dev_priv->drm, "BKSV is revoked\n"); drm_err(&dev_priv->drm, "BKSV is revoked\n");
return -EPERM; return -EPERM;
} }
...@@ -1283,7 +1283,7 @@ static int hdcp2_authentication_key_exchange(struct intel_connector *connector) ...@@ -1283,7 +1283,7 @@ static int hdcp2_authentication_key_exchange(struct intel_connector *connector)
if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm, if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm,
msgs.send_cert.cert_rx.receiver_id, msgs.send_cert.cert_rx.receiver_id,
1)) { 1) > 0) {
drm_err(&dev_priv->drm, "Receiver ID is revoked\n"); drm_err(&dev_priv->drm, "Receiver ID is revoked\n");
return -EPERM; return -EPERM;
} }
...@@ -1484,7 +1484,7 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector) ...@@ -1484,7 +1484,7 @@ int hdcp2_authenticate_repeater_topology(struct intel_connector *connector)
HDCP_2_2_DEV_COUNT_LO(rx_info[1])); HDCP_2_2_DEV_COUNT_LO(rx_info[1]));
if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm, if (drm_hdcp_check_ksvs_revoked(&dev_priv->drm,
msgs.recvid_list.receiver_ids, msgs.recvid_list.receiver_ids,
device_cnt)) { device_cnt) > 0) {
drm_err(&dev_priv->drm, "Revoked receiver ID(s) is in list\n"); drm_err(&dev_priv->drm, "Revoked receiver ID(s) is in list\n");
return -EPERM; return -EPERM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment