[PATCH 1/2] Enable buddy memory manager support

2021-09-20 Thread Arunpravin
Port Intel buddy system manager to drm root folder Add CPU mappable/non-mappable region support to the drm buddy manager Signed-off-by: Arunpravin --- drivers/gpu/drm/Makefile| 2 +- drivers/gpu/drm/drm_buddy.c | 465 include/drm/drm_buddy.h | 154

[PATCH 2/2] Add drm buddy manager support to amdgpu driver

2021-09-20 Thread Arunpravin
Replace drm_mm with drm buddy manager for VRAM memory management Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 78 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 216 ++ 3 files

[PATCH 2/3] drm/amdgpu:move vram manager defines into a header file

2021-10-13 Thread Arunpravin
Move vram related defines and inline functions into a separate header file Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 72 1 file changed, 72 insertions(+) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h diff --git a

[PATCH 3/3] drm/amdgpu: Replace drm_mm with drm buddy manager

2021-10-13 Thread Arunpravin
Add drm buddy allocator support for vram memory management Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 251 ++ 3 files changed

[PATCH 1/3] drm:Enable buddy allocator support

2021-10-13 Thread Arunpravin
Port Intel buddy manager to drm root folder Implemented range allocation support for the provided order Implemented TOP-DOWN support Implemented freeing up unused pages on contiguous allocation Moved range allocation and freelist pickup into a single function Signed-off-by: Arunpravin

[PATCH 00/13] drm: Enable buddy allocator support

2021-10-19 Thread Arunpravin
required size comply with range limitations - cleanup i915 and amdgpu old mm manager references - and finally add drm buddy support to i915 and amdgpu driver modules selftest patches will be sent in a separate series. Arunpravin (13): drm: Move and rename i915 buddy header drm: Move and rename

[PATCH 01/13] drm: Move and rename i915 buddy header

2021-10-19 Thread Arunpravin
- Move i915_buddy.h to include/drm - rename "i915" string to "drm" - rename "I915" string to "DRM" Signed-off-by: Arunpravin --- drivers/gpu/drm/i915/i915_buddy.h | 143 -- include/drm/drm_buddy.h | 143

[PATCH 02/13] drm: Move and rename i915 buddy source

2021-10-19 Thread Arunpravin
- 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 Signed-off-by: Arunpravin --- .

[PATCH 03/13] drm: add Makefile support for drm buddy

2021-10-19 Thread Arunpravin
- Include drm buddy to DRM root Makefile - Add drm buddy init and exit function calls to drm core Signed-off-by: Arunpravin --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_drv.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Makefile b/drivers

[PATCH 04/13] drm: make drm_buddy_alloc a commonplace

2021-10-19 Thread Arunpravin
: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 208 +++- include/drm/drm_buddy.h | 18 +++- 2 files changed, 194 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 0398706cb7ae..f5f299dd9131 100644 --- a/drivers

[PATCH 05/13] drm: remove drm_buddy_alloc_range

2021-10-19 Thread Arunpravin
This function becomes obsolete and may be removed. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 101 include/drm/drm_buddy.h | 4 -- 2 files changed, 105 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm

[PATCH 06/13] drm: implement top-down allocation method

2021-10-19 Thread Arunpravin
blocks for a single page request. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 42 +++-- include/drm/drm_buddy.h | 1 + 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c

[PATCH 07/13] drm: Implement method to free unused pages

2021-10-19 Thread Arunpravin
On contiguous allocation, we round up the size to the nearest power of 2, implement a function to free unused pages. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 87 + include/drm/drm_buddy.h | 4 ++ 2 files changed, 91 insertions(+) diff

[PATCH 08/13] drm: export functions and write description

2021-10-19 Thread Arunpravin
Export functions and write kerneldoc description Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 89 ++--- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 3e3303dd6658

[PATCH 10/13] drm/i915: cleanup i915 buddy and apply DRM buddy

2021-10-19 Thread Arunpravin
Remove i915 buddy references and add DRM buddy functions Signed-off-by: Arunpravin --- drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/i915_module.c| 3 - drivers/gpu/drm/i915/i915_scatterlist.c | 11 +-- drivers/gpu/drm/i915

[PATCH 09/13] drm: remove i915 selftest config check

