[PATCH 1/3] drm/amdgpu: Fix memory range calculation
Lijo Lazar
lijo.lazar at amd.com
Tue May 14 08:36:24 UTC 2024
Consider the 16M reserved region also before range calculation for GMC
9.4.3 SOCs.
Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
Acked-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Le Ma <le.ma at amd.com>
Fixes: a433f1f59484 ("drm/amdgpu: Initialize memory ranges for GC 9.4.3")
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 671a6766df5b..7c4e2adae7b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1918,7 +1918,7 @@ gmc_v9_0_init_sw_mem_ranges(struct amdgpu_device *adev,
break;
}
- size = adev->gmc.real_vram_size >> AMDGPU_GPU_PAGE_SHIFT;
+ size = (adev->gmc.real_vram_size + SZ_16M) >> AMDGPU_GPU_PAGE_SHIFT;
size /= adev->gmc.num_mem_partitions;
for (i = 0; i < adev->gmc.num_mem_partitions; ++i) {
--
2.25.1
More information about the amd-gfx
mailing list