Skip to content

Commit a06a7b3

Browse files
dceraolorodrigovivi
authored andcommitted
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: Daniele 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: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240815230541.3828206-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 5a891a0) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 8636a5c commit a06a7b3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/xe/xe_gsc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ int xe_gsc_init(struct xe_gsc *gsc)
437437
return ret;
438438
}
439439

440-
static void free_resources(struct drm_device *drm, void *arg)
440+
static void free_resources(void *arg)
441441
{
442442
struct xe_gsc *gsc = arg;
443443

@@ -501,7 +501,7 @@ int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc)
501501
gsc->q = q;
502502
gsc->wq = wq;
503503

504-
err = drmm_add_action_or_reset(&xe->drm, free_resources, gsc);
504+
err = devm_add_action_or_reset(xe->drm.dev, free_resources, gsc);
505505
if (err)
506506
return err;
507507

drivers/gpu/drm/xe/xe_guc_submit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static void guc_submit_fini(struct drm_device *drm, void *arg)
284284
free_submit_wq(guc);
285285
}
286286

287-
static void guc_submit_wedged_fini(struct drm_device *drm, void *arg)
287+
static void guc_submit_wedged_fini(void *arg)
288288
{
289289
struct xe_guc *guc = arg;
290290
struct xe_exec_queue *q;
@@ -877,7 +877,7 @@ void xe_guc_submit_wedge(struct xe_guc *guc)
877877

878878
xe_gt_assert(guc_to_gt(guc), guc_to_xe(guc)->wedged.mode);
879879

880-
err = drmm_add_action_or_reset(&guc_to_xe(guc)->drm,
880+
err = devm_add_action_or_reset(guc_to_xe(guc)->drm.dev,
881881
guc_submit_wedged_fini, guc);
882882
if (err) {
883883
drm_err(&xe->drm, "Failed to register xe_guc_submit clean-up on wedged.mode=2. Although device is wedged.\n");

0 commit comments

Comments
 (0)