2021-10-19 Thread Arunpravin
i915 buddy selftests will be moved to drm selftest folder, hence the config condition check may be removed. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index

[PATCH 11/13] drm/amdgpu: move vram defines into a header

2021-10-19 Thread Arunpravin
Move vram defines and inline functions into a header file Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 + drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 72 2 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 drivers

[PATCH 12/13] drm/amdgpu: add cursor support for drm buddy

2021-10-19 Thread Arunpravin
- Add res cursor support for drm buddy - Replace if..else statement with switch case statement Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +++ 1 file changed, 78 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 13/13] drm/amdgpu: cleanup drm_mm and apply DRM buddy

2021-10-19 Thread Arunpravin
Remove drm_mm references and add DRM buddy functions Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 233 +++ 2 files changed, 138 insertions(+), 99 deletions(-) diff --git a/drivers/gpu/drm/amd

Re: [PATCH 03/13] drm: add Makefile support for drm buddy

2021-10-22 Thread Arunpravin
On 20/10/21 1:51 pm, Thomas Zimmermann wrote: > Hi > > Am 20.10.21 um 00:53 schrieb Arunpravin: >> - Include drm buddy to DRM root Makefile >> - Add drm buddy init and exit function calls >>to drm core > > Is there a hard requirement to have this co

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

2021-10-25 Thread Arunpravin
blocks for a single page request. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 42 +++-- include/drm/drm_buddy.h | 1 + 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c

[PATCH 4/8] drm/i915: add top-down alloc support to i915

2021-10-25 Thread Arunpravin
add top down allocation support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c index 75197ba6e40d

[PATCH 5/8] drm: Implement method to free unused pages

2021-10-25 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. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 103 include/drm/drm_buddy.h | 4 ++ 2

[PATCH 6/8] drm/i915: add free_unused_pages support to i915

2021-10-25 Thread Arunpravin
add drm_buddy_free_unused_pages() support on contiguous allocation Signed-off-by: Arunpravin --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915

[PATCH 7/8] drm/amdgpu: move vram inline functions into a header

2021-10-25 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

[PATCH 8/8] drm/amdgpu: add drm buddy support to amdgpu

2021-10-25 Thread Arunpravin
- Remove drm_mm references and replace with drm buddy functionalities - Add res cursor support for drm buddy Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/8] drm: move the buddy allocator from i915 into common drm

2021-10-25 Thread Arunpravin
ith drm buddy V2: - include header file in alphabetical order (Thomas) - merged changes listed in the body section into a single patch to keep the build intact (Christian, Jani) Signed-off-by: Arunpravin --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu

[PATCH v2 2/8] drm: improve drm_buddy_alloc function

2021-10-25 Thread Arunpravin
driver to drm buddy V2: merged below changes to keep the build unbroken - drm_buddy_alloc_range() becomes obsolete and may be removed - enable ttm range allocation (fpfn / lpfn) support in i915 driver - apply enhanced drm_buddy_alloc() function to i915 driver Signed-off-by: Arunpravin --- drivers

Re: [PATCH v2 2/8] drm: improve drm_buddy_alloc function

2021-11-08 Thread Arunpravin
Hi Matthew, Thanks for the review, Please find my comments On 04/11/21 12:11 am, Matthew Auld wrote: > On 25/10/2021 14:00, Arunpravin wrote: >> - Make drm_buddy_alloc a single function to handle >>range allocation and non-range allocation demands >> >> -

Re: [PATCH 3/8] drm: implement top-down allocation method

2021-11-08 Thread Arunpravin
On 04/11/21 12:14 am, Matthew Auld wrote: > On 25/10/2021 14:00, Arunpravin wrote: >> 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 &g

Re: [PATCH 6/8] drm/i915: add free_unused_pages support to i915

2021-11-08 Thread Arunpravin
On 04/11/21 12:48 am, Matthew Auld wrote: > On 25/10/2021 14:00, Arunpravin wrote: >> add drm_buddy_free_unused_pages() support on >> contiguous allocation >> >> Signed-off-by: Arunpravin >> --- >> drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 8 +++

Re: [PATCH 8/8] drm/amdgpu: add drm buddy support to amdgpu

