[PATCH 36/43] drm/i915: Enable HDCP1.4 incase of HDCP2.2 failure

Ramalingam C
2018-02-14T14:21:12Z

When HDCP2.2 enabling fails and HDCP1.4 is supported, HDCP1.4 is
enabled.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
drivers/gpu/drm/i915/intel_hdcp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index 2fe73f7eb6dd..9d01d1ff8c73 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -685,11 +685,13 @@ static void intel_hdcp_enable_work(struct work_struct *work)
{
struct intel_hdcp *hdcp = container_of(work, struct intel_hdcp,
hdcp_enable_work);
+ int ret = -EINVAL;

mutex_lock(&hdcp->hdcp_mutex);
if (intel_hdcp2_supported(hdcp))
- _intel_hdcp2_enable(hdcp);
- else if (intel_hdcp1_supported(hdcp))
+ ret = _intel_hdcp2_enable(hdcp);
+
+ if (ret && intel_hdcp1_supported(hdcp))
_intel_hdcp_enable(hdcp);

mutex_unlock(&hdcp->hdcp_mutex);