summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdcp.c
diff options
context:
space:
mode:
authorRamalingam C <ramalingam.c@intel.com>2018-01-18 11:18:08 +0530
committerSean Paul <seanpaul@chromium.org>2018-01-18 17:56:02 -0500
commit49d85d034268ab9d9156ff6f81cc07d4caad03f6 (patch)
tree5f5e5ace2fdfd293c5ad30f013fb638d1c56a36c /drivers/gpu/drm/i915/intel_hdcp.c
parent24b42cbadb73e0b9ac67c2d619073b394bc146bd (diff)
downloadlinux-stable-49d85d034268ab9d9156ff6f81cc07d4caad03f6.tar.gz
linux-stable-49d85d034268ab9d9156ff6f81cc07d4caad03f6.tar.bz2
linux-stable-49d85d034268ab9d9156ff6f81cc07d4caad03f6.zip
drm/i915: Check for downstream topology errors
HDCP compliant Repeaters can support max of 127 devices and max depth of 7 for downstream topology. If these max limits are exceeded, repeater will set the topology error flags MAX_CASCADE_EXCEEDED and/or MAX_DEVS_EXCEEDED in Bstatus followed by asserting READY/CP_IRQ for HDCP transmitter. This patch check for these error flags as soon as READY bit is asserted. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> [seanpaul fixed checkpatch alignment issue] Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/1516254488-4971-5-git-send-email-ramalingam.c@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_hdcp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_hdcp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index b50c03a3bfe6..db9527173a1e 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -160,6 +160,12 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,
if (ret)
return ret;
+ if (DRM_HDCP_MAX_DEVICE_EXCEEDED(bstatus[0]) ||
+ DRM_HDCP_MAX_CASCADE_EXCEEDED(bstatus[1])) {
+ DRM_ERROR("Max Topology Limit Exceeded\n");
+ return -EPERM;
+ }
+
/* If there are no downstream devices, we're all done. */
num_downstream = DRM_HDCP_NUM_DOWNSTREAM(bstatus[0]);
if (num_downstream == 0) {