drm/amdgpu: Fix the logic for NPS request failure
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 17 Oct 2024 09:02:12 +0000 (14:32 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 24 Oct 2024 22:04:59 +0000 (18:04 -0400)
commitd37bc6a4ed252083c8f883597389e7f33ad8b670
tree14289773d95810c2f32dea8b090a4059e0c7c7f4
parentb6890efb597a19cc8bb45e0c2375292fd1f338de
drm/amdgpu: Fix the logic for NPS request failure

On a hive, NPS request is placed by the first one for all devices in the
hive. If the request fails, mark the mode as UNKNOWN so that subsequent
devices on unload don't request it. Also, fix the mutex double lock
issue in error condition, should have been mutex_unlock.

Fixes: ee52489d1210 ("drm/amdgpu: Place NPS mode request on unload")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c