[PATCH v2] drm: Fix a infinite loop condition when order becomes 0

2022-03-15 Thread Arunpravin Paneer Selvam
nd in Signed-off tag Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 72f52f293249..5ab66aaf2bbd 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/dr

Re: [PATCH] drm: Fix a infinite loop condition when order becomes 0

2022-03-15 Thread Arunpravin Paneer Selvam
On 15/03/22 9:14 pm, Paul Menzel wrote: > Dear Arunpravin, > > > Am 15.03.22 um 16:42 schrieb Arunpravin: > >> On 15/03/22 2:35 pm, Paul Menzel wrote: > >>> Am 15.03.22 um 10:01 schrieb Arunpravin: >>> On 15/03/22 1:49 pm, Paul Menzel wrote: >>> > Am 14.03.22 um 20:40 schrieb Arunpr

Re: [PATCH v2] drm: Fix a infinite loop condition when order becomes 0

2022-03-20 Thread Arunpravin Paneer Selvam
On 16/03/22 5:01 pm, Matthew Auld wrote: > On 16/03/2022 06:34, Arunpravin Paneer Selvam wrote: >> handle a situation in the condition order-- == min_order, >> when order = 0 and min_order = 0, leading to order = -1, >> it now won't exit the loop. To avoid this probl

[PATCH] drm: add a check to verify the size alignment

2022-03-20 Thread Arunpravin Paneer Selvam
add a simple check to reject any size not aligned to the min_page_size. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 72f52f293249..b503c88786b0

Re: [PATCH] drm: Fix a infinite loop condition when order becomes 0

2022-03-20 Thread Arunpravin Paneer Selvam
On 16/03/22 12:28 pm, Paul Menzel wrote: > Dear Arunprivin, > > > Am 16.03.22 um 07:49 schrieb Arunpravin Paneer Selvam: > >> On 15/03/22 9:14 pm, Paul Menzel wrote: > >>> Am 15.03.22 um 16:42 schrieb Arunpravin: >>> >>>> On 15/03/22 2

Re: [PATCH v2] drm: Fix a infinite loop condition when order becomes 0

2022-03-20 Thread Arunpravin Paneer Selvam
On 16/03/22 6:02 pm, Christian König wrote: > Am 16.03.22 um 12:31 schrieb Matthew Auld: >> On 16/03/2022 06:34, Arunpravin Paneer Selvam wrote: >>> handle a situation in the condition order-- == min_order, >>> when order = 0 and min_order = 0, leading to order = -1

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

2022-03-22 Thread Arunpravin Paneer Selvam
-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 263 ++ 4 files changed

[PATCH v2] drm: add a check to verify the size alignment

2022-03-23 Thread Arunpravin Paneer Selvam
-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld --- drivers/gpu/drm/drm_buddy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 72f52f293249..b503c88786b0 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/

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

2022-03-29 Thread Arunpravin Paneer Selvam
r, Alexander ; matthew.a...@intel.com; > dan...@ffwll.ch; Koenig, Christian > Subject: Re: [PATCH v11] drm/amdgpu: add drm buddy support to amdgpu > > Am 23.03.22 um 07:25 schrieb Arunpravin Paneer Selvam: >> [SNIP] >> @@ -415,48 +409,86 @@ static int amdgpu_v

Re: [PATCH v2] drm: add a check to verify the size alignment

2022-03-29 Thread Arunpravin Paneer Selvam
On 23/03/22 1:15 pm, Christian König wrote: > Am 23.03.22 um 08:34 schrieb Arunpravin Paneer Selvam: >> Add a simple check to reject any size not aligned to the >> min_page_size. >> >> handle instances when size is not aligned with the min_page_size. >> Unigi

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

