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)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 May 2025 14:56:23 +0000 (10:56 -0400)
commit4d2f6b4e4c7ed32e7fa39fcea37344a9eab99094
tree7015656769f2d968e503b6d01a4d3698f9bde674
parentbf394d28548c3c0a01e113fdef20ddb6cd2df106
drm/amdgpu: amdgpu_vram_mgr_new(): Clamp lpfn to total vram

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
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c