aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnshuman Gupta <[email protected]>2021-01-11 13:41:03 +0530
committerJani Nikula <[email protected]>2021-01-18 10:14:06 +0200
commit8662e1119a7d1baa1b2001689b2923e9050754bd (patch)
tree7ec58d6502c07f094bde00a3d49a497a26ca3d4f
parentb3c95d0bdb0855b1f28370629e9eebec6bceac17 (diff)
drm/i915/hdcp: Get conn while content_type changed
Get DRM connector reference count while scheduling a prop work to avoid any possible destroy of DRM connector when it is in DRM_CONNECTOR_REGISTERED state. Fixes: a6597faa2d59 ("drm/i915: Protect workers against disappearing connectors") Cc: Sean Paul <[email protected]> Cc: Ramalingam C <[email protected]> Reviewed-by: Uma Shankar <[email protected]> Reviewed-by: Ramalingam C <[email protected]> Tested-by: Karthik B S <[email protected]> Signed-off-by: Anshuman Gupta <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit b3c6661aad979ec3d4f5675cf3e6a35828607d6a) Signed-off-by: Jani Nikula <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/display/intel_hdcp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index eee8263405b9..b9d8825e2bb1 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -2210,6 +2210,7 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
if (content_protection_type_changed) {
mutex_lock(&hdcp->mutex);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
+ drm_connector_get(&connector->base);
schedule_work(&hdcp->prop_work);
mutex_unlock(&hdcp->mutex);
}