Skip to content

Commit fe4a435

Browse files
committed
Merge tag 'drm-intel-fixes-2024-10-10' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
- HDCP refcount fix Signed-off-by: Dave Airlie <[email protected]> From: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents fc4d262 + 4cc2718 commit fe4a435

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/gpu/drm/i915/display/intel_hdcp.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,8 @@ static void intel_hdcp_update_value(struct intel_connector *connector,
10941094
hdcp->value = value;
10951095
if (update_property) {
10961096
drm_connector_get(&connector->base);
1097-
queue_work(i915->unordered_wq, &hdcp->prop_work);
1097+
if (!queue_work(i915->unordered_wq, &hdcp->prop_work))
1098+
drm_connector_put(&connector->base);
10981099
}
10991100
}
11001101

@@ -2524,7 +2525,8 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
25242525
mutex_lock(&hdcp->mutex);
25252526
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
25262527
drm_connector_get(&connector->base);
2527-
queue_work(i915->unordered_wq, &hdcp->prop_work);
2528+
if (!queue_work(i915->unordered_wq, &hdcp->prop_work))
2529+
drm_connector_put(&connector->base);
25282530
mutex_unlock(&hdcp->mutex);
25292531
}
25302532

@@ -2541,7 +2543,9 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
25412543
*/
25422544
if (!desired_and_not_enabled && !content_protection_type_changed) {
25432545
drm_connector_get(&connector->base);
2544-
queue_work(i915->unordered_wq, &hdcp->prop_work);
2546+
if (!queue_work(i915->unordered_wq, &hdcp->prop_work))
2547+
drm_connector_put(&connector->base);
2548+
25452549
}
25462550
}
25472551

0 commit comments

Comments
 (0)