]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: amdgpu_vram_mgr_new(): Clamp lpfn to total vram
authorJohn Olender <john.olender@gmail.com>
Tue, 29 Apr 2025 11:24:28 +0000 (07:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 09:00:15 +0000 (11:00 +0200)
commita8ceffaeb780da40dc722e92a6476c309688f426
treebfe5ac0d1d2657c0e15a4b168b06f5e151a2fba2
parent5148c7ea69e9c5bf2f05081190f45ba96d3d1e7a
drm/amdgpu: amdgpu_vram_mgr_new(): Clamp lpfn to total vram

commit 4d2f6b4e4c7ed32e7fa39fcea37344a9eab99094 upstream.

The drm_mm allocator tolerated being passed end > mm->size, but the
drm_buddy allocator does not.

Restore the pre-buddy-allocator behavior of allowing such placements.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3448
Signed-off-by: John Olender <john.olender@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c