drm/amdgpu: Move the size computations to drm buddy
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Sat, 9 Sep 2023 16:09:01 +0000 (09:09 -0700)
committerChristian König <christian.koenig@amd.com>
Mon, 11 Sep 2023 18:18:06 +0000 (20:18 +0200)
commit2eb412aa25ed2bf59f5ad5f7a09787d182d67934
tree46bd51163dbc9f08fdd6a920e276890757bb7448
parent0a1844bf0b532d84324453374ad6845f64066c28
drm/amdgpu: Move the size computations to drm buddy

- Move roundup_power_of_two() and IS_ALIGNED() computations to
  drm buddy file to support the new try harder mechanism for
  contiguous allocation.

- Move trim function call to drm_buddy_alloc_blocks() function.

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230909160902.15644-2-Arunpravin.PaneerSelvam@amd.com
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c