[PATCH v4 0/3] Better handle memory pressure at suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 and
drop allocations that aren't really needed in DC code.

v1: https://lore.kernel.org/amd-gfx/20230925143359.14932-1-mario.limonciello@xxxxxxx/
v2: https://lore.kernel.org/amd-gfx/20231002224449.95565-1-mario.limonciello@xxxxxxx/T/#mc800319a05df821cd1875234b09bf212e2e3282b
v3: https://lore.kernel.org/amd-gfx/20231003205437.123426-1-mario.limonciello@xxxxxxx/T/#m00a49b75cd2638bf8a0ebd549d6a6010bfb7328b

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

 drivers/gpu/drm/amd/amdgpu/amdgpu.h           |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    | 26 +++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  7 +++--
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++-------
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 31 ++-----------------
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 12 +++++++
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 7 files changed, 50 insertions(+), 46 deletions(-)

-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux