drm/amdgpu: Fix the vram base start address
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Mon, 30 Oct 2023 16:25:37 +0000 (09:25 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Oct 2023 21:10:13 +0000 (17:10 -0400)
commit9ae587f850a6702428273fcf4a2a9b392349b2a3
treea49624a5ea9c9f83d5626b3854a97b4728cf8568
parentd539b0ad7c7cea6f7ebd8a1f12d2877c15563e73
drm/amdgpu: Fix the vram base start address

If the size returned by drm buddy allocator is higher than
the required size, we take the higher size to calculate
the buffer start address. This is required if we couldn't
trim the buffer to the requested size. This will fix the
display corruption issue on APU's which has limited VRAM
size.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2859
Fixes: 0a1844bf0b53 ("drm/buddy: Improve contiguous memory allocation")
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c