]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: fix 4-level paging if GMC supports 57-bit VA v2
authorChristian König <christian.koenig@amd.com>
Wed, 11 Feb 2026 12:28:55 +0000 (13:28 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Feb 2026 17:16:12 +0000 (12:16 -0500)
commitaa25c111a782e711d9eaad0adc3d5e086d175a29
tree498fc88af1fa6aafff80d5e4a5b4c9822d1b5428
parent096bb75e13cc508d3915b7604e356bcb12b17766
drm/amdgpu: fix 4-level paging if GMC supports 57-bit VA v2

It turned that using 4 level page tables on GMC generations which support
57bit VAs actually doesn't work at all.

Background is that the GMC actually can't switch between 4 and 5 levels,
but rather just uses a subset of address space when less than 5 levels are
selected.

Philip already removed the automatically switch to 4levels, now fix it as
well should it be enabled by module parameters.

v2: fix AMDGPU_GMC_HOLE_MASK as well, fix off by one issue pointed out
    by Philip

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Philip Yang <philip.yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h