aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorSunil Khatri <sunil.khatri@amd.com>2024-10-17 19:17:22 +0530
committerAlex Deucher <alexander.deucher@amd.com>2024-10-22 17:50:39 -0400
commite095026f0066eca05268b20a6f378cf31bedc54b (patch)
treeea958eefac83c657404dccf764bea116a4db3b35 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentdrm/amdgpu: validate hw_fini before function call (diff)
downloadlinux-rng-e095026f0066eca05268b20a6f378cf31bedc54b.tar.xz
linux-rng-e095026f0066eca05268b20a6f378cf31bedc54b.zip
drm/amdgpu: validate suspend before function call
Before making a function call to suspend, validate the function pointer like we do in sw_init. Use the helper function amdgpu_ip_block_suspend where same checks and calls are repeated. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 565b0cedd88d..9c93d0a47904 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -363,6 +363,7 @@ int amdgpu_device_ip_wait_for_idle(struct amdgpu_device *adev,
enum amd_ip_block_type block_type);
bool amdgpu_device_ip_is_valid(struct amdgpu_device *adev,
enum amd_ip_block_type block_type);
+int amdgpu_ip_block_suspend(struct amdgpu_ip_block *ip_block);
#define AMDGPU_MAX_IP_NUM 16