aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorSurbhi Kakarya <[email protected]>2023-09-25 16:12:10 +0000
committerAlex Deucher <[email protected]>2023-11-07 16:15:37 +0000
commit9256e8d47a2fa0bcb5d32e7fee8c674c476a480f (patch)
tree3f1a1b9a99282664f3a158197cafeac5e5d911fc /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parentMerge tag 'amd-drm-next-6.7-2023-11-03' of https://gitlab.freedesktop.org/agd... (diff)
downloadkernel-9256e8d47a2fa0bcb5d32e7fee8c674c476a480f.tar.gz
kernel-9256e8d47a2fa0bcb5d32e7fee8c674c476a480f.zip
drm/amd: Disable XNACK on SRIOV environment
The purpose of this patch is to disable XNACK or set XNACK OFF mode on SRIOV platform which doesn't support it. This will prevent user-space application to fail or result into unexpected behaviour whenever the application need to run test-case in XNACK ON mode. Signed-off-by: Surbhi Kakarya <[email protected]> Reviewed-by: Shaoyun Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index a0aa624f5a92..f7d1d356ecdd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -1093,3 +1093,13 @@ u32 amdgpu_sriov_rreg(struct amdgpu_device *adev,
else
return RREG32(offset);
}
+
+bool amdgpu_sriov_xnack_support(struct amdgpu_device *adev)
+{
+ bool xnack_mode = true;
+
+ if (amdgpu_sriov_vf(adev) && adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2))
+ xnack_mode = false;
+
+ return xnack_mode;
+}