aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Zha <[email protected]>2024-06-27 07:06:23 +0000
committerAlex Deucher <[email protected]>2024-07-08 20:46:56 +0000
commit33f23fc3155b13c4a96d94a0a22dc26db767440b (patch)
tree3c2fc11fa4203897e48153fe3906e5b0b2eeaa36
parentdrm/amdgpu: add print support for gfx12 ipdump (diff)
downloadkernel-33f23fc3155b13c4a96d94a0a22dc26db767440b.tar.gz
kernel-33f23fc3155b13c4a96d94a0a22dc26db767440b.zip
drm/amdgpu: Set no_hw_access when VF request full GPU fails
[Why] If VF request full GPU access and the request failed, the VF driver can get stuck accessing registers for an extended period during the unload of KMS. [How] Set no_hw_access flag when VF request for full GPU access fails This prevents further hardware access attempts, avoiding the prolonged stuck state. Signed-off-by: Yifan Zha <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index ccb3d041c2b2..111c380f929b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -86,8 +86,10 @@ int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init)
if (virt->ops && virt->ops->req_full_gpu) {
r = virt->ops->req_full_gpu(adev, init);
- if (r)
+ if (r) {
+ adev->no_hw_access = true;
return r;
+ }
adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME;
}