]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/xe: Do clean shutdown also when using flr
authorJouni Högander <jouni.hogander@intel.com>
Fri, 31 Oct 2025 12:23:11 +0000 (14:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 09:37:23 +0000 (10:37 +0100)
[ Upstream commit b11a020d914c3b7628f56a9ea476a5b03679489b ]

Currently Xe driver is triggering flr without any clean-up on
shutdown. This is causing random warnings from pending related works as the
underlying hardware is reset in the middle of their execution.

Fix this by performing clean shutdown also when using flr.

Fixes: 501d799a47e2 ("drm/xe: Wire up device shutdown handler")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Maarten Lankhorst <dev@lankhorst.se>
Link: https://patch.msgid.link/20251031122312.1836534-1-jouni.hogander@intel.com
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
(cherry picked from commit a4ff26b7c8ef38e4dd34f77cbcd73576fdde6dd4)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_device.c

index 528e818edbd7f3c6654684e9226a501675601cec..107c1f48e87fc4658dce8a49d52dbf8f1d2e2450 100644 (file)
@@ -962,21 +962,21 @@ void xe_device_remove(struct xe_device *xe)
 
 void xe_device_shutdown(struct xe_device *xe)
 {
+       struct xe_gt *gt;
+       u8 id;
+
        drm_dbg(&xe->drm, "Shutting down device\n");
 
-       if (xe_driver_flr_disabled(xe)) {
-               struct xe_gt *gt;
-               u8 id;
+       xe_display_pm_shutdown(xe);
 
-               xe_display_pm_shutdown(xe);
+       xe_irq_suspend(xe);
 
-               xe_irq_suspend(xe);
+       for_each_gt(gt, xe, id)
+               xe_gt_shutdown(gt);
 
-               for_each_gt(gt, xe, id)
-                       xe_gt_shutdown(gt);
+       xe_display_pm_shutdown_late(xe);
 
-               xe_display_pm_shutdown_late(xe);
-       } else {
+       if (!xe_driver_flr_disabled(xe)) {
                /* BOOM! */
                __xe_driver_flr(xe);
        }