Skip to contentSkip to conversation

drm/amdgpu remove restriction of sriov max_pfn on Vega10

PATCH In review Lin.Cao 2 participants 2 messages Oct 18, 2023

Subsystems (2)
lore
Share & tools
lore

Lin.Cao

author
#0 lore raw

PATCH 1/1 drm/amdgpu remove restriction of sriov max_pfn on Vega10

Remove restriction of sriov max_pfn so that TBA and TMA can move to high 47 bits address.

Regression test: change range alloc flag of libdrm as AMDGPU_VA_RANGE_HIGH and there is no flr occur when testing amdgpu_test of drm.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -5
index 3a1050344b59..b1eb81ca64bc 100644
@@ -2023,11 +2023,8 @@ static int gmc_v9_0_sw_init(void *handle)
 		 * vm size is 256TB (48bit), maximum size of Vega10,
 		 * block size 512 (9bit)
 		 */
-		/* sriov restrict max_pfn below AMDGPU_GMC_HOLE */
-		if (amdgpu_sriov_vf(adev))
-			amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 47);
-		else
-			amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
+
+		amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
 		if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2))
 			adev->gmc.translate_further = adev->vm_manager.num_level > 1;
 		break;
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw

Am 18.10.23 um 04:39 schrieb Lin.Cao:

Quoted 8 lines

Remove restriction of sriov max_pfn so that TBA and TMA can move to high 47 bits address.

Regression test: change range alloc flag of libdrm as AMDGPU_VA_RANGE_HIGH and there is no flr occur when testing amdgpu_test of drm.

Quoted 22 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -5
index 3a1050344b59..b1eb81ca64bc 100644
@@ -2023,11 +2023,8 @@ static int gmc_v9_0_sw_init(void *handle)
  		 * vm size is 256TB (48bit), maximum size of Vega10,
  		 * block size 512 (9bit)
  		 */
-		/* sriov restrict max_pfn below AMDGPU_GMC_HOLE */
-		if (amdgpu_sriov_vf(adev))
-			amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 47);
-		else
-			amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
+
+		amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
  		if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2))
  			adev->gmc.translate_further = adev->vm_manager.num_level > 1;
  		break;