AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Mario Limonciello (AMD)" <superm1@kernel.org>
To: amd-gfx@lists.freedesktop.org
Cc: "Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: [PATCH v5 0/5] Unwind failed suspend
Date: Sat, 25 Oct 2025 23:29:35 -0500	[thread overview]
Message-ID: <20251026042942.549389-1-superm1@kernel.org> (raw)

If a suspend fails the PM core doesn't clean it up, the device
is just left in a bad state.  If this happens during memory pressure
it could be a hung system from just trying to suspend.

For all phases of suspend that return an error code, add an unwind
flow that will (try to) resume exactly the parts that have failed.

If this fails, then reset the GPU during complete() callback.

v5:
 * Take RLC patch from Alex's Van Gogh series, slight modifications
 * Unwind in middle of IP suspend too
 * Fix missing call to fix console
 * Cover issues with DPM_FLAG_SMART_SUSPEND

Alex Deucher (1):
  drm/amdgpu: Drop PMFW RLC notifier from amdgpu_device_suspend()

Mario Limonciello (AMD) (3):
  drm/amd: Reset the GPU if pmops failed
  drm/amd: Add an unwind for failures in
    amdgpu_device_ip_suspend_phase1()
  drm/amd: Add an unwind for failures in
    amdgpu_device_ip_suspend_phase2()
  drm/amd: Unwind for failed device suspend

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 121 ++++++++++++++++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    |  11 ++
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c        |  18 ---
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h    |   2 -
 4 files changed, 117 insertions(+), 35 deletions(-)

-- 
2.51.1


             reply	other threads:[~2025-10-26  4:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-26  4:29 Mario Limonciello (AMD) [this message]
2025-10-26  4:29 ` [PATCH v5 1/5] drm/amdgpu: Drop PMFW RLC notifier from amdgpu_device_suspend() Mario Limonciello (AMD)
2025-10-31 12:01   ` Antheas Kapenekakis
2025-10-31 12:59     ` Mario Limonciello (AMD) (kernel.org)
2025-10-26  4:29 ` [PATCH v5 2/5] drm/amd: Add an unwind for failures in amdgpu_device_ip_suspend_phase1() Mario Limonciello (AMD)
2025-10-30 15:14   ` Alex Deucher
2025-10-30 15:16     ` Mario Limonciello (AMD) (kernel.org)
2025-10-30 15:18       ` Alex Deucher
2025-10-30 15:20         ` Mario Limonciello (AMD) (kernel.org)
2025-10-26  4:29 ` [PATCH v5 3/5] drm/amd: Add an unwind for failures in amdgpu_device_ip_suspend_phase2() Mario Limonciello (AMD)
2025-10-26  4:29 ` [PATCH v5 4/5] drm/amd: Unwind for failed device suspend Mario Limonciello (AMD)
2025-10-26  4:29 ` [PATCH v5 5/5] drm/amd: Reset the GPU if pmops failed Mario Limonciello (AMD)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251026042942.549389-1-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox