Re: [PATCH v5 1/2] drm/buddy: Optimize free block management with RB tree

2025-09-02 Thread Arunpravin Paneer Selvam
On 9/2/2025 1:11 AM, Peter Zijlstra wrote: On Tue, Sep 02, 2025 at 12:26:04AM +0530, Arunpravin Paneer Selvam wrote: Replace the freelist (O(n)) used for free block management with a red-black tree, providing more efficient O(log n) search, insert, and delete operations. This improves

Re: [PATCH v5 1/2] drm/buddy: Optimize free block management with RB tree

2025-09-02 Thread Arunpravin Paneer Selvam
On 9/2/2025 3:53 PM, Jani Nikula wrote: On Tue, 02 Sep 2025, Arunpravin Paneer Selvam wrote: Replace the freelist (O(n)) used for free block management with a red-black tree, providing more efficient O(log n) search, insert, and delete operations. This improves scalability and performance

[PATCH v5 2/2] drm/buddy: Separate clear and dirty free block trees

2025-09-01 Thread Arunpravin Paneer Selvam
ader and usage and the whole enum should be an implementation detail. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4260 --- drivers/gpu/drm/drm_buddy.c | 336 +--- include/drm

Re: [PATCH v4 2/2] drm/buddy: Separate clear and dirty free block trees

2025-09-01 Thread Arunpravin Paneer Selvam
Hi Jani, On 8/28/2025 4:43 PM, Jani Nikula wrote: On Thu, 28 Aug 2025, Arunpravin Paneer Selvam wrote: Maintain two separate RB trees per order - one for clear (zeroed) blocks and another for dirty (uncleared) blocks. This separation improves code clarity and makes it more obvious which tree

[PATCH v5 1/2] drm/buddy: Optimize free block management with RB tree

2025-09-01 Thread Arunpravin Paneer Selvam
to have less generic names and move to .c file. - Make the rb node rb and link field as union. v4(Jani Nikula): - The kernel-doc comment should be "/**" - Move all the rbtree macros to rbtree.h and add parens to ensure correct precedence. Signed-off-by: Arunpravin Pan

[PATCH v4 1/2] drm/buddy: Optimize free block management with RB tree

2025-08-28 Thread Arunpravin Paneer Selvam
to have less generic names and move to .c file. - Make the rb node rb and link field as union. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 177 +--- include/drm/drm_buddy.h | 9 +- 2 files changed, 131 insertions(+), 55

[PATCH v4 2/2] drm/buddy: Separate clear and dirty free block trees

2025-08-28 Thread Arunpravin Paneer Selvam
cessary rbtree_is_empty() check (Matthew) - Remove the unnecessary get_tree_for_flags() function. - Rename get_tree_for_block() name with get_block_tree() for more clarity. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld Closes: https://gitlab.freedesktop.org/drm/amd/-/issu

Re: [PATCH v3 1/2] drm/buddy: Optimize free block management with RB tree

2025-08-25 Thread Arunpravin Paneer Selvam
On 8/22/2025 5:58 PM, Matthew Auld wrote: On 22/08/2025 09:37, Matthew Auld wrote: On 21/08/2025 16:06, Arunpravin Paneer Selvam wrote: Replace the freelist (O(n)) used for free block management with a red-black tree, providing more efficient O(log n) search, insert, and delete operations

Re: [PATCH v3 2/2] drm/buddy: Separate clear and dirty free block trees

2025-08-25 Thread Arunpravin Paneer Selvam
On 8/22/2025 5:32 PM, Matthew Auld wrote: On 21/08/2025 16:06, Arunpravin Paneer Selvam wrote: Maintain two separate RB trees per order - one for clear (zeroed) blocks and another for dirty (uncleared) blocks. This separation improves code clarity and makes it more obvious which tree is being

[PATCH v3 2/2] drm/buddy: Separate clear and dirty free block trees

2025-08-21 Thread Arunpravin Paneer Selvam
tree field. - Make free_trees[] instead of clear_tree and dirty_tree for more cleaner approach. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4260 --- drivers/gpu/drm/drm_buddy.c | 342

[PATCH v3 1/2] drm/buddy: Optimize free block management with RB tree

2025-08-21 Thread Arunpravin Paneer Selvam
to have less generic names and move to .c file. - Make the rb node rb and link field as union. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 175 +--- include/drm/drm_buddy.h | 9 +- 2 files changed, 130 insertions(+), 54

Re: [PATCH v2 2/2] drm/buddy: Separate clear and dirty free block trees

2025-08-20 Thread Arunpravin Paneer Selvam
Hi Matthew, On 8/14/2025 4:41 PM, Matthew Auld wrote: On 24/07/2025 11:46, Arunpravin Paneer Selvam wrote: Maintain two separate RB trees per order - one for clear (zeroed) blocks and another for dirty (uncleared) blocks. This separation improves code clarity and makes it more obvious which

