diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-08-05 02:31:15 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-08-05 02:31:15 +0000 |
commit | 4f861ea9a4f26f21173b26f43f42e0b30f164982 (patch) | |
tree | 6467485bcac6b75566d5660166990900cc5ec364 /sys | |
parent | e215bac181ed078bf58015298ad234de41539eaf (diff) |
drm/amdgpu: Fix memory range calculation
From Lijo Lazar
ae1dd0a379e41db7d4773880e6918948668ef3ad in linux-6.6.y/6.6.44
ce798376ef6764de51d8f4684ae525b55df295fa in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |