diff options
| author | Matthew Auld <matthew.auld@intel.com> | 2024-05-22 11:21:49 +0100 |
|---|---|---|
| committer | Matthew Auld <matthew.auld@intel.com> | 2024-05-22 13:22:39 +0100 |
| commit | c9f422de07b1c62ab6da0a240802ac24efe26dc4 (patch) | |
| tree | cfdae3c9d9ca068a50e79181699b9ed13414b07e | |
| parent | 19fa7aa4d235cd21b1c62977b2e8d6331976286f (diff) | |
| download | linux-c9f422de07b1c62ab6da0a240802ac24efe26dc4.tar.gz linux-c9f422de07b1c62ab6da0a240802ac24efe26dc4.zip | |
drm/xe/guc_pc: move pc_fini to devm
Here we are touching the HW/GuC and presumably this should happen when
the device is removed. Currently if you hotunplug the device this is
skipped if there is already open driver instance.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-24-matthew.auld@intel.com
| -rw-r--r-- | drivers/gpu/drm/xe/xe_guc_pc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index d10aab29651e..14af348aecf2 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -890,10 +890,9 @@ int xe_guc_pc_stop(struct xe_guc_pc *pc) /** * xe_guc_pc_fini - Finalize GuC's Power Conservation component - * @drm: DRM device * @arg: opaque pointer that should point to Xe_GuC_PC instance */ -static void xe_guc_pc_fini(struct drm_device *drm, void *arg) +static void xe_guc_pc_fini(void *arg) { struct xe_guc_pc *pc = arg; struct xe_device *xe = pc_to_xe(pc); @@ -941,5 +940,5 @@ int xe_guc_pc_init(struct xe_guc_pc *pc) pc->bo = bo; - return drmm_add_action_or_reset(&xe->drm, xe_guc_pc_fini, pc); + return devm_add_action_or_reset(xe->drm.dev, xe_guc_pc_fini, pc); } |