Re: [PATCH v2 1/2] drm/buddy: Optimize free block management with RB tree

2025-08-20 Thread Arunpravin Paneer Selvam
On 8/20/2025 3:44 PM, Matthew Auld wrote: On 20/08/2025 08:56, Arunpravin Paneer Selvam wrote: Hi Matthew, On 8/14/2025 4:15 PM, Matthew Auld wrote: On 24/07/2025 11:46, Arunpravin Paneer Selvam wrote: Replace the freelist (O(n)) used for free block management with a red-black tree

Re: [PATCH v2 1/2] drm/buddy: Optimize free block management with RB tree

2025-08-20 Thread Arunpravin Paneer Selvam
Hi Matthew, On 8/14/2025 4:15 PM, Matthew Auld wrote: On 24/07/2025 11:46, Arunpravin Paneer Selvam wrote: Replace the freelist (O(n)) used for free block management with a red-black tree, providing more efficient O(log n) search, insert, and delete operations. This improves scalability and

[PATCH v2 2/2] drm/buddy: Separate clear and dirty free block trees

2025-07-24 Thread Arunpravin Paneer Selvam
the suggested-by tag. Added it in v2. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld --- drivers/gpu/drm/drm_buddy.c | 316 ++-- include/drm/drm_buddy.h | 15 +- 2 files changed, 204 insertions(+), 127 deletions(-) diff --git a/drivers/gpu

[PATCH v2 1/2] drm/buddy: Optimize free block management with RB tree

2025-07-24 Thread Arunpravin Paneer Selvam
% with the RB tree (rbtree_insert.isra.0), despite performing the same sorted insert. This also improves performance in heavily fragmented workloads, such as games or graphics tests that stress memory. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 141

[PATCH 1/2] drm/buddy: Optimize free block management with RB tree

2025-07-22 Thread Arunpravin Paneer Selvam
% with the RB tree (rbtree_insert.isra.0), despite performing the same sorted insert. This also improves performance in heavily fragmented workloads, such as games or graphics tests that stress memory. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 141

[PATCH 2/2] drm/buddy: Separate clear and dirty free block trees

2025-07-22 Thread Arunpravin Paneer Selvam
: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 316 ++-- include/drm/drm_buddy.h | 15 +- 2 files changed, 204 insertions(+), 127 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 19e9773b41be..0ffb68474b83 100644

