aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamalingam C <ramalingam.c@intel.com>2018-02-02 17:09:07 -0500
committerSean Paul <seanpaul@chromium.org>2018-02-05 12:59:14 -0500
commit7ee5798829d2dd95451d844ee8d3cb9a610a0363 (patch)
tree9ecb61e4b284c2c237b845683762b5db5b84ceb0
parentf622a71d39069e3a0485da436e29ab18eac00b59 (diff)
drm/i915: Optimize HDCP key load
HDCP key need not be cleared on each hdcp disable. And HDCP key Load is skipped if key is already loaded. v2: No change. Added Reviewed-by tag. v3: No change. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-6-git-send-email-ramalingam.c@intel.com
-rw-r--r--drivers/gpu/drm/i915/intel_hdcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index d7ddd6b28cd7..5c8e6d1829ef 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -49,6 +49,10 @@ static int intel_hdcp_load_keys(struct drm_i915_private *dev_priv)
49 int ret; 49 int ret;
50 u32 val; 50 u32 val;
51 51
52 val = I915_READ(HDCP_KEY_STATUS);
53 if ((val & HDCP_KEY_LOAD_DONE) && (val & HDCP_KEY_LOAD_STATUS))
54 return 0;
55
52 /* 56 /*
53 * On HSW and BDW HW loads the HDCP1.4 Key when Display comes 57 * On HSW and BDW HW loads the HDCP1.4 Key when Display comes
54 * out of reset. So if Key is not already loaded, its an error state. 58 * out of reset. So if Key is not already loaded, its an error state.
@@ -542,8 +546,6 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
542 return -ETIMEDOUT; 546 return -ETIMEDOUT;
543 } 547 }
544 548
545 intel_hdcp_clear_keys(dev_priv);
546
547 ret = connector->hdcp_shim->toggle_signalling(intel_dig_port, false); 549 ret = connector->hdcp_shim->toggle_signalling(intel_dig_port, false);
548 if (ret) { 550 if (ret) {
549 DRM_ERROR("Failed to disable HDCP signalling\n"); 551 DRM_ERROR("Failed to disable HDCP signalling\n");