Skip to content

Commit eb0578e

Browse files
Yifan Zhasmb49
authored andcommitted
drm/amdgpu: Set no_hw_access when VF request full GPU fails
BugLink: https://bugs.launchpad.net/bugs/2081279 [ Upstream commit 33f23fc ] [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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 5b06b06 commit eb0578e

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
@@ -122,8 +122,10 @@ int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init)
122122

123123
if (virt->ops && virt->ops->req_full_gpu) {
124124
r = virt->ops->req_full_gpu(adev, init);
125-
if (r)
125+
if (r) {
126+
adev->no_hw_access = true;
126127
return r;
128+
}
127129

128130
adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME;
129131
}

0 commit comments

Comments
 (0)