Re: [PATCH v5 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-16 Thread Arunpravin Paneer Selvam
On 7/16/2025 4:31 PM, Christian König wrote: On 16.07.25 12:47, Christian König wrote: On 16.07.25 12:28, Arunpravin Paneer Selvam wrote: Hi Dave, I am trying to push this series into drm-misc-fixes, but I get the below error when dim push-branch drm-misc-fixes. dim:ERROR:e24c180b4300

Re: [PATCH v5 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-16 Thread Arunpravin Paneer Selvam
Hi Christian, On 7/16/2025 4:17 PM, Christian König wrote: On 16.07.25 12:28, Arunpravin Paneer Selvam wrote: Hi Dave, I am trying to push this series into drm-misc-fixes, but I get the below error when dim push-branch drm-misc-fixes. dim:ERROR:e24c180b4300("drm/amdgpu:Reset the clear

Re: [PATCH v5 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-16 Thread Arunpravin Paneer Selvam
cked-by is required to push the patches into drm-misc-fixes ? Regards, Arun. On 7/16/2025 1:21 PM, Arunpravin Paneer Selvam wrote: - Added a handler in DRM buddy manager to reset the cleared flag for the blocks in the freelist. - This is necessary because, upon resuming, the VR

[PATCH v5 1/3] drm/amdgpu: Add WARN_ON to the resource clear function

2025-07-16 Thread Arunpravin Paneer Selvam
(Christian). - Modified the patch subject name. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH v4 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-16 Thread Arunpravin Paneer Selvam
On 7/16/2025 1:21 PM, Christian König wrote: On 16.07.25 09:41, Arunpravin Paneer Selvam wrote: - Added a handler in DRM buddy manager to reset the cleared flag for the blocks in the freelist. - This is necessary because, upon resuming, the VRAM becomes cluttered with BIOS data, yet

[PATCH v5 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-16 Thread Arunpravin Paneer Selvam
to avoid the use of extra reset flag. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Acked-by: Christian König Reviewed-by: Matthew Auld Cc: sta...@vger.kernel.org Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") Closes: https://gitlab.freed

[PATCH v5 3/3] drm/buddy: Add a new unit test case for buffer clearance issue

2025-07-16 Thread Arunpravin Paneer Selvam
when the blocks clear reset function is called. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld --- drivers/gpu/drm/tests/drm_buddy_test.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm

[PATCH v4 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-16 Thread Arunpravin Paneer Selvam
to avoid the use of extra reset flag. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Reviewed-by: Matthew Auld Cc: sta...@vger.kernel.org Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") Closes: https://gitlab.freedesktop.org/drm/amd/-/i

[PATCH v4 3/3] drm/buddy: Add a new unit test case for buffer clearance issue

2025-07-16 Thread Arunpravin Paneer Selvam
when the blocks clear reset function is called. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld --- drivers/gpu/drm/tests/drm_buddy_test.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm

[PATCH v4 1/3] drm/amdgpu: Add WARN_ON to the resource clear function

2025-07-16 Thread Arunpravin Paneer Selvam
(Christian). - Modified the patch subject name. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH v3 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-10 Thread Arunpravin Paneer Selvam
On 7/10/2025 7:50 PM, Matthew Auld wrote: On 10/07/2025 08:14, Arunpravin Paneer Selvam wrote: On 7/8/2025 2:30 PM, Matthew Auld wrote: On 08/07/2025 07:54, Arunpravin Paneer Selvam wrote: - Added a handler in DRM buddy manager to reset the cleared    flag for the blocks in the freelist

Re: [PATCH v3 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-10 Thread Arunpravin Paneer Selvam
On 7/8/2025 2:30 PM, Matthew Auld wrote: On 08/07/2025 07:54, Arunpravin Paneer Selvam wrote: - Added a handler in DRM buddy manager to reset the cleared    flag for the blocks in the freelist. - This is necessary because, upon resuming, the VRAM becomes    cluttered with BIOS data, yet the

[PATCH v3 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-07 Thread Arunpravin Paneer Selvam
to avoid the use of extra reset flag. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Cc: sta...@vger.kernel.org Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3812 --- drivers/gpu/drm/

[PATCH v3 3/3] drm/buddy: Add a new unit test case for buffer clearance issue

2025-07-07 Thread Arunpravin Paneer Selvam
when the blocks clear reset function is called. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/tests/drm_buddy_test.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index

[PATCH v3 1/3] drm/amdgpu: Add WARN_ON to the resource clear function

2025-07-07 Thread Arunpravin Paneer Selvam
(Christian). - Modified the patch subject name. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Cc: sta...@vger.kernel.org Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 5 - 1 file changed, 4

Re: [PATCH v2 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-07 Thread Arunpravin Paneer Selvam
Hi Matthew, On 7/4/2025 2:22 PM, Matthew Auld wrote: On 01/07/2025 20:08, Arunpravin Paneer Selvam wrote: - Added a handler in DRM buddy manager to reset the cleared    flag for the blocks in the freelist. - This is necessary because, upon resuming, the VRAM becomes    cluttered with BIOS

Re: [PATCH v2 1/3] drm/amdgpu: Dirty cleared blocks on free

2025-07-03 Thread Arunpravin Paneer Selvam
On 7/2/2025 7:11 PM, Christian König wrote: On 02.07.25 13:58, Arunpravin Paneer Selvam wrote: Hi Christian, On 7/2/2025 1:27 PM, Christian König wrote: On 01.07.25 21:08, Arunpravin Paneer Selvam wrote: Set the dirty bit when the memory resource is not cleared during BO release. v2

Re: [PATCH v2 1/3] drm/amdgpu: Dirty cleared blocks on free

2025-07-02 Thread Arunpravin Paneer Selvam
Hi Christian, On 7/2/2025 1:27 PM, Christian König wrote: On 01.07.25 21:08, Arunpravin Paneer Selvam wrote: Set the dirty bit when the memory resource is not cleared during BO release. v2(Christian): - Drop the cleared flag set to false. - Improve the amdgpu_vram_mgr_set_clear_state

[PATCH v2 2/3] drm/amdgpu: Reset the clear flag in buddy during resume

2025-07-01 Thread Arunpravin Paneer Selvam
drm_buddy_clear_reset_blocks()(Matthew Auld) - Force merge the two dirty blocks.(Matthew Auld) - Add a new unit test case for this issue.(Matthew Auld) - Having this function being able to flip the state either way would be good. (Matthew Brost) Signed-off-by: Arunpravin Paneer Selvam

[PATCH v2 3/3] drm/buddy: Add a new unit test case for buffer clearance issue

2025-07-01 Thread Arunpravin Paneer Selvam
when the blocks clear reset function is called. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/tests/drm_buddy_test.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index

[PATCH v2 1/3] drm/amdgpu: Dirty cleared blocks on free

2025-07-01 Thread Arunpravin Paneer Selvam
Set the dirty bit when the memory resource is not cleared during BO release. v2(Christian): - Drop the cleared flag set to false. - Improve the amdgpu_vram_mgr_set_clear_state() function. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Cc: sta...@vger.kernel.org Fixes

[PATCH 1/2] drm/amdgpu: Dirty cleared blocks on free

2025-06-22 Thread Arunpravin Paneer Selvam
Set the dirty bit when the memory resource is not cleared during BO release. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian König Cc: sta...@vger.kernel.org Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") --- drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 2/2] drm/amdgpu: Reset the clear flag in buddy during resume

2025-06-22 Thread Arunpravin Paneer Selvam
- Added a handler in DRM buddy manager to reset the cleared flag for the blocks in the freelist. - This is necessary because, upon resuming, the VRAM becomes cluttered with BIOS data, yet the VRAM backend manager believes that everything has been cleared. Signed-off-by: Arunpravin Paneer

Re: [PATCH 1/2] drm/buddy: Add public helper to dirty blocks

2025-05-29 Thread Paneer Selvam, Arunpravin
On 5/28/2025 1:13 AM, Natalie Vock wrote: Cleared blocks that are handed out to users after allocation cannot be presumed to remain cleared. Thus, allocators using drm_buddy need to dirty all blocks on the allocation success path. Provide a helper for them to use. Fixes: 96950929eb232 ("drm/bu

Re: [PATCH 2/2] drm/amdgpu: Dirty cleared blocks on allocation

2025-05-28 Thread Paneer Selvam, Arunpravin
On 5/28/2025 2:59 PM, Natalie Vock wrote: Hi, On 5/28/25 09:07, Christian König wrote: On 5/27/25 21:43, Natalie Vock wrote: If we hand out cleared blocks to users, they are expected to write at least some non-zero values somewhere. If we keep the CLEAR bit set on the block, amdgpu_fill_b

Re: [PATCH v2 2/2] drm/buddy: Add a testcase to verify the multiroot fini

2025-01-15 Thread Paneer Selvam, Arunpravin
Hi Jani, I merged the below patch into drm-misc-next, Please try rebuilding the drm-tip. https://cgit.freedesktop.org/drm/drm-misc/commit/?id=00728273bdf1001f8d2f7b65bc398000d7defe0b Thanks, Arun. On 1/15/2025 5:08 PM, Jani Nikula wrote: On Thu, 26 Dec 2024, Arunpravin Paneer Selvam

Re: [PATCH v2] drm/tests/buddy: fix build with unused prng

2025-01-15 Thread Paneer Selvam, Arunpravin
Thank you, I was going to send this patch out. Reviewed-by: Arunpravin Paneer Selvam @Jani, Thomas - Are you planning to merge this patch into drm-misc-next and try re-building drm-tip? Regards, Arun. On 1/15/2025 6:19 PM, Matthew Auld wrote: We no longer use the prng, which leads to the

Re: [PATCH v2 2/2] drm/buddy: Add a testcase to verify the multiroot fini

2025-01-06 Thread Paneer Selvam, Arunpravin
Hi Matthew, Ping? Regards, Arun. On 12/26/2024 12:31 PM, Arunpravin Paneer Selvam wrote: - Added a testcase to verify the multiroot force merge fini. - Added a new field in_use to track the mm freed status. v2:(Matthew) - Add kunit_fail_current_test() when WARN_ON is true. Signed-off-by

[PATCH v2 1/2] drm/buddy: fix issue that force_merge cannot free all roots

2024-12-25 Thread Arunpravin Paneer Selvam
From: Lin.Cao If buddy manager have more than one roots and each root have sub-block need to be free. When drm_buddy_fini called, the first loop of force_merge will merge and free all of the sub block of first root, which offset is 0x0 and size is biggest(more than have of the mm size). In subseq

[PATCH v2 2/2] drm/buddy: Add a testcase to verify the multiroot fini

2024-12-25 Thread Arunpravin Paneer Selvam
- Added a testcase to verify the multiroot force merge fini. - Added a new field in_use to track the mm freed status. v2:(Matthew) - Add kunit_fail_current_test() when WARN_ON is true. Signed-off-by: Arunpravin Paneer Selvam Signed-off-by: Lin.Cao --- drivers/gpu/drm/drm_buddy.c

Re: [PATCH 2/2] drm/buddy: Add a testcase to verify the multiroot fini

2024-12-20 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 12/16/2024 11:52 PM, Matthew Auld wrote: On 16/12/2024 13:07, Arunpravin Paneer Selvam wrote: - Added a testcase to verify the multiroot force merge fini. - Added a new field in_use to track the mm freed status. Signed-off-by: Arunpravin Paneer Selvam Signed-off-by: Lin.Cao

[PATCH 2/2] drm/buddy: Add a testcase to verify the multiroot fini

2024-12-16 Thread Arunpravin Paneer Selvam
- Added a testcase to verify the multiroot force merge fini. - Added a new field in_use to track the mm freed status. Signed-off-by: Arunpravin Paneer Selvam Signed-off-by: Lin.Cao --- drivers/gpu/drm/drm_buddy.c| 20 - drivers/gpu/drm/tests/drm_buddy_test.c | 30

[PATCH 1/2] drm/buddy: fix issue that force_merge cannot free all roots

2024-12-16 Thread Arunpravin Paneer Selvam
From: Lin.Cao If buddy manager have more than one roots and each root have sub-block need to be free. When drm_buddy_fini called, the first loop of force_merge will merge and free all of the sub block of first root, which offset is 0x0 and size is biggest(more than have of the mm size). In subseq

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-26 Thread Paneer Selvam, Arunpravin
On 7/24/2024 8:42 PM, Jani Nikula wrote: On Tue, 23 Jul 2024, Arunpravin Paneer Selvam wrote: - Add a new start parameter in trim function to specify exact address from where to start the trimming. This would help us in situations like if drivers would like to do address alignment

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-23 Thread Paneer Selvam, Arunpravin
Hi Matthew, Can we push this version for now as we need to mainline the DCC changes ASAP, while we continue our discussion and proceed to implement the permanent solution for address alignment? Thanks, Arun. On 7/23/2024 6:55 PM, Arunpravin Paneer Selvam wrote: - Add a new start parameter

[PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-23 Thread Arunpravin Paneer Selvam
disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. v1:(Matthew) - check new_start alignment with min chunk_size - use range_overflows() Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex

[PATCH v7 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-23 Thread Arunpravin Paneer Selvam
into gmc_v12_0_get_dcc_alignment. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex Deucher Acked-by: Christian König Reviewed-by: Frank Min --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 6 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 29 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v1

Re: [PATCH] drm/buddy: Add start address support to trim function

2024-07-22 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 7/19/2024 4:01 PM, Matthew Auld wrote: On 17/07/2024 16:02, Paneer Selvam, Arunpravin wrote: On 7/16/2024 3:34 PM, Matthew Auld wrote: On 16/07/2024 10:50, Paneer Selvam, Arunpravin wrote: Hi Matthew, On 7/10/2024 6:20 PM, Matthew Auld wrote: On 10/07/2024 07:03, Paneer

[PATCH v6 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-18 Thread Arunpravin Paneer Selvam
exist. - Add the callback to amdgpu_gmc_funcs. v6: - Fix checkpatch warning reported by Intel CI. v7:(Christian) - remove the AMDGPU_GEM_CREATE_GFX12_DCC flag and keep a flag that checks the BO pinning and for a specific hw generation. Signed-off-by: Arunpravin Paneer Selvam Acked-by:

[PATCH v6 1/2] drm/buddy: Add start address support to trim function

2024-07-18 Thread Arunpravin Paneer Selvam
disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. v1:(Matthew) - check new_start alignment with min chunk_size - use range_overflows() Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex

Re: [PATCH] drm/buddy: Add start address support to trim function

2024-07-17 Thread Paneer Selvam, Arunpravin
On 7/16/2024 3:34 PM, Matthew Auld wrote: On 16/07/2024 10:50, Paneer Selvam, Arunpravin wrote: Hi Matthew, On 7/10/2024 6:20 PM, Matthew Auld wrote: On 10/07/2024 07:03, Paneer Selvam, Arunpravin wrote: Thanks Alex. Hi Matthew, Any comments? Do we not pass the required address

Re: [PATCH v5 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-17 Thread Paneer Selvam, Arunpravin
gnment field directly? Marek On Tue, Jul 16, 2024, 11:45 Arunpravin Paneer Selvam wrote: Add address alignment support to the DCC VRAM buffers. v2:   - adjust size based on the max_texture_channel_caches values     only for GFX12 DCC buffers.   - used AMDGPU_GEM_CREATE_

[PATCH v5 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-16 Thread Arunpravin Paneer Selvam
exist. - Add the callback to amdgpu_gmc_funcs. v6: - Fix checkpatch error reported by Intel CI. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex Deucher Acked-by: Christian König Reviewed-by: Frank Min --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 6 drivers/gpu/drm/amd/a

[PATCH v5 1/2] drm/buddy: Add start address support to trim function

2024-07-16 Thread Arunpravin Paneer Selvam
disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. v1:(Matthew) - check new_start alignment with min chunk_size - use range_overflows() Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex

Re: [PATCH] drm/buddy: Add start address support to trim function

2024-07-16 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 7/10/2024 6:20 PM, Matthew Auld wrote: On 10/07/2024 07:03, Paneer Selvam, Arunpravin wrote: Thanks Alex. Hi Matthew, Any comments? Do we not pass the required address alignment when allocating the pages in the first place? If address alignment is really useful, we can add

[PATCH 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-16 Thread Arunpravin Paneer Selvam
exist. - Add the callback to amdgpu_gmc_funcs. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex Deucher Acked-by: Christian König Reviewed-by: Frank Min --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 36 ++-- driver

[PATCH 1/2] drm/buddy: Add start address support to trim function

2024-07-16 Thread Arunpravin Paneer Selvam
disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. v1:(Matthew) - check new_start alignment with min chunk_size - use range_overflows() Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex

Re: [PATCH] drm/buddy: Add start address support to trim function

2024-07-09 Thread Paneer Selvam, Arunpravin
Thanks Alex. Hi Matthew, Any comments? Thanks, Arun. On 7/9/2024 1:42 AM, Alex Deucher wrote: On Thu, Jul 4, 2024 at 4:40 AM Arunpravin Paneer Selvam wrote: - Add a new start parameter in trim function to specify exact address from where to start the trimming. This would help us in

[PATCH 2/2] drm/amdgpu: Add address alignment support to DCC buffers

2024-07-04 Thread Arunpravin Paneer Selvam
exist. - Add the callback to amdgpu_gmc_funcs. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 36 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 15 3 files change

[PATCH] drm/buddy: Add start address support to trim function

2024-07-04 Thread Arunpravin Paneer Selvam
disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. v1:(Matthew) - check new_start alignment with min chunk_size - use range_overflows() Signed-off-by: Arunpravin Paneer Selvam --- drivers

Re: [PATCH v14 00/12] Improve test coverage of TTM

2024-06-24 Thread Paneer Selvam, Arunpravin
Hi Amar, I pushed all the patches into drm-misc-next. Regards, Arun. On 6/21/2024 11:41 AM, Somalapuram, Amaranath wrote: Hi Arun, I still don't have commit permission. Can you please help to push this patches. Regards, S.Amarnath On 6/20/2024 2:38 PM, Karolina Stolarek wrote: Hi Christi

[PATCH] drm/buddy: Add start address support to trim function

2024-06-20 Thread Arunpravin Paneer Selvam
disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/drm_buddy.c | 22 -- drivers/gpu/drm/xe

Re: [PATCH v2] drm/buddy: Fix the warn on's during force merge

2024-05-17 Thread Paneer Selvam, Arunpravin
Hi Dave, Please help pull this patch into drm-next. This will fix any unnecessary warnings in memory pressure situation. Thanks for the help. Regards, Arun. On 5/17/2024 8:03 PM, Arunpravin Paneer Selvam wrote: Move the fallback and block incompatible checks above, so that we dont

Re: [PATCH v2] drm/buddy: Fix the warn on's during force merge

2024-05-17 Thread Paneer Selvam, Arunpravin
On 5/17/2024 7:30 PM, Matthew Auld wrote: On 17/05/2024 14:50, Arunpravin Paneer Selvam wrote: Move the fallback and block incompatible checks above, so that we dont unnecessarily split the blocks and leaving the unmerged. This resolves the unnecessary warn on's thrown during force_

[PATCH v2] drm/buddy: Fix the warn on's during force merge

2024-05-17 Thread Arunpravin Paneer Selvam
check. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld Fixes: 96950929eb23 ("drm/buddy: Implement tracking clear page feature") Link: https://patchwork.kernel.org/project/dri-devel/patch/20240517135015.17565-1-arunpravin.paneersel...@amd.com/ --- drivers/gpu/drm/

Re: [PATCH v2] drm/buddy: Fix the warn on's during force merge

2024-05-17 Thread Paneer Selvam, Arunpravin
Hi Matthew, This fixes the problem. Regards, Arun. On 5/17/2024 7:20 PM, Arunpravin Paneer Selvam wrote: Move the fallback and block incompatible checks above, so that we dont unnecessarily split the blocks and leaving the unmerged. This resolves the unnecessary warn on's thrown d

[PATCH v2] drm/buddy: Fix the warn on's during force merge

2024-05-17 Thread Arunpravin Paneer Selvam
check. Signed-off-by: Arunpravin Paneer Selvam Fixes: 96950929eb23 ("drm/buddy: Implement tracking clear page feature") --- drivers/gpu/drm/drm_buddy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c ind

Re: [PATCH] drm/buddy: Merge back blocks in bias range function

2024-05-17 Thread Paneer Selvam, Arunpravin
Hi Matthew, Could you help review this patch quickly. Hi Dave This patch just fixes the unnecessary warn on's triggered during the force_merge call. Regards, Arun. On 5/17/2024 6:08 PM, Arunpravin Paneer Selvam wrote: In bias range allocation, when we don't find the required block

[PATCH] drm/buddy: Merge back blocks in bias range function

2024-05-17 Thread Arunpravin Paneer Selvam
ge as true. This resolves the unnecessary warn on's thrown during force_merge call. Signed-off-by: Arunpravin Paneer Selvam Fixes: 96950929eb23 ("drm/buddy: Implement tracking clear page feature") --- drivers/gpu/drm/drm_buddy.c | 32 ++-- 1 file chan

Re: [git pull] drm urgent for 6.10-rc1

2024-05-16 Thread Paneer Selvam, Arunpravin
On 5/17/2024 12:01 AM, Alex Deucher wrote: On Thu, May 16, 2024 at 2:02 PM Linus Torvalds wrote: On Wed, 15 May 2024 at 19:54, Dave Airlie wrote: Here is the buddy allocator fix I picked up from the list, please apply. So I removed my reverts, and am running a kernel that includes the mer

Re: [git pull] drm for 6.10-rc1

2024-05-15 Thread Paneer Selvam, Arunpravin
On 5/16/2024 8:12 AM, Dave Airlie wrote: On Thu, 16 May 2024 at 10:06, Dave Airlie wrote: On Thu, 16 May 2024 at 09:50, Dave Airlie wrote: On Thu, 16 May 2024 at 06:29, Linus Torvalds wrote: On Wed, 15 May 2024 at 13:24, Linus Torvalds wrote: I have to revert both a68c7eaa7a8f ("dr

[PATCH v3 1/2] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-14 Thread Arunpravin Paneer Selvam
failure following system goes into unresponsive state. Solution: Remove the unnecessary clear_avail check in the range bias allocation function. v2: add a kunit for this corner case (Daniel Vetter) Signed-off-by: Arunpravin Paneer Selvam Fixes: 96950929eb23 ("drm/buddy: Implement tracking

[PATCH v3 2/2] drm/tests: Add a unit test for range bias allocation

2024-05-14 Thread Arunpravin Paneer Selvam
tthew) - move the size to the variable declaration section. - move the mm.clear_avail init to allocator init. Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld --- drivers/gpu/drm/tests/drm_buddy_test.c | 36 +- 1 file changed, 35 insertions(+), 1 deletion(-)

Re: [PATCH v2 2/2] drm/tests: Add a unit test for range bias allocation

2024-05-13 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 5/13/2024 1:49 PM, Matthew Auld wrote: On 12/05/2024 08:59, Arunpravin Paneer Selvam wrote: Allocate cleared blocks in the bias range when the DRM buddy's clear avail is zero. This will validate the bias range allocation in scenarios like system boot when no cleared block

Re: [PATCH] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-12 Thread Paneer Selvam, Arunpravin
Hi Daniel, On 5/8/2024 2:11 PM, Daniel Vetter wrote: On Wed, May 08, 2024 at 12:27:20PM +0530, Arunpravin Paneer Selvam wrote: Problem statement: During the system boot time, an application request for the bulk volume of cleared range bias memory when the clear_avail is zero, we dont fallback

[PATCH v2 1/2] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-12 Thread Arunpravin Paneer Selvam
failure following system goes into unresponsive state. Solution: Remove the unnecessary clear_avail check in the range bias allocation function. v2: add a kunit for this corner case (Daniel Vetter) Signed-off-by: Arunpravin Paneer Selvam Fixes: 96950929eb23 ("drm/buddy: Implement tracking

[PATCH v2 2/2] drm/tests: Add a unit test for range bias allocation

2024-05-12 Thread Arunpravin Paneer Selvam
ff-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/tests/drm_buddy_test.c | 35 ++ 1 file changed, 35 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index e3b50e240d36..a194f271bc55 100644 --- a/drivers/gpu/drm/

[PATCH] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-07 Thread Arunpravin Paneer Selvam
failure following system goes into unresponsive state. Solution: Remove the unnecessary clear_avail check in the range bias allocation function. Signed-off-by: Arunpravin Paneer Selvam Fixes: 96950929eb23 ("drm/buddy: Implement tracking clear page feature") Reviewed-by: Matthew Auld --

[PATCH] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-06 Thread Arunpravin Paneer Selvam
failure following system goes into unresponsive state. Solution: Remove the unnecessary clear_avail check in the range bias allocation function. Signed-off-by: Arunpravin Paneer Selvam Fixes: 96950929eb23 ("drm/buddy: Implement tracking clear page feature") --- drivers/gpu/drm/drm_b

Re: [PATCH v11 1/3] drm/buddy: Implement tracking clear page feature

2024-04-15 Thread Paneer Selvam, Arunpravin
Hi Christian, Could you please push these patches into drm branch. Thanks, Arun. On 4/15/2024 2:53 AM, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it successfully clears the blocks in the free path. On the

[PATCH v11 3/3] drm/tests: Add a test case for drm buddy clear allocation

2024-04-14 Thread Arunpravin Paneer Selvam
with non power-of-two size to ensure the multi-root force_merge during fini. v3: - add randomness in size calculation(Matthew) Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld Suggested-by: Matthew Auld --- drivers/gpu/drm/tests/drm_buddy_test.c | 143

[PATCH v11 1/3] drm/buddy: Implement tracking clear page feature

2024-04-14 Thread Arunpravin Paneer Selvam
when contains && split(Matthew) - add range support to force merge function. v6: - modify the alloc_range() function clear page non merged blocks allocation(Matthew) - correct the list_insert function name(Matthew). Signed-off-by: Arunpravin Paneer Selvam Signed-off-by:

[PATCH v11 2/3] drm/amdgpu: Enable clear page functionality

2024-04-14 Thread Arunpravin Paneer Selvam
s_cleared(&cursor) check. v4(Christian): - vres flag setting move to vram manager file - use dma_fence_get_stub in amdgpu_ttm_clear_buffer function - make fence a mandatory parameter and drop the if and the get/put dance Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian Kö

Re: [PATCH v10 1/3] drm/buddy: Implement tracking clear page feature

2024-04-14 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 4/10/2024 6:22 PM, Matthew Auld wrote: On 08/04/2024 16:16, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it    successfully clears the blocks in the free path. On the otherhand,    DRM buddy marks each

Re: [PATCH v10 1/3] drm/buddy: Implement tracking clear page feature

2024-04-08 Thread Paneer Selvam, Arunpravin
Hi Matthew, Could you please review these changes as few clients are waiting for these patches. Thanks, Arun. On 4/8/2024 8:46 PM, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it successfully clears the blocks in

[PATCH v10 3/3] drm/tests: Add a test case for drm buddy clear allocation

2024-04-08 Thread Arunpravin Paneer Selvam
with non power-of-two size to ensure the multi-root force_merge during fini. Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Matthew Auld --- drivers/gpu/drm/tests/drm_buddy_test.c | 141 + 1 file changed, 141 insertions(+) diff --git a/drivers/gpu/drm/tests

[PATCH v10 1/3] drm/buddy: Implement tracking clear page feature

2024-04-08 Thread Arunpravin Paneer Selvam
when contains && split(Matthew) - add range support to force merge function. Signed-off-by: Arunpravin Paneer Selvam Signed-off-by: Matthew Auld Suggested-by: Christian König Suggested-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 6 +- drivers/gpu/dr

[PATCH v10 2/3] drm/amdgpu: Enable clear page functionality

2024-04-08 Thread Arunpravin Paneer Selvam
s_cleared(&cursor) check. v4(Christian): - vres flag setting move to vram manager file - use dma_fence_get_stub in amdgpu_ttm_clear_buffer function - make fence a mandatory parameter and drop the if and the get/put dance Signed-off-by: Arunpravin Paneer Selvam Suggested-by: Christian Kö

Re: [PATCH v9 1/3] drm/buddy: Implement tracking clear page feature

2024-04-01 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 3/28/2024 10:18 PM, Matthew Auld wrote: On 28/03/2024 16:07, Paneer Selvam, Arunpravin wrote: Hi Matthew, On 3/26/2024 11:39 PM, Matthew Auld wrote: On 18/03/2024 21:40, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the

Re: [PATCH v9 1/3] drm/buddy: Implement tracking clear page feature

2024-03-28 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 3/26/2024 11:39 PM, Matthew Auld wrote: On 18/03/2024 21:40, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it    successfully clears the blocks in the free path. On the otherhand,    DRM buddy marks each

Re: [PATCH v9 2/3] drm/amdgpu: Enable clear page functionality

2024-03-27 Thread Paneer Selvam, Arunpravin
Hi Alex, On 3/26/2024 8:23 PM, Alex Deucher wrote: On Tue, Mar 26, 2024 at 10:01 AM Alex Deucher wrote: On Tue, Mar 26, 2024 at 9:59 AM Paneer Selvam, Arunpravin wrote: Hi Alex, On 3/26/2024 7:08 PM, Alex Deucher wrote: On Mon, Mar 18, 2024 at 5:47 PM Arunpravin Paneer Selvam wrote: Add

Re: [PATCH v9 2/3] drm/amdgpu: Enable clear page functionality

2024-03-26 Thread Paneer Selvam, Arunpravin
Hi Alex, On 3/26/2024 7:08 PM, Alex Deucher wrote: On Mon, Mar 18, 2024 at 5:47 PM Arunpravin Paneer Selvam wrote: Add clear page support in vram memory region. v1(Christian): - Dont handle clear page as TTM flag since when moving the BO back in from GTT again we don't need

  1   2   3   4   5   >