Skip to contentSkip to conversation

drm/amdgpu: Use real_vram_size in GDDR training BO placement

PATCH New Natalie Vock 1 participant 1 message Oct 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Use real_vram_size in GDDR training BO placement

Otherwise amdgpu.vramlimit breaks on GFX10.3 because the BO offset is out of bounds.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
index 3d620ec2937f4..b77c94178296e 100644
@@ -1798,7 +1798,7 @@ static void amdgpu_ttm_init_mem_train_resv_region(struct amdgpu_device *adev)
 		return;
 
 	reserve_size = adev->mman.resv_region[AMDGPU_RESV_FW].size;
-	offset = ALIGN((adev->gmc.mc_vram_size - reserve_size - SZ_1M), SZ_1M);
+	offset = ALIGN((adev->gmc.real_vram_size - reserve_size - SZ_1M), SZ_1M);
 	amdgpu_ttm_init_vram_resv(adev, AMDGPU_RESV_MEM_TRAIN,
 				  offset,
 				  GDDR6_MEM_TRAINING_DATA_SIZE_IN_BYTES,
Signature · 1 line
2.55.0