summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-09-12 23:39:52 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-09-12 23:39:52 +0000
commit27ae02be10b48a4da0c40897af0b2e82f0cb71ee (patch)
tree4cd99a3b65cbbe8bd50878f06553b4e4c33cae14
parenta7bdcf98ba0dd2c088bd2a6a9db2a057d561f5f4 (diff)
drm/amdgpu: Set no_hw_access when VF request full GPU fails
From Yifan Zha 077c7e5fee4b4b3fea29fd3a951a6b01f2802d9e in linux-6.6.y/6.6.51 33f23fc3155b13c4a96d94a0a22dc26db767440b in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
index 6852de86b43..f5292c6cbd6 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
@@ -137,8 +137,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;
}