diff options
author | Matthew Auld <matthew.auld@intel.com> | 2023-08-24 17:04:45 +0100 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:40:28 -0500 |
commit | 1da0702c1701c2e1441d86facd9fbb5e73fa374b (patch) | |
tree | 9565b84cfc62ba9a928e683770de2b20b19aa158 /drivers/gpu/drm/xe/xe_guc_pc.c | |
parent | 9c0d779fc67bd1810f74c22e219f4af24a4e1e29 (diff) |
drm/xe: nuke GuC on unload
On PVC unloading followed by reloading the module often results in a
completely dead machine (seems to be plaguing CI). Resetting the GuC
like we do at load seems to cure it at least when locally testing this.
v2:
- Move pc_fini into guc_fini. We want to do the GuC reset just after
calling pc_fini, otherwise we encounter communication failures. It
also seems like a good idea to do the reset before we start releasing
the various other GuC resources. In the case of pc_fini there is an
explicit stop, but for other stuff like logs, ads, ctb there is not.
References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/542
References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/597
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc_pc.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_guc_pc.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index c03bb58e7049..87de1ce40e07 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -884,10 +884,8 @@ out: return ret; } -static void pc_fini(struct drm_device *drm, void *arg) +void xe_guc_pc_fini(struct xe_guc_pc *pc) { - struct xe_guc_pc *pc = arg; - XE_WARN_ON(xe_guc_pc_gucrc_disable(pc)); XE_WARN_ON(xe_guc_pc_stop(pc)); sysfs_remove_files(pc_to_gt(pc)->sysfs, pc_attrs); @@ -925,9 +923,5 @@ int xe_guc_pc_init(struct xe_guc_pc *pc) if (err) return err; - err = drmm_add_action_or_reset(&xe->drm, pc_fini, pc); - if (err) - return err; - return 0; } |