[RFC 20/34] drm/xe: Stop checking for power_lost on D3Cold
Rodrigo Vivi
rodrigo.vivi at intel.com
Fri Jan 26 20:30:29 UTC 2024
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.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
drivers/gpu/drm/xe/xe_device_types.h | 3 ---
drivers/gpu/drm/xe/xe_pm.c | 12 ++----------
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index eb2b806a1d23..6914cab9191d 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -431,9 +431,6 @@ struct xe_device {
/** @d3cold.allowed: Indicates if d3cold is a valid device state */
bool allowed;
- /** @d3cold.power_lost: Indicates if card has really lost power. */
- bool power_lost;
-
/**
* @d3cold.vram_threshold:
*
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index f49e449d9fb7..8bec1f175c9d 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -331,15 +331,7 @@ int xe_pm_runtime_resume(struct xe_device *xe)
/* Disable access_ongoing asserts and prevent recursive pm calls */
xe_pm_write_callback_task(xe, current);
- /*
- * 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(>->uc.guc);
-
- if (xe->d3cold.allowed && xe->d3cold.power_lost) {
+ if (xe->d3cold.allowed) {
for_each_gt(gt, xe, id) {
err = xe_pcode_init(gt);
if (err)
@@ -362,7 +354,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) {
err = xe_bo_restore_user(xe);
if (err)
goto out;
--
2.43.0
More information about the Intel-xe
mailing list