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://patchwork.freedesktop.org/patch/559270/ v1->v2: * Handle DC code too * Add prepare callback rather than moving symbol calls Mario Limonciello (3): drm/amd: Add support for prepare() callback drm/amd: Move evict resources suspend step to prepare() drm/amd/display: Destroy DC context while keeping DML drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32 +++++++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 ++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 25 --------------- .../gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++ 5 files changed, 41 insertions(+), 35 deletions(-) -- 2.34.1