[PATCH 08/20] drm/xe/guc_pc: move pc_fini to devm
Matthew Auld
matthew.auld at intel.com
Fri May 10 18:12:21 UTC 2024
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 at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>
---
drivers/gpu/drm/xe/xe_guc_pc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
index d10aab29651e..4164dab1ab66 100644
--- a/drivers/gpu/drm/xe/xe_guc_pc.c
+++ b/drivers/gpu/drm/xe/xe_guc_pc.c
@@ -893,7 +893,7 @@ int xe_guc_pc_stop(struct xe_guc_pc *pc)
* @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 +941,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);
}
--
2.45.0
More information about the Intel-xe
mailing list