Commit 33f23fc3 authored by Yifan Zha's avatar Yifan Zha Committed by Alex Deucher

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: default avatarYifan Zha <Yifan.Zha@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2262acad
...@@ -86,8 +86,10 @@ int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init) ...@@ -86,8 +86,10 @@ int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init)
if (virt->ops && virt->ops->req_full_gpu) { if (virt->ops && virt->ops->req_full_gpu) {
r = virt->ops->req_full_gpu(adev, init); r = virt->ops->req_full_gpu(adev, init);
if (r) if (r) {
adev->no_hw_access = true;
return r; return r;
}
adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME; adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment