drm/amdgpu: Set no_hw_access when VF request full GPU fails
authorjsg <jsg@openbsd.org>
Thu, 12 Sep 2024 23:39:51 +0000 (23:39 +0000)
committerjsg <jsg@openbsd.org>
Thu, 12 Sep 2024 23:39:51 +0000 (23:39 +0000)
From Yifan Zha
077c7e5fee4b4b3fea29fd3a951a6b01f2802d9e in linux-6.6.y/6.6.51
33f23fc3155b13c4a96d94a0a22dc26db767440b in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c

index 6852de8..f5292c6 100644 (file)
@@ -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;
        }