Commit 5a891a0e authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by Lucas De Marchi

drm/xe/uc: Use devm to register cleanup that includes exec_queues

Exec_queue cleanup requires HW access, so we need to use devm instead of
drmm for it.
Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240815230541.3828206-2-lucas.demarchi@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent 2e5d47fe
...@@ -437,7 +437,7 @@ int xe_gsc_init(struct xe_gsc *gsc) ...@@ -437,7 +437,7 @@ int xe_gsc_init(struct xe_gsc *gsc)
return ret; return ret;
} }
static void free_resources(struct drm_device *drm, void *arg) static void free_resources(void *arg)
{ {
struct xe_gsc *gsc = arg; struct xe_gsc *gsc = arg;
...@@ -495,7 +495,7 @@ int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc) ...@@ -495,7 +495,7 @@ int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc)
gsc->q = q; gsc->q = q;
gsc->wq = wq; gsc->wq = wq;
err = drmm_add_action_or_reset(&xe->drm, free_resources, gsc); err = devm_add_action_or_reset(xe->drm.dev, free_resources, gsc);
if (err) if (err)
return err; return err;
......
...@@ -284,7 +284,7 @@ static void guc_submit_fini(struct drm_device *drm, void *arg) ...@@ -284,7 +284,7 @@ static void guc_submit_fini(struct drm_device *drm, void *arg)
free_submit_wq(guc); free_submit_wq(guc);
} }
static void guc_submit_wedged_fini(struct drm_device *drm, void *arg) static void guc_submit_wedged_fini(void *arg)
{ {
struct xe_guc *guc = arg; struct xe_guc *guc = arg;
struct xe_exec_queue *q; struct xe_exec_queue *q;
...@@ -877,7 +877,7 @@ void xe_guc_submit_wedge(struct xe_guc *guc) ...@@ -877,7 +877,7 @@ void xe_guc_submit_wedge(struct xe_guc *guc)
xe_gt_assert(guc_to_gt(guc), guc_to_xe(guc)->wedged.mode); xe_gt_assert(guc_to_gt(guc), guc_to_xe(guc)->wedged.mode);
err = drmm_add_action_or_reset(&guc_to_xe(guc)->drm, err = devm_add_action_or_reset(guc_to_xe(guc)->drm.dev,
guc_submit_wedged_fini, guc); guc_submit_wedged_fini, guc);
if (err) { if (err) {
drm_err(&xe->drm, "Failed to register xe_guc_submit clean-up on wedged.mode=2. Although device is wedged.\n"); drm_err(&xe->drm, "Failed to register xe_guc_submit clean-up on wedged.mode=2. Although device is wedged.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment