summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdcp.c
diff options
context:
space:
mode:
authorRamalingam C <ramalingam.c@intel.com>2019-02-16 23:07:02 +0530
committerDaniel Vetter <daniel.vetter@ffwll.ch>2019-02-20 20:41:59 +0100
commitcf9cb35ff731a784bdbb9ce621faa34346066a39 (patch)
tree079d203b5140e56845b1d9d00699e9dae5ef5a61 /drivers/gpu/drm/i915/intel_hdcp.c
parent2d4254e50649d2bd13f73e1513708f746a513bc1 (diff)
downloadlinux-stable-cf9cb35ff731a784bdbb9ce621faa34346066a39.tar.gz
linux-stable-cf9cb35ff731a784bdbb9ce621faa34346066a39.tar.bz2
linux-stable-cf9cb35ff731a784bdbb9ce621faa34346066a39.zip
drm/i915: CP_IRQ handling for DP HDCP2.2 msgs
Implements the Waitqueue is created to wait for CP_IRQ Signaling the CP_IRQ arrival through atomic variable. For applicable DP HDCP2.2 msgs read wait for CP_IRQ. As per HDCP2.2 spec "HDCP Transmitters must process CP_IRQ interrupts when they are received from HDCP Receivers" Without CP_IRQ processing, DP HDCP2.2 H_Prime msg was getting corrupted while reading it based on corresponding status bit. This creates the random failures in reading the DP HDCP2.2 msgs. v2: CP_IRQ arrival is tracked based on the atomic val inc [daniel] Recording the reviewed-by Daniel from IRC. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550338640-17470-16-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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index fe0445c0eaac..6178fe93f398 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -1806,6 +1806,7 @@ int intel_hdcp_init(struct intel_connector *connector,
if (is_hdcp2_supported(dev_priv))
intel_hdcp2_init(connector);
+ init_waitqueue_head(&hdcp->cp_irq_queue);
return 0;
}
@@ -1935,12 +1936,8 @@ void intel_hdcp_handle_cp_irq(struct intel_connector *connector)
if (!hdcp->shim)
return;
- /*
- * CP_IRQ could be triggered due to 1. HDCP2.2 auth msgs availability,
- * 2. link failure and 3. repeater reauth request. At present we dont
- * handle the CP_IRQ for the HDCP2.2 auth msg availability for read.
- * To handle other two causes for CP_IRQ we have the work_fn which is
- * scheduled here.
- */
+ atomic_inc(&connector->hdcp.cp_irq_count);
+ wake_up_all(&connector->hdcp.cp_irq_queue);
+
schedule_delayed_work(&hdcp->check_work, 0);
}