summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiana Tauro <riana.tauro@intel.com>2025-08-26 12:04:10 +0530
committerRodrigo Vivi <rodrigo.vivi@intel.com>2025-08-26 10:11:34 -0400
commit90fdcf5f89e9288c153923f16a60e6f7da18ba76 (patch)
tree305f8220d178402a13c5f76f702ab516769f2e18
parent9c857a9d84e01332d031b55c4e38a66daecbae73 (diff)
drm/xe: Set GT as wedged before sending wedged uevent
Userspace should be notified after setting the device as wedged. Re-order function calls to set gt wedged before sending uevent. Cc: Matthew Brost <matthew.brost@intel.com> Suggested-by: Raag Jadav <raag.jadav@intel.com> Signed-off-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/20250826063419.3022216-4-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_device.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 6f7f551bd263..bc8be6fbd2e8 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1180,8 +1180,10 @@ static void xe_device_wedged_fini(struct drm_device *drm, void *arg)
* xe_device_declare_wedged - Declare device wedged
* @xe: xe device instance
*
- * This is a final state that can only be cleared with a module
+ * This is a final state that can only be cleared with the recovery method
+ * specified in the drm wedged uevent. The default recovery method is
* re-probe (unbind + bind).
+ *
* In this state every IOCTL will be blocked so the GT cannot be used.
* In general it will be called upon any critical error such as gt reset
* failure or guc loading failure. Userspace will be notified of this state
@@ -1215,13 +1217,15 @@ void xe_device_declare_wedged(struct xe_device *xe)
"IOCTLs and executions are blocked. Only a rebind may clear the failure\n"
"Please file a _new_ bug report at https://gitlab.freedesktop.org/drm/xe/kernel/issues/new\n",
dev_name(xe->drm.dev));
+ }
+
+ for_each_gt(gt, xe, id)
+ xe_gt_declare_wedged(gt);
+ if (xe_device_wedged(xe)) {
/* Notify userspace of wedged device */
drm_dev_wedged_event(&xe->drm,
DRM_WEDGE_RECOVERY_REBIND | DRM_WEDGE_RECOVERY_BUS_RESET,
NULL);
}
-
- for_each_gt(gt, xe, id)
- xe_gt_declare_wedged(gt);
}