2021-11-08 Thread Arunpravin
On 04/11/21 2:24 pm, Christian König wrote: > Am 04.11.21 um 09:49 schrieb Matthew Auld: >> On 04/11/2021 07:34, Christian König wrote: >>> >>> >>> Am 03.11.21 um 20:25 schrieb Matthew Auld: >>>> On 25/10/2021 14:00, Arunpravin wrote: >>>

Re: [PATCH 5/8] drm: Implement method to free unused pages

2021-11-09 Thread Arunpravin
On 04/11/21 12:46 am, Matthew Auld wrote: > On 25/10/2021 14:00, Arunpravin wrote: >> 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. >> >> Signed-off-

Re: [PATCH v2 2/8] drm: improve drm_buddy_alloc function

2021-11-15 Thread Arunpravin
Hi Matthew, I am preparing version3 of the buddy allocator, Please find the updated comments. SNIP >>> -int drm_buddy_alloc_range(struct drm_buddy_mm *mm, >>> - struct list_head *blocks, >>> - u64 start, u64 size) >>> +static struct drm_buddy_block * >>> +a

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

2021-11-16 Thread Arunpravin
h drm buddy v2: - include header file in alphabetical order (Thomas) - merged changes listed in the body section into a single patch to keep the build intact (Christian, Jani) Signed-off-by: Arunpravin --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu

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

2021-11-16 Thread Arunpravin
alignment issues and remove unnecessary list_empty check - add more validation checks for input arguments - make alloc_range() block allocations as bottom-up - optimize order computation logic - replace uint64_t with u64, which is preferred in the kernel Signed-off-by: Arunpravin --- drivers

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

2021-11-16 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2021-11-16 Thread Arunpravin
ck_trim() function as it calls mark_free/mark_split are all globally visible Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 108 ++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 10 ++ include/drm/drm_buddy.h | 4 + 3

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

2021-11-16 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

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

2021-11-16 Thread Arunpravin
mark_free/mark_split are all globally visible Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 263 ++ 3 files changed, 233 insertions

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

2021-11-17 Thread Arunpravin
f additional configuration which > saves a bit of memory on embedded systems which just need a fbdev > replacement. > > Thanks, > Christian. > > Am 16.11.21 um 21:18 schrieb Arunpravin: >> Move the base i915 buddy allocator code into drm >> - Move i915_buddy.

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

2021-11-23 Thread Arunpravin
On 18/11/21 12:09 am, Matthew Auld wrote: > On 16/11/2021 20:18, Arunpravin wrote: >> - Make drm_buddy_alloc a single function to handle >>range allocation and non-range allocation demands >> >> - Implemented a new function alloc_range() which allocates >&

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

2021-11-23 Thread Arunpravin
On 18/11/21 12:32 am, Matthew Auld wrote: > On 16/11/2021 20:18, Arunpravin wrote: >> 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(Matthe

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

2021-12-01 Thread Arunpravin
drm_buddy_alloc_range() function implementation for generic actual range allocations - keep alloc_range() implementation for end bias allocations Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 316 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67

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

2021-12-01 Thread Arunpravin
h drm buddy v2: - include header file in alphabetical order(Thomas) - merged changes listed in the body section into a single patch to keep the build intact(Christian, Jani) v3: - make drm buddy a separate module(Thomas, Christian) Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfi

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

2021-12-01 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2021-12-01 Thread Arunpravin
ck_trim() function as it calls mark_free/mark_split are all globally visible v3: - remove drm_buddy_block_trim() error handling and print a warn message if it fails Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 72 ++- drivers/gpu/drm/i915

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

2021-12-01 Thread Arunpravin
mark_free/mark_split are all globally visible v3: - remove drm_buddy_block_trim() error handling and print a warn message if it fails Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +-- drivers

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

2021-12-01 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

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

2021-12-15 Thread Arunpravin
On 14/12/21 12:29 am, Matthew Auld wrote: > On 09/12/2021 15:47, Paneer Selvam, Arunpravin wrote: >> [AMD Official Use Only] >> >> Hi Matthew, >> >> Ping on this? > > No new comments from me :) I guess just a question of what we should do > with the s

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

