diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index 6738df836a70..0f227cf7a67c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | |||
@@ -24,6 +24,14 @@ | |||
24 | #include "amdgpu.h" | 24 | #include "amdgpu.h" |
25 | #define MAX_KIQ_REG_WAIT 100000000 /* in usecs */ | 25 | #define MAX_KIQ_REG_WAIT 100000000 /* in usecs */ |
26 | 26 | ||
27 | bool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev) | ||
28 | { | ||
29 | /* By now all MMIO pages except mailbox are blocked */ | ||
30 | /* if blocking is enabled in hypervisor. Choose the */ | ||
31 | /* SCRATCH_REG0 to test. */ | ||
32 | return RREG32_NO_KIQ(0xc040) == 0xffffffff; | ||
33 | } | ||
34 | |||
27 | int amdgpu_allocate_static_csa(struct amdgpu_device *adev) | 35 | int amdgpu_allocate_static_csa(struct amdgpu_device *adev) |
28 | { | 36 | { |
29 | int r; | 37 | int r; |