[PATCH v6 6/6] drm/amdgpu: add drm buddy support to amdgpu

2021-12-26 Thread Arunpravin
- Remove drm_mm references and replace with drm buddy functionalities - Add res cursor support for drm buddy v2(Matthew Auld): - replace spinlock with mutex as we call kmem_cache_zalloc (..., GFP_KERNEL) in drm_buddy_alloc() function - lock drm_buddy_block_trim() function as it calls

[PATCH v6 5/6] drm/amdgpu: move vram inline functions into a header

2021-12-26 Thread Arunpravin
Move shared vram inline functions and structs into a header file Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 51 1 file changed, 51 insertions(+) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h diff --git a/drivers/gpu/drm/a

[PATCH v6 4/6] drm: implement a method to free unused pages

2021-12-26 Thread Arunpravin
On contiguous allocation, we round up the size to the *next* power of 2, implement a function to free the unused pages after the newly allocate block. v2(Matthew Auld): - replace function name 'drm_buddy_free_unused_pages' with drm_buddy_block_trim - replace input argument name 'actual_siz

[PATCH v6 3/6] drm: implement top-down allocation method

2021-12-26 Thread Arunpravin
Implemented a function which walk through the order list, compares the offset and returns the maximum offset block, this method is unpredictable in obtaining the high range address blocks which depends on allocation and deallocation. for instance, if driver requests address at a low specific range,

[PATCH v6 2/6] drm: improve drm_buddy_alloc function

2021-12-26 Thread Arunpravin
- Make drm_buddy_alloc a single function to handle range allocation and non-range allocation demands - Implemented a new function alloc_range() which allocates the requested power-of-two block comply with range limitations - Moved order computation and memory alignment logic from i915 drive

[PATCH v6 1/6] drm: move the buddy allocator from i915 into common drm

2021-12-26 Thread Arunpravin
Move the base i915 buddy allocator code into drm - Move i915_buddy.h to include/drm - Move i915_buddy.c to drm root folder - Rename "i915" string with "drm" string wherever applicable - Rename "I915" string with "DRM" string wherever applicable - Fix header file dependencies - Fix alignment issues

[PATCH v5 6/6] drm/amdgpu: add drm buddy support to amdgpu

2021-12-26 Thread Arunpravin
- Remove drm_mm references and replace with drm buddy functionalities - Add res cursor support for drm buddy v2(Matthew Auld): - replace spinlock with mutex as we call kmem_cache_zalloc (..., GFP_KERNEL) in drm_buddy_alloc() function - lock drm_buddy_block_trim() function as it calls

[PATCH v5 4/6] drm: implement a method to free unused pages

2021-12-26 Thread Arunpravin
On contiguous allocation, we round up the size to the *next* power of 2, implement a function to free the unused pages after the newly allocate block. v2(Matthew Auld): - replace function name 'drm_buddy_free_unused_pages' with drm_buddy_block_trim - replace input argument name 'actual_siz

[PATCH v5 5/6] drm/amdgpu: move vram inline functions into a header

2021-12-26 Thread Arunpravin
Move shared vram inline functions and structs into a header file Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 51 1 file changed, 51 insertions(+) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h diff --git a/drivers/gpu/drm/a

[PATCH v5 3/6] drm: implement top-down allocation method

2021-12-26 Thread Arunpravin
Implemented a function which walk through the order list, compares the offset and returns the maximum offset block, this method is unpredictable in obtaining the high range address blocks which depends on allocation and deallocation. for instance, if driver requests address at a low specific range,

[PATCH v5 2/6] drm: improve drm_buddy_alloc function

2021-12-26 Thread Arunpravin
- Make drm_buddy_alloc a single function to handle range allocation and non-range allocation demands - Implemented a new function alloc_range() which allocates the requested power-of-two block comply with range limitations - Moved order computation and memory alignment logic from i915 drive

[PATCH v5 1/6] drm: move the buddy allocator from i915 into common drm

2021-12-26 Thread Arunpravin
Move the base i915 buddy allocator code into drm - Move i915_buddy.h to include/drm - Move i915_buddy.c to drm root folder - Rename "i915" string with "drm" string wherever applicable - Rename "I915" string with "DRM" string wherever applicable - Fix header file dependencies - Fix alignment issues

Re: [PATCH v4 2/6] drm: improve drm_buddy_alloc function

2021-12-26 Thread Arunpravin
Hi Thomas On 16/12/21 5:05 pm, Thomas Zimmermann wrote: > Hi > > Am 01.12.21 um 17:39 schrieb Arunpravin: >> - Make drm_buddy_alloc a single function to handle >>range allocation and non-range allocation demands >> >> - Implemented a new function alloc_range() which allocates >>the reques