Skip to content

Commit 609458a

Browse files
nirmoylucasdemarchi
authored andcommitted
drm/xe/display/xe_hdcp_gsc: Free arbiter on driver removal
Free arbiter allocated in intel_hdcp_gsc_init(). Fixes: 152f2df ("drm/xe/hdcp: Enable HDCP for XE") Cc: Suraj Kandpal <[email protected]> Cc: Arun R Murthy <[email protected]> Cc: Lucas De Marchi <[email protected]> Cc: Rodrigo Vivi <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Nirmoy Das <[email protected]> (cherry picked from commit 3389153) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 5207c39 commit 609458a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

drivers/gpu/drm/xe/display/xe_hdcp_gsc.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,16 @@ void intel_hdcp_gsc_fini(struct xe_device *xe)
159159
{
160160
struct intel_hdcp_gsc_message *hdcp_message =
161161
xe->display.hdcp.hdcp_message;
162+
struct i915_hdcp_arbiter *arb = xe->display.hdcp.arbiter;
162163

163-
if (!hdcp_message)
164-
return;
164+
if (hdcp_message) {
165+
xe_bo_unpin_map_no_vm(hdcp_message->hdcp_bo);
166+
kfree(hdcp_message);
167+
xe->display.hdcp.hdcp_message = NULL;
168+
}
165169

166-
xe_bo_unpin_map_no_vm(hdcp_message->hdcp_bo);
167-
kfree(hdcp_message);
170+
kfree(arb);
171+
xe->display.hdcp.arbiter = NULL;
168172
}
169173

170174
static int xe_gsc_send_sync(struct xe_device *xe,

0 commit comments

Comments
 (0)