[PATCH v5 0/7] Better handle memory pressure at suspend
Mario Limonciello
mario.limonciello at amd.com
Fri Oct 6 18:50:19 UTC 2023
At suspend time if there is memory pressure then dynamically allocating
memory will cause failures that don't clean up properly when trying
suspend a second time.
Move the bigger memory allocations into Linux PM prepare() callback, drop
allocations that aren't really needed in DC code and report failures
in dm_suspend() up.
v1: https://lore.kernel.org/amd-gfx/20230925143359.14932-1-mario.limonciello@amd.com/
v2: https://lore.kernel.org/amd-gfx/20231002224449.95565-1-mario.limonciello@amd.com/T/#mc800319a05df821cd1875234b09bf212e2e3282b
v3: https://lore.kernel.org/amd-gfx/20231003205437.123426-1-mario.limonciello@amd.com/T/#m00a49b75cd2638bf8a0ebd549d6a6010bfb7328b
v4: https://lore.kernel.org/amd-gfx/20231004171838.168215-1-mario.limonciello@amd.com/T/#m0921840868295ec19abbe5ecbaa0aee75356b9e1
v4->v5:
* Call amdgpu_device_prepare() from other callers to amdgpu_device_suspend()
* 3x evict calls -> 2x evict calls
* Add IP block specific prepare path
* Fix issue in UVD
* Raise warnings for issues that could happen in amdgpu_switcheroo_set_state()
* Catch problem that could happen in dm_suspend()
* Rebase on top of DML2 series in amd-staging-drm-next
v3->v4:
* Combine patches 1/2
* Drop adev->in_suspend references
v2->v3:
* Handle adev->in_suspend in prepare() and complete()
* Add missing scratch variable in dc_resource_state_destruct()
* Revert error code propagation in same series
v1->v2:
* Handle DC code too
* Add prepare callback rather than moving symbol calls
Mario Limonciello (3):
drm/amd: Evict resources during PM ops prepare() callback
drm/amd/display: Destroy DC context while keeping DML
drm/amd/display: make dc_set_power_state() return type `void` again
Mario Limonciello (7):
drm/amd: Evict resources during PM ops prepare() callback
drm/amd: Add concept of running prepare() sequence for IP blocks
drm/amd: Split up UVD suspend into prepare and suspend steps
drm/amd: Capture errors in amdgpu_switcheroo_set_state()
drm/amd/display: Catch errors from drm_atomic_helper_suspend()
drm/amd/display: Destroy DC context while keeping DML and DML2
drm/amd/display: make dc_set_power_state() return type `void` again
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 75 ++++++++++++++++---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 12 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 +
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 9 +++
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 9 +++
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 9 +++
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 9 +++
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 9 +++
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 ++---
drivers/gpu/drm/amd/display/dc/core/dc.c | 43 +----------
.../gpu/drm/amd/display/dc/core/dc_resource.c | 12 +++
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
drivers/gpu/drm/amd/include/amd_shared.h | 1 +
15 files changed, 149 insertions(+), 72 deletions(-)
--
2.34.1
More information about the amd-gfx
mailing list