2022-03-29 Thread Arunpravin Paneer Selvam
On 29/03/22 4:54 pm, Christian König wrote: > Am 29.03.22 um 13:19 schrieb Arunpravin Paneer Selvam: >> [SNIP] >>>> + pages_left = node->base.num_pages; >>>> >>>>i = 0; >>>> - spin_lock(&mgr->lock); >>&g

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

2022-03-29 Thread Arunpravin Paneer Selvam
On 29/03/22 9:30 pm, Arunpravin Paneer Selvam wrote: > > > On 29/03/22 4:54 pm, Christian König wrote: >> Am 29.03.22 um 13:19 schrieb Arunpravin Paneer Selvam: >>> [SNIP] >>>>> + pages_left = node->base.num_pages; >>>>>

[PATCH] drm: round_up the size to the alignment value

2022-03-30 Thread Arunpravin Paneer Selvam
-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 72f52f293249..98d7ec359b08 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/

Re: [PATCH v2] drm: add a check to verify the size alignment

2022-03-30 Thread Arunpravin Paneer Selvam
On 29/03/22 4:54 pm, Matthew Auld wrote: > On Tue, 29 Mar 2022 at 12:17, Arunpravin Paneer Selvam > wrote: >> >> >> >> On 23/03/22 1:15 pm, Christian König wrote: >>> Am 23.03.22 um 08:34 schrieb Arunpravin Paneer Selvam: >>>> Add a

Re: [PATCH] drm: round_up the size to the alignment value

2022-03-30 Thread Arunpravin Paneer Selvam
On 30/03/22 2:37 pm, Christian König wrote: > Am 30.03.22 um 11:04 schrieb Arunpravin Paneer Selvam: >> Round up the size value to the min_page_size and trim the last block to >> the required size. >> >> This solves a bug detected when size is not aligned with th

Re: [PATCH] drm: round_up the size to the alignment value

2022-03-30 Thread Arunpravin Paneer Selvam
On 30/03/22 2:42 pm, Christian König wrote: > Am 30.03.22 um 11:20 schrieb Arunpravin Paneer Selvam: >> >> On 30/03/22 2:37 pm, Christian König wrote: >>> Am 30.03.22 um 11:04 schrieb Arunpravin Paneer Selvam: >>>> Round up the size value to the min_page_size

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

2022-05-02 Thread Arunpravin Paneer Selvam
On 5/2/2022 8:41 PM, Mike Lothian wrote: On Wed, 27 Apr 2022 at 12:55, Mike Lothian wrote: On Tue, 26 Apr 2022 at 17:36, Christian König wrote: Hi Mike, sounds like somehow stitching together the SG table for PRIME doesn't work any more with this patch. Can you try with P2P DMA disabled?

