Commit a26198f1 authored by Le Ma's avatar Le Ma Committed by Alex Deucher
Browse files

drm/amdgpu: reserve umf hole size at vram high end for gfx v12.1



This region is reserved by firmware thus carve it out in driver.

v2: set reserve size based on aid configuration.

Signed-off-by: default avatarLe Ma <le.ma@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent af26fa75
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1835,7 +1835,13 @@ static int amdgpu_ttm_reserve_tmr(struct amdgpu_device *adev)
	     amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 4) ||
	     amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 5, 0)))
		reserve_size = max(reserve_size, (uint32_t)280 << 20);
	else if (!reserve_size)
	else if (!adev->bios && 
		 amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 1, 0)) {
		if (hweight32(adev->aid_mask) == 1)
			reserve_size = max(reserve_size, (uint32_t)128 << 20);
		else
			reserve_size = max(reserve_size, (uint32_t)144 << 20);
	} else if (!reserve_size)
		reserve_size = DISCOVERY_TMR_OFFSET;

	if (mem_train_support) {