]> git.ipfire.org Git - thirdparty/linux.git/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:57:36 +0000 (14:57 -0400)
commitec4c462e2d8161b32038e21e7187f4a15fe1661d
tree398d55d6e07d93c3143812d94c9b8501df7ae3d7
parent14ad7e1e6e2cd44f866e2dbb3f6a2b2f4a39b96d
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>
(cherry picked from commit a8f0bc22388f74e0cf4ed8b7d1846c580eaf44cc)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c