drm/i915: Handle failure from 2nd stage HDCP auth
authorRamalingam C <ramalingam.c@intel.com>
Fri, 2 Feb 2018 22:09:03 +0000 (03:39 +0530)
committerSean Paul <seanpaul@chromium.org>
Mon, 5 Feb 2018 17:58:45 +0000 (12:58 -0500)
We enable the HDCP encryption as a part of first stage authentication.
So when second stage authentication fails, we need to disable the HDCP
encryption and signalling.

This patch ensures that, when hdcp authentication fails, HDCP encryption
and signalling is turned off.

v2:
  Dropped connector ref passing to auth [Seanpaul]
  Moved the call to disable_hdcp() to enable_hdcp() [Seanpaul]

v3:
  No Changes. Added the Reveiwed-by tag.

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-2-git-send-email-ramalingam.c@intel.com
drivers/gpu/drm/i915/intel_hdcp.c

index b97184eccd9c2096c4a7827a438aaf989fbad181..de9a925c122d7f991e5100c4ff02ca73ec7cacf6 100644 (file)
@@ -562,6 +562,9 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
                              connector->hdcp_shim);
        if (ret) {
                DRM_ERROR("Failed to authenticate HDCP (%d)\n", ret);
+
+               /* Ensuring HDCP encryption and signalling are stopped. */
+               _intel_hdcp_disable(connector);
                return ret;
        }