2021-12-15 Thread Arunpravin
On 14/12/21 12:10 am, Matthew Auld wrote: > On 01/12/2021 16:39, Arunpravin wrote: >> 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(Matthe

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_

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

2021-12-26 Thread Arunpravin
drm_buddy_alloc_range() function implementation for generic actual range allocations - keep alloc_range() implementation for end bias allocations Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 316 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67

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

2021-12-26 Thread Arunpravin
ot - removed i915 buddy selftest from i915_mock_selftests.h to avoid build error - removed selftests/i915_buddy.c file as we create a new set of buddy test cases in drm/selftests folder Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 6 + drivers/gpu

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

2021-12-26 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

[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

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

2021-12-26 Thread Arunpravin
odify the drm_buddy_block_trim() function return type Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 61 +++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 8 +++ include/drm/drm_buddy.h | 4 ++ 3 files changed, 73 insertion

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

2021-12-26 Thread Arunpravin
mark_free/mark_split are all globally visible v3: - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97

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

2021-12-26 Thread Arunpravin
ot - removed i915 buddy selftest from i915_mock_selftests.h to avoid build error - removed selftests/i915_buddy.c file as we create a new set of buddy test cases in drm/selftests folder v5: - Fix merge conflict issue Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig

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

2021-12-26 Thread Arunpravin
drm_buddy_alloc_range() function implementation for generic actual range allocations - keep alloc_range() implementation for end bias allocations Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 316 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67

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

2021-12-26 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2021-12-26 Thread Arunpravin
odify the drm_buddy_block_trim() function return type Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 61 +++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 8 +++ include/drm/drm_buddy.h | 4 ++ 3 files changed, 73 insertion

[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

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

2021-12-26 Thread Arunpravin
mark_free/mark_split are all globally visible v3(Matthew Auld): - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu

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

2022-01-06 Thread Arunpravin
On 04/01/22 7:41 pm, Matthew Auld wrote: > On 26/12/2021 22:24, Arunpravin wrote: >> 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 Aul

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

2022-01-06 Thread Arunpravin
> -Original Message- > From: amd-gfx On Behalf Of Matthew > Auld > Sent: Tuesday, January 4, 2022 7:32 PM > To: Paneer Selvam, Arunpravin ; > dri-de...@lists.freedesktop.org; intel-...@lists.freedesktop.org; > amd-gfx@lists.freedesktop.org > Cc: Deuch

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

2022-01-09 Thread Arunpravin
On 07/01/22 9:27 pm, Christian König wrote: > Am 07.01.22 um 16:49 schrieb Matthew Auld: >> On 26/12/2021 22:24, Arunpravin wrote: >>> Move the base i915 buddy allocator code into drm >>> - Move i915_buddy.h to include/drm >>> - Move i915_buddy.c to drm ro

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

2022-01-09 Thread Arunpravin
, Christian) - replace drm_buddy_alloc() function name as drm_buddy_alloc_blocks() (Thomas) - replace drm_buddy_free() function name as drm_buddy_free_block() (Thomas) - export drm_buddy_free_block() function - fix multiple instances of KMEM_CACHE() entry Signed-off-by:

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

2022-01-09 Thread Arunpravin
off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 316 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/drm_buddy.h | 22 +- 4 files changed, 285 insertions(+

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

2022-01-09 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

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

2022-01-09 Thread Arunpravin
g n_pages results noop Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 65 +++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 10 +++ include/drm/drm_buddy.h | 4 ++ 3 files changed, 79 insertions(+) diff --git a/drivers/gpu

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

2022-01-09 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2022-01-09 Thread Arunpravin
mark_free/mark_split are all globally visible v3(Matthew Auld): - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu

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

2022-01-11 Thread Arunpravin
yes, I will use Dual MIT/GPL Regards, Arun On 10/01/22 1:33 pm, Christian König wrote: > Am 09.01.22 um 15:19 schrieb Arunpravin: >> +// SPDX-License-Identifier: MIT > >> +MODULE_DESCRIPTION("DRM Buddy Allocator"); >> +MODULE_LICENSE("GPL");

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

2022-01-11 Thread Arunpravin
off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 316 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/drm_buddy.h | 22 +- 4 files changed, 285 insertions(+

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

2022-01-11 Thread Arunpravin
ernel test robot - modify the license(Christian) Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 6 + drivers/gpu/drm/Makefile | 2 + drivers/gpu/drm/drm_buddy.c | 535 drivers/gpu/drm/i915/Kconfig

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

2022-01-11 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2022-01-11 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

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

2022-01-11 Thread Arunpravin
g n_pages results noop Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 65 +++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 10 +++ include/drm/drm_buddy.h | 4 ++ 3 files changed, 79 insertions(+) diff --git a/drivers/gpu

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

2022-01-11 Thread Arunpravin
mark_free/mark_split are all globally visible v3(Matthew Auld): - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu

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

2022-01-18 Thread Arunpravin
potentially freeing them - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 326 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/

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

2022-01-18 Thread Arunpravin
ernel test robot - modify the license(Christian) v8: - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig | 6 + drivers/gpu/drm/Makefile | 2 + drivers/gpu/drm/drm_buddy.c

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

2022-01-18 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2022-01-18 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

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

2022-01-18 Thread Arunpravin
ssing n_pages results noop v6: - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 65 +++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 10 +++ include/drm/drm_buddy.h | 4 ++

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

2022-01-18 Thread Arunpravin
mark_free/mark_split are all globally visible v3(Matthew Auld): - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function v4: - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/Kconfig

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

2022-01-19 Thread Arunpravin
potentially freeing them - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 326 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/

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

2022-01-19 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c

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

2022-01-19 Thread Arunpravin
ssing n_pages results noop v6: - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 65 +++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 10 +++ include/drm/drm_buddy.h | 4 ++

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

2022-01-19 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

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

2022-01-19 Thread Arunpravin
mark_free/mark_split are all globally visible v3(Matthew Auld): - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function v4: - fix warnings reported by kernel test robot v5: - fix merge conflict issue Signed-off-by: Arunpravin

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

2022-01-26 Thread Arunpravin
On 21/01/22 5:30 pm, Matthew Auld wrote: > On 19/01/2022 11:37, Arunpravin wrote: >> - Make drm_buddy_alloc a single function to handle >>range allocation and non-range allocation demands >> >> - Implemented a new function alloc_range() which allocates >>

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

2022-01-26 Thread Arunpravin
> -Original Message- > From: amd-gfx On Behalf Of Matthew > Auld > Sent: Thursday, January 20, 2022 11:05 PM > To: Paneer Selvam, Arunpravin ; > dri-de...@lists.freedesktop.org; intel-...@lists.freedesktop.org; > amd-gfx@lists.freedesktop.org > Cc: Deuch

[PATCH v10 1/5] drm: improve drm_buddy_alloc function

2022-01-26 Thread Arunpravin
flows macro and add a new check for end variable Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 315 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/

[PATCH v10 2/5] drm: implement top-down allocation method

2022-01-26 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin Reviewed-by: Matthew Auld

[PATCH v10 3/5] drm: implement a method to free unused pages

2022-01-26 Thread Arunpravin
ssing n_pages results noop v6: - fix warnings reported by kernel test robot v7: - modify drm_buddy_block_trim() function doc description - at drm_buddy_block_trim() handle non-allocated block as a serious programmer error - fix a typo Signed-off-by: Arunpravin Reviewed-by: Matt

[PATCH v10 4/5] drm/amdgpu: move vram inline functions into a header

2022-01-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

[PATCH v10 5/5] drm/amdgpu: add drm buddy support to amdgpu

2022-01-26 Thread Arunpravin
mark_free/mark_split are all globally visible v3(Matthew Auld): - remove trim method error handling as we address the failure case at drm_buddy_block_trim() function v4: - fix warnings reported by kernel test robot v5: - fix merge conflict issue Signed-off-by: Arunpravin

[PATCH v11 1/5] drm: improve drm_buddy_alloc function

2022-01-27 Thread Arunpravin
flows macro and add a new check for end variable v8: - fix warnings reported by kernel test robot Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 315 +- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_budd

[PATCH v11 2/5] drm: implement top-down allocation method

2022-01-27 Thread Arunpravin
blocks for a single page request. v2: - Fix alignment issues(Matthew Auld) - Remove unnecessary list_empty check(Matthew Auld) - merged the below patch to see the feature in action - add top-down alloc support to i915 driver Signed-off-by: Arunpravin Reviewed-by: Matthew Auld

  1   2   3   4   5   6   >