diff options
| author | Arunpravin Paneer Selvam <[email protected]> | 2023-09-09 16:09:00 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2023-09-11 18:18:00 +0000 |
| commit | 0a1844bf0b532d84324453374ad6845f64066c28 (patch) | |
| tree | de60b3dac8a0c7e7450c20439231aa7de0555985 /drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | |
| parent | fbdev/core: Clean up include statements in fbmem.c (diff) | |
| download | kernel-0a1844bf0b532d84324453374ad6845f64066c28.tar.gz kernel-0a1844bf0b532d84324453374ad6845f64066c28.zip | |
drm/buddy: Improve contiguous memory allocation
Problem statement: The current method roundup_power_of_two()
to allocate contiguous address triggers -ENOSPC in some cases
even though we have enough free spaces and so to help with
that we introduce a try harder mechanism.
In case of -ENOSPC, the new try harder mechanism rounddown the
original size to power of 2 and iterating over the round down
sized freelist blocks to allocate the required size traversing
RHS and LHS.
As part of the above new method implementation we moved
contiguous/alignment size computation part and trim function
to the drm buddy file.
v2: Modify the alloc_range() function to return total allocated size
on -ENOSPC err and traverse RHS/LHS to allocate the required
size (Matthew).
Signed-off-by: Arunpravin Paneer Selvam <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Matthew Auld <[email protected]>
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c')
0 files changed, 0 insertions, 0 deletions
