Skip to content

Commit

Permalink
drm/i915: Optimize HDCP key load
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ramalingam C authored and Sean Paul committed Feb 5, 2018
1 parent f622a71 commit 7ee5798
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/intel_hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ static int intel_hdcp_load_keys(struct drm_i915_private *dev_priv)
int ret;
u32 val;

val = I915_READ(HDCP_KEY_STATUS);
if ((val & HDCP_KEY_LOAD_DONE) && (val & HDCP_KEY_LOAD_STATUS))
return 0;

/*
* On HSW and BDW HW loads the HDCP1.4 Key when Display comes
* out of reset. So if Key is not already loaded, its an error state.
Expand Down Expand Up @@ -542,8 +546,6 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
return -ETIMEDOUT;
}

intel_hdcp_clear_keys(dev_priv);

ret = connector->hdcp_shim->toggle_signalling(intel_dig_port, false);
if (ret) {
DRM_ERROR("Failed to disable HDCP signalling\n");
Expand Down

0 comments on commit 7ee5798

Please sign in to comment.