summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pm.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2024-05-22 20:01:04 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2024-05-23 18:54:07 +0300
commit8d490e019b3b8da9cd9986d75b493ac3aa8d3269 (patch)
treef1239d567e5265136abd4e54b78433a43b2103fb /drivers/gpu/drm/xe/xe_pm.c
parente7b180b22022f52e3f5fca695cc75d63bddc5a1c (diff)
downloadlinux-8d490e019b3b8da9cd9986d75b493ac3aa8d3269.tar.xz
drm/xe: Stop checking for power_lost on D3Cold
GuC reset status is not reliable for this purpose and it is once in a while ending up in a situation of D3Cold, where power_reset is false and without the proper memory restoration the GuC reload and Display will fail to come back from D3Cold. So, let's do a full restoration of everything if we have a risk of losing power, without further optimizations. v2: also remove the gut_in_reset function (Anshuman) Cc: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-6-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pm.c')
-rw-r--r--drivers/gpu/drm/xe/xe_pm.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index a2f5a1b11cbf..de3b5df65e48 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -404,15 +404,7 @@ int xe_pm_runtime_resume(struct xe_device *xe)
lock_map_acquire(&xe_pm_runtime_lockdep_map);
- /*
- * It can be possible that xe has allowed d3cold but other pcie devices
- * in gfx card soc would have blocked d3cold, therefore card has not
- * really lost power. Detecting primary Gt power is sufficient.
- */
- gt = xe_device_get_gt(xe, 0);
- xe->d3cold.power_lost = xe_guc_in_reset(&gt->uc.guc);
-
- if (xe->d3cold.allowed && xe->d3cold.power_lost) {
+ if (xe->d3cold.allowed) {
err = xe_pcode_ready(xe, true);
if (err)
goto out;
@@ -433,7 +425,7 @@ int xe_pm_runtime_resume(struct xe_device *xe)
for_each_gt(gt, xe, id)
xe_gt_resume(gt);
- if (xe->d3cold.allowed && xe->d3cold.power_lost) {
+ if (xe->d3cold.allowed) {
xe_display_pm_resume(xe, true);
err = xe_bo_restore_user(xe);
if (err)