]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd: Split up UVD suspend into prepare and suspend steps
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 6 Oct 2023 18:50:22 +0000 (13:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Oct 2023 15:01:04 +0000 (11:01 -0400)
commitdb9988906535aad9ab64f7e78ab7d52c0d0d2781
treef27f0e9c7ac1ae89fed525a48a6834abcdf36e35
parentcb11ca3233aa3303dc11dca25977d2e7f24be00f
drm/amd: Split up UVD suspend into prepare and suspend steps

amdgpu_uvd_suspend() allocates memory and copies objects into that
allocated memory.  This fails under memory pressure.  Instead move
majority of this code into a prepare step when swap can still be
allocated.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c