All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/7] Better handle memory pressure at suspend
@ 2023-10-06 18:50 Mario Limonciello
  2023-10-06 18:50 ` [PATCH v5 1/7] drm/amd: Evict resources during PM ops prepare() callback Mario Limonciello
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Mario Limonciello @ 2023-10-06 18:50 UTC (permalink / raw)
  To: amd-gfx; +Cc: Harry.Wentland, Mario Limonciello

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-10-09 14:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 18:50 [PATCH v5 0/7] Better handle memory pressure at suspend Mario Limonciello
2023-10-06 18:50 ` [PATCH v5 1/7] drm/amd: Evict resources during PM ops prepare() callback Mario Limonciello
2023-10-09  8:44   ` Christian König
2023-10-09 14:37   ` Alex Deucher
2023-10-06 18:50 ` [PATCH v5 2/7] drm/amd: Add concept of running prepare() sequence for IP blocks Mario Limonciello
2023-10-09  8:46   ` Christian König
2023-10-09 14:34   ` Alex Deucher
2023-10-06 18:50 ` [PATCH v5 3/7] drm/amd: Split up UVD suspend into prepare and suspend steps Mario Limonciello
2023-10-09 14:43   ` Alex Deucher
2023-10-06 18:50 ` [PATCH v5 4/7] drm/amd: Capture errors in amdgpu_switcheroo_set_state() Mario Limonciello
2023-10-09  9:06   ` Christian König
2023-10-06 18:50 ` [PATCH v5 5/7] drm/amd/display: Catch errors from drm_atomic_helper_suspend() Mario Limonciello
2023-10-09  9:06   ` Christian König
2023-10-09 14:44   ` Alex Deucher
2023-10-06 18:50 ` [PATCH v5 6/7] drm/amd/display: Destroy DC context while keeping DML and DML2 Mario Limonciello
2023-10-09 14:45   ` Alex Deucher
2023-10-06 18:50 ` [PATCH v5 7/7] drm/amd/display: make dc_set_power_state() return type `void` again Mario Limonciello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.