]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/xe: Ensure GT is in C0 during resumes
authorXin Wang <x.wang@intel.com>
Wed, 27 Aug 2025 00:06:33 +0000 (17:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:07 +0000 (15:37 -0500)
[ Upstream commit 95d0883ac8105717f59c2dcdc0d8b9150f13aa12 ]

This patch ensures the gt will be awake for the entire duration
of the resume sequences until GuCRC takes over and GT-C6 gets
re-enabled.

Before suspending GT-C6 is kept enabled, but upon resume, GuCRC
is not yet alive to properly control the exits and some cases of
instability and corruption related to GT-C6 can be observed.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4037
Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Xin Wang <x.wang@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4037
Link: https://lore.kernel.org/r/20250827000633.1369890-3-x.wang@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/xe_pm.c

index 3e301e42b2f19917e51f4e764ed66ae9237ef15a..9fccc7a855f3071f14d11659c4e8e68a02dfe4b6 100644 (file)
@@ -18,7 +18,7 @@
 #include "xe_device.h"
 #include "xe_ggtt.h"
 #include "xe_gt.h"
-#include "xe_guc.h"
+#include "xe_gt_idle.h"
 #include "xe_i2c.h"
 #include "xe_irq.h"
 #include "xe_pcode.h"
@@ -177,6 +177,9 @@ int xe_pm_resume(struct xe_device *xe)
        drm_dbg(&xe->drm, "Resuming device\n");
        trace_xe_pm_resume(xe, __builtin_return_address(0));
 
+       for_each_gt(gt, xe, id)
+               xe_gt_idle_disable_c6(gt);
+
        for_each_tile(tile, xe, id)
                xe_wa_apply_tile_workarounds(tile);
 
@@ -547,6 +550,9 @@ int xe_pm_runtime_resume(struct xe_device *xe)
 
        xe_rpm_lockmap_acquire(xe);
 
+       for_each_gt(gt, xe, id)
+               xe_gt_idle_disable_c6(gt);
+
        if (xe->d3cold.allowed) {
                err = xe_pcode_ready(xe, true);
                if (err)