aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
diff options
context:
space:
mode:
authorMario Limonciello <[email protected]>2023-10-06 18:50:22 +0000
committerAlex Deucher <[email protected]>2023-10-13 15:01:04 +0000
commitdb9988906535aad9ab64f7e78ab7d52c0d0d2781 (patch)
treef27f0e9c7ac1ae89fed525a48a6834abcdf36e35 /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
parentdrm/amd: Add concept of running prepare_suspend() sequence for IP blocks (diff)
downloadkernel-db9988906535aad9ab64f7e78ab7d52c0d0d2781.tar.gz
kernel-db9988906535aad9ab64f7e78ab7d52c0d0d2781.zip
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 <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
index 9f89bb7cd60b..a9f342537c68 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
@@ -74,6 +74,7 @@ struct amdgpu_uvd {
int amdgpu_uvd_sw_init(struct amdgpu_device *adev);
int amdgpu_uvd_sw_fini(struct amdgpu_device *adev);
int amdgpu_uvd_entity_init(struct amdgpu_device *adev);
+int amdgpu_uvd_prepare_suspend(struct amdgpu_device *adev);
int amdgpu_uvd_suspend(struct amdgpu_device *adev);
int amdgpu_uvd_resume(struct amdgpu_device *adev);
int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,