Skip to content

Commit 33f23fc

Browse files
Yifan Zhaalexdeucher
authored andcommitted
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 <Yifan.Zha@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 2262aca commit 33f23fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init)
8686

8787
if (virt->ops && virt->ops->req_full_gpu) {
8888
r = virt->ops->req_full_gpu(adev, init);
89-
if (r)
89+
if (r) {
90+
adev->no_hw_access = true;
9091
return r;
92+
}
9193

9294
adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME;
9395
}

0 commit comments

Comments
 (0)