drm/amdgpu: validate suspend before function call
authorSunil Khatri <sunil.khatri@amd.com>
Thu, 17 Oct 2024 13:47:22 +0000 (19:17 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Oct 2024 21:50:39 +0000 (17:50 -0400)
commite095026f0066eca05268b20a6f378cf31bedc54b
treeea958eefac83c657404dccf764bea116a4db3b35
parentdad01f93f432d4a2456860f7f55fdb762d2982a4
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>
drivers/gpu/drm/amd/amdgpu/aldebaran.c
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c
drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c