]> git.hungrycats.org Git - linux/commit
drm/amdgpu: Fix incorrect VRAM GART mappings on non-4K page size systems
authorDonet Tom <donettom@linux.ibm.com>
Wed, 27 May 2026 13:19:31 +0000 (18:49 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 18:02:04 +0000 (14:02 -0400)
commita8f0bc22388f74e0cf4ed8b7d1846c580eaf44cc
treee07e4f92b45f2c879c3e26433c55424ba8170cb2
parentcd0e76a2f60e158534fddd0052e0ea8a6d50f247
drm/amdgpu: Fix incorrect VRAM GART mappings on non-4K page size systems

When mapping VRAM pages into the GART page table,
amdgpu_gart_map_vram_range() assumes that the system page size is the
same as the GPU page size.

On systems with non-4K page sizes, multiple GPU pages can exist within
a single CPU page. As a result, the mappings are created incorrectly
because fewer page table entries are programmed than required.

Fix this by programming the mappings correctly for non-4K page size
systems.

Fixes: 237d623ae659 ("drm/amdgpu/gart: Add helper to bind VRAM pages (v2)")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Donet Tom <donettom@linux.ibm.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c