summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2023-03-07 10:36:08 +0530
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 09:57:50 -0400
commitb6b85c8b43a85988ecd06f039f8f90c041842812 (patch)
tree0aecfbe22888592d3a352d655303d033ab2431fe /drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
parentf9632096be49ed31e86541e3e79960e21e8f1578 (diff)
downloadlinux-b6b85c8b43a85988ecd06f039f8f90c041842812.tar.gz
linux-b6b85c8b43a85988ecd06f039f8f90c041842812.tar.bz2
linux-b6b85c8b43a85988ecd06f039f8f90c041842812.zip
drm/amdgpu: Return error on invalid compute mode
Return error if an invalid compute partition mode is requested. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index 81ab3cd2f229..d0ddcd751432 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -1933,7 +1933,11 @@ static int gfx_v9_4_3_cp_resume(struct amdgpu_device *adev)
if (amdgpu_xcp_query_partition_mode(adev->xcp_mgr,
AMDGPU_XCP_FL_NONE) ==
AMDGPU_UNKNOWN_COMPUTE_PARTITION_MODE)
- amdgpu_xcp_switch_partition_mode(adev->xcp_mgr, amdgpu_user_partt_mode);
+ r = amdgpu_xcp_switch_partition_mode(adev->xcp_mgr,
+ amdgpu_user_partt_mode);
+
+ if (r)
+ return r;
num_xcc = NUM_XCC(adev->gfx.xcc_mask);
for (i = 0; i < num_xcc; i++) {