[PATCH v4 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-08-04 Thread Arunpravin Paneer Selvam
ed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_resource.c | 59 ++ include/drm/ttm/ttm_resource.h | 39 2 files changed, 98 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b

[PATCH v4 2/6] drm/ttm: Implement intersect/compatible functions

2022-08-04 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_range_manager.c | 33 + 1 file

[PATCH v4 3/6] drm/amdgpu: Implement intersect/compatible functions

2022-08-04 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 38 +++ drivers/gpu/drm/amd/amdgpu

[PATCH v4 5/6] drm/nouveau: Implement intersect/compatible functions

2022-08-04 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/nouveau/nouveau_mem.c | 29 +++ drivers/gpu/drm/nouveau

[PATCH v4 4/6] drm/i915: Implement intersect/compatible functions

2022-08-04 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v3: move the bits that are specific to buddy_man (Matthew) v4: consider the block size /range (Matthew) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam

[PATCH v4 6/6] drm/ttm: Switch to using the new res callback

2022-08-04 Thread Arunpravin Paneer Selvam
Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45

Re: [PATCH v2 2/6] drm/ttm: Implement intersect/compatible functions

2022-08-09 Thread Arunpravin Paneer Selvam
On 8/8/2022 5:00 PM, Christian König wrote: Am 25.07.22 um 13:42 schrieb Arunpravin Paneer Selvam: Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by

[PATCH v5 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-08-09 Thread Arunpravin Paneer Selvam
!place check to the !res if and return false in ttm_resource_compatible() function (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_resource.c | 59 ++ include/drm/ttm/ttm_resource.h | 40 +

[PATCH v5 2/6] drm/ttm: Implement intersect/compatible functions

2022-08-09 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_range_manager.c | 33 + 1 file

[PATCH v5 6/6] drm/ttm: Switch to using the new res callback

2022-08-09 Thread Arunpravin Paneer Selvam
Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45

[PATCH v5 5/6] drm/nouveau: Implement intersect/compatible functions

2022-08-09 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/nouveau/nouveau_mem.c | 29 +++ drivers/gpu/drm/nouveau

[PATCH v5 4/6] drm/i915: Implement intersect/compatible functions

2022-08-09 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v3: move the bits that are specific to buddy_man (Matthew) v4: consider the block size /range (Matthew) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed

[PATCH v5 3/6] drm/amdgpu: Implement intersect/compatible functions

2022-08-09 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 38 +++ drivers/gpu/drm/amd/amdgpu

[PATCH v2] drm/ttm: Fix dummy res NULL ptr deref bug

2022-08-09 Thread Arunpravin Paneer Selvam
002 R08: R09: 5642dccd5530 [ 40.301547][ T184] R10: 0016 R11: 0246 R12: 7f6b1d7b2e2d [ 40.302698][ T184] R13: R14: 5642dcca4230 R15: 5642dcca2880 Signed-off-by: Arunpravin Paneer Selvam Reported-by: kernel test

Re: [bug report] drm/ttm: Fix dummy res NULL ptr deref bug

2022-08-11 Thread Arunpravin Paneer Selvam
Hi Dan, drm-misc-fixes doesn't have the updated ttm_bo.c file, we have the updated ttm_bo.c version in drm-misc-next branch. Please find below for the line number 907. On 8/11/2022 3:25 PM, Dan Carpenter wrote: Hello Arunpravin Paneer Selvam, This is a semi-automatic email about new s

[PATCH v6 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-08-12 Thread Arunpravin Paneer Selvam
!place check to the !res if and return false in ttm_resource_compatible() function (Christian) v5: move bits of code from patch number 6 to avoid temporary driver breakup (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm

[PATCH v6 2/6] drm/ttm: Implement intersect/compatible functions

2022-08-12 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_range_manager.c | 33 + 1 file

[PATCH v6 3/6] drm/amdgpu: Implement intersect/compatible functions

2022-08-12 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 38 +++ drivers/gpu/drm/amd/amdgpu

[PATCH v6 4/6] drm/i915: Implement intersect/compatible functions

2022-08-12 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v3: move the bits that are specific to buddy_man (Matthew) v4: consider the block size /range (Matthew) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed

[PATCH v6 5/6] drm/nouveau: Implement intersect/compatible functions

2022-08-12 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/nouveau/nouveau_mem.c | 29 +++ drivers/gpu/drm/nouveau

[PATCH v6 6/6] drm/ttm: Switch to using the new res callback

2022-08-12 Thread Arunpravin Paneer Selvam
Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) v3: Cleanups and removal of workarounds Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam

Re: [bug report] drm/ttm: Fix dummy res NULL ptr deref bug

2022-08-13 Thread Arunpravin Paneer Selvam
Hi Dan, On 8/11/2022 5:26 PM, Dan Carpenter wrote: On Thu, Aug 11, 2022 at 04:36:33PM +0530, Arunpravin Paneer Selvam wrote: Hi Dan, drm-misc-fixes doesn't have the updated ttm_bo.c file, we have the updated ttm_bo.c version in drm-misc-next branch. Please find below for the line numbe

Re: [PATCH v6 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-08-15 Thread Arunpravin Paneer Selvam
On 8/15/2022 4:35 PM, Christian König wrote: Am 12.08.22 um 15:30 schrieb Arunpravin Paneer Selvam: We are adding two new callbacks to ttm resource manager function to handle intersection and compatibility of placement and resources. v2: move the amdgpu and ttm_range_manager changes to

[PATCH v6 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-08-20 Thread Arunpravin Paneer Selvam
!place check to the !res if and return false in ttm_resource_compatible() function (Christian) v5: move bits of code from patch number 6 to avoid temporary driver breakup (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König ---

[PATCH v6 5/6] drm/nouveau: Implement intersect/compatible functions

2022-08-20 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König --- drivers/gpu/drm/nouveau/nouveau_mem.c | 29

[PATCH v6 6/6] drm/ttm: Switch to using the new res callback

2022-08-20 Thread Arunpravin Paneer Selvam
Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) v3: Cleanups and removal of workarounds Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed

[PATCH v6 3/6] drm/amdgpu: Implement intersect/compatible functions

2022-08-20 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 38 +++ drivers

[PATCH v6 2/6] drm/ttm: Implement intersect/compatible functions

2022-08-20 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_range_manager.c | 33

[PATCH v6 4/6] drm/i915: Implement intersect/compatible functions

2022-08-20 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v3: move the bits that are specific to buddy_man (Matthew) v4: consider the block size /range (Matthew) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam Reviewed

[PATCH 1/3] Revert "drm/amdgpu: move internal vram_mgr function into the C file"

2022-07-08 Thread Arunpravin Paneer Selvam
gr_new") commit c9cad937c0c5 ("drm/amdgpu: add drm buddy support to amdgpu") [WHY] Few users reported garbaged graphics as soon as x starts, reverting until this can be resolved. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 29 --

[PATCH 2/3] Revert "drm/amdgpu: fix start calculation in amdgpu_vram_mgr_new"

2022-07-08 Thread Arunpravin Paneer Selvam
gr_new") commit c9cad937c0c5 ("drm/amdgpu: add drm buddy support to amdgpu") [WHY] Few users reported garbaged graphics as soon as x starts, reverting until this can be resolved. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 22 +++-

[PATCH 3/3] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-08 Thread Arunpravin Paneer Selvam
gr_new") commit c9cad937c0c5 ("drm/amdgpu: add drm buddy support to amdgpu") [WHY] Few users reported garbaged graphics as soon as x starts, reverting until this can be resolved. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/Kconfig | 1 - .../gpu/drm/

[PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-08 Thread Arunpravin Paneer Selvam
ot;) [WHY] Few users reported garbaged graphics as soon as x starts, reverting until this can be resolved. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/Kconfig | 1 - .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 + drivers/gpu/drm/amd/amdgpu/amdgpu

Re: [PATCH 1/3] Revert "drm/amdgpu: move internal vram_mgr function into the C file"

2022-07-08 Thread Arunpravin Paneer Selvam
On 7/8/2022 3:03 PM, Christian König wrote: Am 08.07.22 um 11:30 schrieb Arunpravin Paneer Selvam: This reverts commit 708d19d9f362766147cab79eccae60912c6d3068. This is part of a revert of the following commits: commit 708d19d9f362 ("drm/amdgpu: move internal vram_mgr function into

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

2022-04-06 Thread Arunpravin Paneer Selvam
prefix as amdgpu_vram_mgr_*() - modify the round_up() logic conforming to contiguous flag enablement or if size is not aligned to min_block_size - modify the trim logic - rename node as block wherever applicable Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/Kconfig

[PATCH] tests/drm_buddy: Add drm buddy test cases

2022-04-11 Thread Arunpravin Paneer Selvam
Add a set of drm buddy test cases to validate the drm/drm_buddy.c memory allocator. Signed-off-by: Arunpravin Paneer Selvam --- tests/drm_buddy.c | 14 ++ tests/meson.build | 1 + 2 files changed, 15 insertions(+) create mode 100644 tests/drm_buddy.c diff --git a/tests

[PATCH v3] drm: add a check to verify the size alignment

2022-04-11 Thread Arunpravin Paneer Selvam
v2: add more commit description v3: remove WARN_ON() Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld --- drivers/gpu/drm/drm_buddy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 72f52f293249..11bb59399

Re: [PATCH v3] drm: add a check to verify the size alignment

2022-04-11 Thread Arunpravin Paneer Selvam
On 11/04/22 7:02 pm, Matthew Auld wrote: > On 11/04/2022 13:42, Christian König wrote: >> >> Am 11.04.22 um 11:47 schrieb Matthew Auld: >>> On 11/04/2022 08:38, Arunpravin Paneer Selvam wrote: >>>> Add a simple check to reject any size not aligned to the >

[igt-dev] [PATCH i-g-t v2] tests/drm_buddy: Add drm buddy test cases

2022-04-11 Thread Arunpravin Paneer Selvam
Add a set of drm buddy test cases to validate the drm/drm_buddy.c memory allocator. v2: sorted in alphabetical order Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld --- tests/drm_buddy.c | 14 ++ tests/meson.build | 1 + 2 files changed, 15 insertions(+) create

Re: [PATCH v6 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-09-08 Thread Arunpravin Paneer Selvam
On 9/8/2022 11:34 AM, Christian König wrote: Am 07.09.22 um 19:00 schrieb Daniel Vetter: [SNIP] I'm a bit confused why the bloat here ... Drivers do have specialized implementations of the backend, e.g. VMWGFX have his handle backend, amdgpu the VRAM backend with special placements, i915 i

[PATCH] drm/amdgpu: Fix for drm buddy memory corruption

2022-07-14 Thread Arunpravin Paneer Selvam
. Signed-off-by: Arunpravin Paneer Selvam Reported-by: Mike Lothian Tested-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 16 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 1/4] drm/ttm: add new intersect callback to res mgr

2022-07-20 Thread Arunpravin Paneer Selvam
- This allows the resource manager to handle intersection of placement and resources. - Add callback function to amdgpu driver module fetching start offset from buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu

[PATCH 3/4] drm/nouveau: Add intersect callback function

2022-07-20 Thread Arunpravin Paneer Selvam
Add a new intersect callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/nouveau/nouveau_mem.c | 15 +++ drivers/gpu/drm/nouveau/nouveau_mem.h | 3 +++ drivers/gpu/drm

[PATCH 2/4] drm/i915: Add intersect callback function

2022-07-20 Thread Arunpravin Paneer Selvam
Add a new intersect callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a

[PATCH 4/4] drm/ttm: Switch to using the new intersect callback

2022-07-20 Thread Arunpravin Paneer Selvam
Use new intersect callback instead of having a generic placement range verification. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45 +++-- drivers/gpu/drm/ttm/ttm_bo.c| 9 +++-- drivers

[PATCH v2 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-07-25 Thread Arunpravin Paneer Selvam
We are adding two new callbacks to ttm resource manager function to handle intersection and compatibility of placement and resources. v2: move the amdgpu and ttm_range_manager changes to separate patches (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam

[PATCH v2 2/6] drm/ttm: Implement intersect/compatible functions

2022-07-25 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_range_manager.c | 33 + 1 file

[PATCH v2 5/6] drm/nouveau: Implement intersect/compatible functions

2022-07-25 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/nouveau/nouveau_mem.c | 29 +++ drivers/gpu/drm/nouveau

[PATCH v2 3/6] drm/amdgpu: Implement intersect/compatible functions

2022-07-25 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 38 drivers/gpu/drm/amd/amdgpu

[PATCH v2 4/6] drm/i915: Implement intersect/compatible functions

2022-07-25 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 43 +++ 1 file changed, 43 insertions(+) diff

[PATCH v2 6/6] drm/ttm: Switch to using the new res callback

2022-07-25 Thread Arunpravin Paneer Selvam
Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45

[PATCH] drm/ttm: Fix dummy res NULL ptr deref bug

2022-07-26 Thread Arunpravin Paneer Selvam
CQ/ Signed-off-by: Arunpravin Paneer Selvam Reported-by: kernel test robot --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c1bd006a5525..590110fdf59c 100644 --- a/drivers/gpu/d

[PATCH v2] drm/ttm: Fix dummy res NULL ptr deref bug

2022-07-26 Thread Arunpravin Paneer Selvam
002 R08: R09: 5642dccd5530 [ 40.301547][ T184] R10: 0016 R11: 0246 R12: 7f6b1d7b2e2d [ 40.302698][ T184] R13: R14: 5642dcca4230 R15: 5642dcca2880 Signed-off-by: Arunpravin Paneer Selvam Reported-by: ke

Re: [PATCH v2] drm/ttm: Fix dummy res NULL ptr deref bug

2022-07-28 Thread Arunpravin Paneer Selvam
Hi Andre, On 7/27/2022 8:56 PM, André Almeida wrote: Hi Arunpravin, Às 02:30 de 27/07/22, Arunpravin Paneer Selvam escreveu: Check the bo->resource value before accessing the resource mem_type. v2: Fix commit description unwrapped warning [ 40.191227][ T184] general protection fa

[PATCH v3 2/6] drm/ttm: Implement intersect/compatible functions

2022-07-28 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback functions to ttm range manager fetching start offset from drm mm range allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_range_manager.c | 33 + 1 file

[PATCH v3 3/6] drm/amdgpu: Implement intersect/compatible functions

2022-07-28 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from backend drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 38 drivers/gpu/drm/amd/amdgpu

[PATCH v3 1/6] drm/ttm: Add new callbacks to ttm res mgr

2022-07-28 Thread Arunpravin Paneer Selvam
ed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/ttm/ttm_resource.c | 59 ++ include/drm/ttm/ttm_resource.h | 39 2 files changed, 98 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b

[PATCH v3 4/6] drm/i915: Implement intersect/compatible functions

2022-07-28 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v2: move the bits that are specific to buddy_man (Matthew) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 39

[PATCH v3 6/6] drm/ttm: Switch to using the new res callback

2022-07-28 Thread Arunpravin Paneer Selvam
Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45

[PATCH v3 5/6] drm/nouveau: Implement intersect/compatible functions

2022-07-28 Thread Arunpravin Paneer Selvam
Implemented a new intersect and compatible callback function fetching the start offset from struct ttm_resource. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/nouveau/nouveau_mem.c | 29 +++ drivers/gpu/drm/nouveau

Re: [PATCH v2 4/6] drm/i915: Implement intersect/compatible functions

2022-07-28 Thread Arunpravin Paneer Selvam
Hi Matthew, On 7/26/2022 4:11 PM, Matthew Auld wrote: On 25/07/2022 12:42, Arunpravin Paneer Selvam wrote: Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam

Re: [PATCH v3 4/6] drm/i915: Implement intersect/compatible functions

2022-07-28 Thread Arunpravin Paneer Selvam
On 7/28/2022 8:57 PM, Matthew Auld wrote: On 28/07/2022 15:33, Arunpravin Paneer Selvam wrote: Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v2: move the bits that are specific to buddy_man (Matthew) Signed-off-by: Christian

Re: [PATCH v3 6/6] drm/ttm: Switch to using the new res callback

2022-07-28 Thread Arunpravin Paneer Selvam
On 7/28/2022 9:07 PM, Matthew Auld wrote: On 28/07/2022 15:33, Arunpravin Paneer Selvam wrote: Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) Signed-off-by

[PATCH v2] drm: Optimize drm buddy top-down allocation method

2023-01-12 Thread Arunpravin Paneer Selvam
ascending order and compare the last entry of each order list in the freelist and return the max block. This patch improves the 3D benchmark scores and solves fragmentation issues. All drm buddy selftests are verfied. drm_buddy: pass:6 fail:0 skip:0 total:6 Signed-off-by: Arunpravin Paneer Selvam

Re: [git pull] drm fixes for 6.1-rc1

2022-10-16 Thread Arunpravin Paneer Selvam
ht affect a card that old since most changes in that request were for display hw you don't have. ommit 312b4dc11d4f74bfe03ea25ffe04c1f2fdd13cb9 Author: Arunpravin Paneer Selvam Date:   Tue Oct 4 07:33:39 2022 -0700     drm/amdgpu: Fix VRAM BO swap issue     DRM buddy manager allocates the

Re: [git pull] drm fixes for 6.1-rc1

2022-10-17 Thread Arunpravin Paneer Selvam
rly. Arun can you trace the allocation and make sure that all kernel allocations have the CONTIGUOUS flag set? Thanks, Christian. Dave. From 132ce83f893eaea743fb7f41a9dc72afea52cdaa Mon Sep 17 00:00:00 2001 From: Arunpravin Paneer Selvam Date: Mon, 17 Oct 2022 13:15:21 -0700 Subject: [PATC

Re: [PATCH 2/2] drm/gem: Remove BUG_ON in drm_gem_private_object_init

2022-11-16 Thread Arunpravin Paneer Selvam
Hi Amar, On 11/16/2022 2:20 PM, Somalapuram Amaranath wrote: ttm_resource allocate size in bytes i.e less than page size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem.c b/driver

Re: [PATCH 2/2] drm/gem: Remove BUG_ON in drm_gem_private_object_init

2022-11-21 Thread Arunpravin Paneer Selvam
On 11/22/2022 10:48 AM, Somalapuram, Amaranath wrote: On 11/16/2022 2:50 PM, Arunpravin Paneer Selvam wrote: Hi Amar, On 11/16/2022 2:20 PM, Somalapuram Amaranath wrote: ttm_resource allocate size in bytes i.e less than page size. Signed-off-by: Somalapuram Amaranath ---   drivers/gpu

Re: [PATCH 1/9] drm/amdgpu: generally allow over-commit during BO allocation

2022-11-27 Thread Arunpravin Paneer Selvam
Hi Christian, Looks good to me. Reviewed-by: Arunpravin Paneer Selvam for the series. Regards, Arun. On 11/25/2022 3:51 PM, Christian König wrote: We already fallback to a dummy BO with no backing store when we allocate GDS,GWS and OA resources and to GTT when we allocate VRAM. Drop all

Re: [PATCH v3] drm: Optimise for continuous memory allocation

2022-11-28 Thread Arunpravin Paneer Selvam
Hi Xinhui, On 11/28/2022 12:04 PM, xinhui pan wrote: Currently drm-buddy does not have full knowledge of continuous memory. Lets consider scenario below. order 1:L R order 0: LL LR RL RR for order 1 allocation, it can offer L or R or LR+RL. For now, we only impl

[PATCH] drm: Alloc high address for drm buddy topdown flag

2023-01-07 Thread Arunpravin Paneer Selvam
list in the freelist and return the max block. This patch improves the viewperf 3D benchmark scores. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 81 - 1 file changed, 54 insertions(+), 27 deletions(-) diff --git a/drivers/gpu

Re: [PATCH] drm: Alloc high address for drm buddy topdown flag

2023-01-10 Thread Arunpravin Paneer Selvam
Hi Matthew, On 1/10/2023 5:32 PM, Matthew Auld wrote: On 07/01/2023 15:15, Arunpravin Paneer Selvam wrote: As we are observing low numbers in viewperf graphics benchmark, we are strictly not allowing the top down flag enabled allocations to steal the memory space from cpu visible region. The

Re: [PATCH] drm/buddy: Fix drm buddy info output format

2023-08-07 Thread Arunpravin Paneer Selvam
looks good to me as well. Reviewed-by: Arunpravin Paneer Selvam On 8/7/2023 12:17 PM, Christian König wrote: Am 04.08.23 um 08:56 schrieb Ma Jun: [1] Change pages to blocks to avoid confusion. [2] Fix output format to align the output info. Signed-off-by: Ma Jun Of hand looks good to me

[PATCH 1/3] drm/buddy: Fix contiguous memory allocation issues

2023-08-21 Thread Arunpravin Paneer Selvam
part and trim function to the drm buddy manager. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 253 ++-- include/drm/drm_buddy.h | 6 +- 2 files changed, 248 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_budd

[PATCH 2/3] drm/amdgpu: Remove the contiguous computation and trim

2023-08-21 Thread Arunpravin Paneer Selvam
Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 58 ++-- 1 file changed, 4 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c index c7085a747b03..18f58efc9dc7 100644 --- a/drivers

[PATCH 3/3] drm/i915: Remove the contiguous computation and trim

2023-08-21 Thread Arunpravin Paneer Selvam
Paneer Selvam --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c index a1bc804cfa15..0d735d5c2b35 100644 --- a

Re: [PATCH 0/4] drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list' and simplify amdgpu_bo_list_create()

2023-08-21 Thread Arunpravin Paneer Selvam
Hi Christian, I ran GLMark2, unigine heaven and Tomb Raider on steam. I didn't observe any issues. Regards, Arun. On 8/21/2023 4:33 PM, Christian König wrote: Am 20.08.23 um 11:51 schrieb Christophe JAILLET: This serie simplifies amdgpu_bo_list_create() and usage of the 'struct amdgpu_bo_li

Re: [PATCH 1/3] drm/buddy: Fix contiguous memory allocation issues

2023-08-22 Thread Arunpravin Paneer Selvam
On 21/08/23 10:46, Matthew Auld wrote: Hi, On 21/08/2023 11:14, Arunpravin Paneer Selvam wrote: The way now contiguous requests are implemented such that the size rounded up to power of 2 and the corresponding order block picked from the freelist. In addition to the older method, the new

Re: [PATCH 1/3] drm/buddy: Fix contiguous memory allocation issues

2023-08-22 Thread Arunpravin Paneer Selvam
On 22/08/23 22:52, Christian König wrote: Am 21.08.23 um 13:16 schrieb Christian König: Am 21.08.23 um 12:14 schrieb Arunpravin Paneer Selvam: The way now contiguous requests are implemented such that the size rounded up to power of 2 and the corresponding order block picked from the

Re: [PATCH RFC 2/2] drm: add documentation for drm_buddy_test kUnit test

2023-07-13 Thread Arunpravin Paneer Selvam
Looks good, Feel free to add Reviewed-by: Arunpravin Paneer Selvam Regards, Arun. On 7/13/2023 12:09 PM, Christian König wrote: [Adding Arun] Am 12.07.23 um 16:28 schrieb Mauro Carvalho Chehab: As an example for the new documentation tool, add a documentation for drm_buddy_test. I opted

[PATCH v2 1/3] drm/buddy: Improve contiguous memory allocation

2023-09-09 Thread Arunpravin Paneer Selvam
() 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 --- drivers/gpu/drm/drm_buddy.c | 138 include/drm/drm_buddy.h | 6 +- 2 files changed

[PATCH v2 2/3] drm/amdgpu: Move the size computations to drm buddy

2023-09-09 Thread Arunpravin Paneer Selvam
- 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 --- drivers/gpu/drm/amd/amdgpu

[PATCH v2 3/3] drm/i915: Move the size computations to drm buddy

2023-09-09 Thread Arunpravin Paneer Selvam
- 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 --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 23

  1   2   3   >