Skip to content

Commit

Permalink
drm/xe/display/xe_hdcp_gsc: Free arbiter on driver removal
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nirmoy committed Jul 10, 2024
1 parent ea74bf9 commit 3389153
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/gpu/drm/xe/display/xe_hdcp_gsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,16 @@ void intel_hdcp_gsc_fini(struct xe_device *xe)
{
struct intel_hdcp_gsc_message *hdcp_message =
xe->display.hdcp.hdcp_message;
struct i915_hdcp_arbiter *arb = xe->display.hdcp.arbiter;

if (!hdcp_message)
return;
if (hdcp_message) {
xe_bo_unpin_map_no_vm(hdcp_message->hdcp_bo);
kfree(hdcp_message);
xe->display.hdcp.hdcp_message = NULL;
}

xe_bo_unpin_map_no_vm(hdcp_message->hdcp_bo);
kfree(hdcp_message);
kfree(arb);
xe->display.hdcp.arbiter = NULL;
}

static int xe_gsc_send_sync(struct xe_device *xe,
Expand Down

0 comments on commit 3389153

Please sign in to comment.