From 9456895c71591766d462c64be08bceb39a0ea348 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 5 Aug 2024 02:31:14 +0000 Subject: [PATCH] drm/amdgpu: Fix memory range calculation From Lijo Lazar ae1dd0a379e41db7d4773880e6918948668ef3ad in linux-6.6.y/6.6.44 ce798376ef6764de51d8f4684ae525b55df295fa in mainline linux --- sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c b/sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c index b53ac677bcb..77f085ea347 100644 --- a/sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c @@ -1956,7 +1956,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.20.1