drm/i915: Move the size computations to drm buddy
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Sat, 9 Sep 2023 16:09:02 +0000 (09:09 -0700)
committerChristian König <christian.koenig@amd.com>
Mon, 11 Sep 2023 18:18:13 +0000 (20:18 +0200)
commit8569c31545385195bdb0c021124e68336e91c693
treed70121abde2a03878aa96cb8c557196c1ed88b88
parent2eb412aa25ed2bf59f5ad5f7a09787d182d67934
drm/i915: Move the size computations to drm buddy

- Move roundup_power_of_two() 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/i915/i915_ttm_buddy_manager.c