[PATCH v12 08/10] drm/ttm/tests: Add eviction testing

2024-05-15 Thread Karolina Stolarek
ommon path of ttm_device init into a function. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 433 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 106 - drivers/g

[PATCH v12 06/10] drm/ttm/tests: Add tests with mock resource managers

2024-05-15 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek Tested-by: Somalapuram, Amaranath

[PATCH v12 10/10] drm/ttm/tests: Add TODO file

2024-05-15 Thread Karolina Stolarek
List improvements for the test suite with some notes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/TODO | 25 + 1 file changed, 25 insertions(+) create mode 100644 drivers/gpu/drm/ttm/tests/TODO diff --git a/drivers/gpu/drm/ttm/tests/TODO b/drivers

[PATCH v12 09/10] drm/ttm/tests: Add tests for ttm_tt_populate

2024-05-15 Thread Karolina Stolarek
Add tests for functions that add and release pages to TTs. Test the swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and ttm_tt_swapout symbols for testing purposes. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath --- drivers/gpu

[PATCH v12 07/10] drm/ttm/tests: Add test cases dependent on fence signaling

2024-05-15 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath --- .../gpu/drm

[PATCH v12 05/10] drm/ttm/tests: Test simple BO creation and validation

2024-05-15 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek Reviewed-by: Matthew Auld

[PATCH v12 04/10] drm/ttm/tests: Use an init function from the helpers lib

2024-05-15 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek Reviewed-by: Matthew Auld Reviewed-by: Somalapuram, Amaranath --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14

[PATCH v12 03/10] drm/ttm/tests: Set DMA mask in KUnit device

2024-05-15 Thread Karolina Stolarek
t mappings to unblock testing. Signed-off-by: Karolina Stolarek Reviewed-by: Nirmoy Das --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c index 5b

[PATCH v12 01/10] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk

2024-05-15 Thread Karolina Stolarek
: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions") Suggested-by: Christian König Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 40 +++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 7 +++- drivers/gpu/drm/ttm/tests/ttm_kunit

[PATCH v12 02/10] drm/ttm/tests: Delete unnecessary config option

2024-05-15 Thread Karolina Stolarek
DRM KUnit helpers are selected automatically when TTM tests are enabled, so there's no need to do it directly in the .kunitconfig file. Signed-off-by: Karolina Stolarek Reviewed-by: Nirmoy Das --- drivers/gpu/drm/ttm/tests/.kunitconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers

[PATCH v12 00/10] Improve test coverage of TTM

2024-05-15 Thread Karolina Stolarek
and should be checked again Karolina Stolarek (10): drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk drm/ttm/tests: Delete unnecessary config option drm/ttm/tests: Set DMA mask in KUnit device drm/ttm/tests: Use an init function from the helpers lib drm/ttm/tests: Test simple BO creati

Re: [PATCH v11 01/10] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk

2024-04-18 Thread Karolina Stolarek
On 18.04.2024 10:15, Christian König wrote: Am 17.04.24 um 15:03 schrieb Karolina Stolarek: BOs in a bulk move have to share the same reservation object. That is not the case in the ttm_bo_unreserve_bulk subtest. Share bo2's resv object with bo1 to fix the issue. Fixes: 995279d280d1 ("dr

[PATCH v11 07/10] drm/ttm/tests: Add test cases dependent on fence signaling

2024-04-17 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath --- .../gpu/drm

[PATCH v11 10/10] drm/ttm/tests: Add TODO file

2024-04-17 Thread Karolina Stolarek
List improvements for the test suite with some notes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/TODO | 25 + 1 file changed, 25 insertions(+) create mode 100644 drivers/gpu/drm/ttm/tests/TODO diff --git a/drivers/gpu/drm/ttm/tests/TODO b/drivers

[PATCH v11 09/10] drm/ttm/tests: Add tests for ttm_tt_populate

2024-04-17 Thread Karolina Stolarek
Add tests for functions that add and release pages to TTs. Test the swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and ttm_tt_swapout symbols for testing purposes. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath --- drivers/gpu

[PATCH v11 06/10] drm/ttm/tests: Add tests with mock resource managers

2024-04-17 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek Tested-by: Somalapuram, Amaranath

[PATCH v11 08/10] drm/ttm/tests: Add eviction testing

2024-04-17 Thread Karolina Stolarek
ommon path of ttm_device init into a function. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 433 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 106 - drivers/g

[PATCH v11 05/10] drm/ttm/tests: Test simple BO creation and validation

2024-04-17 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek Reviewed-by: Matthew Auld

[PATCH v11 02/10] drm/ttm/tests: Delete unnecessary config option

2024-04-17 Thread Karolina Stolarek
DRM KUnit helpers are selected automatically when TTM tests are enabled, so there's no need to do it directly in the .kunitconfig file. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/.kunitconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/tests

[PATCH v11 04/10] drm/ttm/tests: Use an init function from the helpers lib

2024-04-17 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek Reviewed-by: Matthew Auld Reviewed-by: Somalapuram, Amaranath --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14

[PATCH v11 00/10] Improve test coverage of TTM

2024-04-17 Thread Karolina Stolarek
tialization of spinlock in ttm_bo_validate_move_fence_signaled(), it not used at all (Andi) - Just return the error code threaded_fence_signal(), don't save it to a local variable (Andi) - Use ttm_bo_unreserve() in tests checking different move fence states (Andi) Karolina Stolarek (10): drm/t

[PATCH v11 03/10] drm/ttm/tests: Set DMA mask in KUnit device

2024-04-17 Thread Karolina Stolarek
t mappings to unblock testing. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c index 7b7c1fa805fc..cb1cd676f

[PATCH v11 01/10] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk

2024-04-17 Thread Karolina Stolarek
BOs in a bulk move have to share the same reservation object. That is not the case in the ttm_bo_unreserve_bulk subtest. Share bo2's resv object with bo1 to fix the issue. Fixes: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions") Signed-off-by: Karolina Stolarek --- drive

Re: [PATCH v10 4/9] drm/ttm/tests: Add tests with mock resource managers

2024-04-17 Thread Karolina Stolarek
Hi Amaranath, Many thanks for your review and comments. On 15.04.2024 14:10, Somalapuram, Amaranath wrote: +static void ttm_bo_validate_basic(struct kunit *test) +{ +    const struct ttm_bo_validate_test_case *params = test->param_value; +    uint32_t fst_mem = TTM_PL_SYSTEM, snd_mem =

Re: [PATCH v10 4/9] drm/ttm/tests: Add tests with mock resource managers

2024-04-11 Thread Karolina Stolarek
On 10.04.2024 16:24, Matthew Auld wrote: On 22/03/2024 14:29, Karolina Stolarek wrote: +static const struct ttm_bo_validate_test_case ttm_mem_type_cases[] = { +    { +    .description = "System manager", +    .mem_type = TTM_PL_SYSTEM, +    }, +    { +    .descripti

Re: [PATCH v10 3/9] drm/ttm/tests: Test simple BO creation and validation

2024-04-11 Thread Karolina Stolarek
On 10.04.2024 16:01, Matthew Auld wrote: On 22/03/2024 14:29, Karolina Stolarek wrote: +static void ttm_bo_validate_pinned(struct kunit *test) +{ +    enum ttm_bo_type bo_type = ttm_bo_type_device; +    uint32_t size = ALIGN(BO_SIZE, PAGE_SIZE); +    struct ttm_operation_ctx ctx

Re: [PATCH v10 0/9] Improve test coverage of TTM

2024-04-03 Thread Karolina Stolarek
Hi Amaranath, Thanks for checking this. On 2.04.2024 15:35, Somalapuram, Amaranath wrote: /usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0xa0): undefined reference to `drm_atomic_helper_crtc_reset' /usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0xf0):

[PATCH v10 8/9] drm/ttm/tests: Add TODO file

2024-03-22 Thread Karolina Stolarek
List improvements for the test suite with some notes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/TODO | 24 1 file changed, 24 insertions(+) create mode 100644 drivers/gpu/drm/ttm/tests/TODO diff --git a/drivers/gpu/drm/ttm/tests/TODO b/drivers/gpu

[PATCH v10 9/9] drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk

2024-03-22 Thread Karolina Stolarek
BOs in a bulk move have to share the same reservation object. That is not the case in the ttm_bo_unreserve_bulk subtest. Share bo2's resv object with bo1 to fix the issue. Fixes: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions") Signed-off-by: Karolina Stolarek --- drive

[PATCH v10 7/9] drm/ttm/tests: Add tests for ttm_tt_populate

2024-03-22 Thread Karolina Stolarek
Add tests for functions that add and release pages to TTs. Test the swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and ttm_tt_swapout symbols for testing purposes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_tt_test.c | 119 drivers/gpu

[PATCH v10 4/9] drm/ttm/tests: Add tests with mock resource managers

2024-03-22 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/Kconfig

[PATCH v10 6/9] drm/ttm/tests: Add eviction testing

2024-03-22 Thread Karolina Stolarek
ommon path of ttm_device init into a function. Signed-off-by: Karolina Stolarek --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 425 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 107 - drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 7 + drivers/gpu/drm

[PATCH v10 2/9] drm/ttm/tests: Use an init function from the helpers lib

2024-03-22 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 1 + drivers/gpu/drm

[PATCH v10 5/9] drm/ttm/tests: Add test cases dependent on fence signaling

2024-03-22 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 305 ++ 1 file

[PATCH v10 3/9] drm/ttm/tests: Test simple BO creation and validation

2024-03-22 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm

[PATCH v10 1/9] drm/ttm/tests: Set DMA mask in KUnit device

2024-03-22 Thread Karolina Stolarek
t mappings to unblock testing. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c index 7b7c1fa805fc..cb1cd676f

[PATCH v10 0/9] Improve test coverage of TTM

2024-03-22 Thread Karolina Stolarek
clean up an incomplete, orphaned resource. That's not good, and this could bite us back in the future. Karolina Stolarek (9): drm/ttm/tests: Set DMA mask in KUnit device drm/ttm/tests: Use an init function from the helpers lib drm/ttm/tests: Test simple BO creation and validation d

[PATCH] drm/tests: Build KMS helpers when DRM_KUNIT_TEST_HELPERS is enabled

2024-03-13 Thread Karolina Stolarek
me Ripard Cc: Maíra Canal Signed-off-by: Karolina Stolarek --- Run into this when trying to run TTM KUnit tests. As for now, TTM KUnit test suite are the only outside user of these helpers, but I think it makes sense to explicitly select DRM_KMS_HELPER together with DRM_KUNIT_TEST_HELPE

Re: [PATCH RESEND v9 1/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2024-01-11 Thread Karolina Stolarek
into the CI. Thanks, Christian. Am 11.01.24 um 11:28 schrieb Karolina Stolarek: Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram Reviewed-by: Dominik Karol Piątkowski Acked

[PATCH RESEND v9 8/8] drm/ttm/tests: Add TODO file

2024-01-11 Thread Karolina Stolarek
List improvements for the test suite with some notes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/TODO | 24 1 file changed, 24 insertions(+) create mode 100644 drivers/gpu/drm/ttm/tests/TODO diff --git a/drivers/gpu/drm/ttm/tests/TODO b/drivers/gpu

[PATCH RESEND v9 7/8] drm/ttm/tests: Add tests for ttm_tt_populate

2024-01-11 Thread Karolina Stolarek
Add tests for functions that add and release pages to TTs. Test the swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and ttm_tt_swapout symbols for testing purposes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_tt_test.c | 119 drivers/gpu

[PATCH RESEND v9 6/8] drm/ttm/tests: Add eviction testing

2024-01-11 Thread Karolina Stolarek
ommon path of ttm_device init into a function. Signed-off-by: Karolina Stolarek --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 426 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 113 - drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 7 + drivers/gpu/drm

[PATCH RESEND v9 4/8] drm/ttm/tests: Add tests with mock resource managers

2024-01-11 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek Reviewed-by: Christian König Tested

[PATCH RESEND v9 5/8] drm/ttm/tests: Add test cases dependent on fence signaling

2024-01-11 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 305

[PATCH RESEND v9 3/8] drm/ttm/tests: Test simple BO creation and validation

2024-01-11 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek Reviewed-by: Christian

[PATCH RESEND v9 2/8] drm/ttm/tests: Use an init function from the helpers lib

2024-01-11 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 1 + drivers/gpu/drm

[PATCH RESEND v9 1/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2024-01-11 Thread Karolina Stolarek
Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram Reviewed-by: Dominik Karol Piątkowski Acked-by: Christian König --- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +-- 1 file

[PATCH RESEND v9 0/8] Improve test coverage of TTM

2024-01-11 Thread Karolina Stolarek
nctions that are not exported - Fix ttm_pool_pre_populated(); a wrong flag was passed to ttm_tt_kunit_init() function Karolina Stolarek (8): drm/ttm/tests: Fix argument in ttm_tt_kunit_init() drm/ttm/tests: Use an init function from the helpers lib drm/ttm/tests: Test simple BO creation a

[PATCH v9 6/8] drm/ttm/tests: Add eviction testing

2023-12-14 Thread Karolina Stolarek
ommon path of ttm_device init into a function. Signed-off-by: Karolina Stolarek --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 426 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 113 - drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 7 + drivers/gpu/drm

[PATCH v9 4/8] drm/ttm/tests: Add tests with mock resource managers

2023-12-14 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek Reviewed-by: Christian König Tested

[PATCH v9 7/8] drm/ttm/tests: Add tests for ttm_tt_populate

2023-12-14 Thread Karolina Stolarek
Add tests for functions that add and release pages to TTs. Test the swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and ttm_tt_swapout symbols for testing purposes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_tt_test.c | 119 drivers/gpu

[PATCH v9 8/8] drm/ttm/tests: Add TODO file

2023-12-14 Thread Karolina Stolarek
List improvements for the test suite with some notes. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/TODO | 24 1 file changed, 24 insertions(+) create mode 100644 drivers/gpu/drm/ttm/tests/TODO diff --git a/drivers/gpu/drm/ttm/tests/TODO b/drivers/gpu

[PATCH v9 5/8] drm/ttm/tests: Add test cases dependent on fence signaling

2023-12-14 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 305

[PATCH v9 3/8] drm/ttm/tests: Test simple BO creation and validation

2023-12-14 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek Reviewed-by: Christian

[PATCH v9 2/8] drm/ttm/tests: Use an init function from the helpers lib

2023-12-14 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 1 + drivers/gpu/drm

[PATCH v9 1/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2023-12-14 Thread Karolina Stolarek
Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram Reviewed-by: Dominik Karol Piątkowski Acked-by: Christian König --- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +-- 1 file

[PATCH v9 0/8] Improve test coverage of TTM

2023-12-14 Thread Karolina Stolarek
nctions that are not exported - Fix ttm_pool_pre_populated(); a wrong flag was passed to ttm_tt_kunit_init() function Karolina Stolarek (8): drm/ttm/tests: Fix argument in ttm_tt_kunit_init() drm/ttm/tests: Use an init function from the helpers lib drm/ttm/tests: Test simple BO creation a

Re: [PATCH v8 0/8] Improve test coverage of TTM

2023-12-14 Thread Karolina Stolarek
On 14.12.2023 11:22, Christian König wrote: Am 14.12.23 um 09:20 schrieb Karolina Stolarek: Hi Christian, On 29.11.2023 13:02, Karolina Stolarek wrote: Karolina Stolarek (8):    drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man    drm/ttm/tests: Add tests for ttm_tt    drm/ttm

Re: [PATCH v8 0/8] Improve test coverage of TTM

2023-12-14 Thread Karolina Stolarek
Hi Christian, On 29.11.2023 13:02, Karolina Stolarek wrote: Karolina Stolarek (8): drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man drm/ttm/tests: Add tests for ttm_tt drm/ttm/tests: Add tests for ttm_bo functions >drm/ttm/tests: Fix argument in ttm_tt_kunit_i

Re: [PATCH v8 8/8] drm/ttm/tests: Add test cases dependent on fence signaling

2023-12-06 Thread Karolina Stolarek
Hi Andi, For next time, I find it difficult to follow all these variables, it's easier to read man = ttm_manager_type(priv->ttm_dev, TTM_PL_SYSTEM); than mem_type = TTM_PL_SYSTEM; ... ... ... man = ttm_manager_type(priv->ttm_dev, mem_type);

Re: [PATCH v8 0/8] Improve test coverage of TTM

2023-12-06 Thread Karolina Stolarek
Hi Andi, On 5.12.2023 16:39, Andi Shyti wrote: Hi Karolina and Christian, Karolina Stolarek (8): drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man drm/ttm/tests: Add tests for ttm_tt drm/ttm/tests: Add tests for ttm_bo functions drm/ttm/tests: Fix argument in ttm_tt_kunit_init

[PATCH v8 3/8] drm/ttm/tests: Add tests for ttm_bo functions

2023-11-29 Thread Karolina Stolarek
Test reservation and release of TTM buffer objects. Add tests to check pin and unpin operations. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram Reviewed-by: Andi Shyti --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_bo_test.c

[PATCH v8 7/8] drm/ttm/tests: Add tests with mock resource managers

2023-11-29 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek Reviewed-by: Christian König Tested

[PATCH v8 5/8] drm/ttm/tests: Use an init function from the helpers lib

2023-11-29 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 1 + drivers/gpu/drm

[PATCH v8 8/8] drm/ttm/tests: Add test cases dependent on fence signaling

2023-11-29 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 308

[PATCH v8 4/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2023-11-29 Thread Karolina Stolarek
Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram Reviewed-by: Dominik Karol Piątkowski Acked-by: Christian König --- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +-- 1 file

[PATCH v8 6/8] drm/ttm/tests: Test simple BO creation and validation

2023-11-29 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek Reviewed-by: Christian

[PATCH v8 2/8] drm/ttm/tests: Add tests for ttm_tt

2023-11-29 Thread Karolina Stolarek
Test initialization, creation and destruction of ttm_tt instances. Export ttm_tt_destroy and ttm_tt_create symbols for testing purposes. Signed-off-by: Karolina Stolarek Reviewed-by: Christian König Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1

[PATCH v8 1/8] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-11-29 Thread Karolina Stolarek
purposes only. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram Reviewed-by: Christian König --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 22 +- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 3 + drivers/gpu/drm

[PATCH v8 0/8] Improve test coverage of TTM

2023-11-29 Thread Karolina Stolarek
nit_init() function Karolina Stolarek (8): drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man drm/ttm/tests: Add tests for ttm_tt drm/ttm/tests: Add tests for ttm_bo functions drm/ttm/tests: Fix argument in ttm_tt_kunit_init() drm/ttm/tests: Use an init function from the helpers lib

Re: Bug in the error handling in TTMs pool implementation

2023-11-27 Thread Karolina Stolarek
On 24.11.2023 16:53, Christian König wrote: @Karolina do you of hand know a way how we could exercise this in a TTM unit test? Basically we would need to redirect the alloc_pages_node() symbol to an unit test internal function and let it return an error (or something like that). Do I

Re: [PATCH v7 3/8] drm/ttm/tests: Add tests for ttm_bo functions

2023-11-22 Thread Karolina Stolarek
On 21.11.2023 15:29, Christian König wrote: Am 17.11.23 um 09:49 schrieb Karolina Stolarek: Test reservation and release of TTM buffer objects. Add tests to check pin and unpin operations. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram From the TTM side it looks good

[PATCH v7 6/8] drm/ttm/tests: Test simple BO creation and validation

2023-11-17 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm

[PATCH v7 8/8] drm/ttm/tests: Add test cases dependent on fence signaling

2023-11-17 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 308 ++ 1 file

[PATCH v7 7/8] drm/ttm/tests: Add tests with mock resource managers

2023-11-17 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/Kconfig

[PATCH v7 4/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2023-11-17 Thread Karolina Stolarek
Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v7 5/8] drm/ttm/tests: Use an init function from the helpers lib

2023-11-17 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 1 + drivers/gpu/drm

[PATCH v7 3/8] drm/ttm/tests: Add tests for ttm_bo functions

2023-11-17 Thread Karolina Stolarek
Test reservation and release of TTM buffer objects. Add tests to check pin and unpin operations. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 619

[PATCH v7 2/8] drm/ttm/tests: Add tests for ttm_tt

2023-11-17 Thread Karolina Stolarek
Test initialization, creation and destruction of ttm_tt instances. Export ttm_tt_destroy and ttm_tt_create symbols for testing purposes. Signed-off-by: Karolina Stolarek Reviewed-by: Christian König Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1

[PATCH v7 1/8] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-11-17 Thread Karolina Stolarek
purposes only. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 22 +- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 3 + drivers/gpu/drm/ttm/tests/ttm_resource_test.c

[PATCH v7 0/8] Improve test coverage of TTM

2023-11-17 Thread Karolina Stolarek
t uses functions that are not exported - Fix ttm_pool_pre_populated(); a wrong flag was passed to ttm_tt_kunit_init() function Karolina Stolarek (8): drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man drm/ttm/tests: Add tests for ttm_tt drm/ttm/tests: Add tests for ttm_bo functions

Re: [PATCH v6 0/8] Improve test coverage of TTM

2023-11-09 Thread Karolina Stolarek
On 8.11.2023 16:01, Christian König wrote:> Well, you have a tendency to keep us busy :) ...:) I'll try to get other folks to take a look at this. It's a lot of code to review Please keep Amar looped in those patches. I will try to review them when I have time, but he can give you at

Re: [PATCH v6 7/8] drm/ttm/tests: Add tests with mock resource managers

2023-11-09 Thread Karolina Stolarek
On 8.11.2023 14:56, Karolina Stolarek wrote: diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c index 38e584798584..f0f0ab992e04 100644 --- a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c +++ b/drivers/gpu/drm/ttm/tests

[PATCH v6 6/8] drm/ttm/tests: Test simple BO creation and validation

2023-11-08 Thread Karolina Stolarek
Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm

[PATCH v6 4/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

2023-11-08 Thread Karolina Stolarek
Remove a leftover definition of page order and pass an empty flag value in ttm_pool_pre_populated(). Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v6 8/8] drm/ttm/tests: Add test cases dependent on fence signaling

2023-11-08 Thread Karolina Stolarek
Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek --- .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 306 ++ 1 file

[PATCH v6 7/8] drm/ttm/tests: Add tests with mock resource managers

2023-11-08 Thread Karolina Stolarek
Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/Kconfig

[PATCH v6 2/8] drm/ttm/tests: Add tests for ttm_tt

2023-11-08 Thread Karolina Stolarek
Test initialization, creation and destruction of ttm_tt instances. Export ttm_tt_destroy and ttm_tt_create symbols for testing purposes. Signed-off-by: Karolina Stolarek Reviewed-by: Christian König Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1

[PATCH v6 5/8] drm/ttm/tests: Use an init function from the helpers lib

2023-11-08 Thread Karolina Stolarek
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek --- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 14 ++ drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 1 + drivers/gpu/drm

[PATCH v6 3/8] drm/ttm/tests: Add tests for ttm_bo functions

2023-11-08 Thread Karolina Stolarek
Test reservation and release of TTM buffer objects. Add tests to check pin and unpin operations. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 619

[PATCH v6 1/8] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-11-08 Thread Karolina Stolarek
purposes only. Signed-off-by: Karolina Stolarek Tested-by: Amaranath Somalapuram --- drivers/gpu/drm/ttm/tests/Makefile| 1 + drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 23 +- drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h | 4 + drivers/gpu/drm/ttm/tests/ttm_resource_test.c

[PATCH v6 0/8] Improve test coverage of TTM

2023-11-08 Thread Karolina Stolarek
to ttm_tt_kunit_init() function Karolina Stolarek (8): drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man drm/ttm/tests: Add tests for ttm_tt drm/ttm/tests: Add tests for ttm_bo functions drm/ttm/tests: Fix argument in ttm_tt_kunit_init() drm/ttm/tests: Use an init function from

Re: [PATCH v5 1/4] drm/ttm/tests: Add tests for ttm_resource and ttm_sys_man

2023-11-07 Thread Karolina Stolarek
On 7.11.2023 10:34, Christian König wrote: Am 16.10.23 um 10:52 schrieb Karolina Stolarek: diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c index 81661d8827aa..c605f010ea08 100644 --- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c

Re: [PATCH v5 0/4] Improve test coverage of TTM

2023-10-31 Thread Karolina Stolarek
Hi Christian, On 17.10.2023 14:10, Christian König wrote: Am 17.10.23 um 14:06 schrieb Karolina Stolarek: >> Oh! Could you at least take a look at ttm_bo_reserve_deadlock and/or interrupted subtests? I'm not 100% sure if my solution is right. Than this will have to wait till next wee

Re: [PATCH] drm/i915/gt: Remove {} from if-else

2023-10-26 Thread Karolina Stolarek
On 26.10.2023 06:43, Soumya Negi wrote: In accordance to Linux coding style(Documentation/process/4.Coding.rst), remove unneeded braces from if-else block as all arms of this block contain single statements. I'd just keep the description simple, and say that braces are not needed for single

Re: [PATCH v5 0/4] Improve test coverage of TTM

2023-10-17 Thread Karolina Stolarek
On 17.10.2023 14:10, Christian König wrote: Am 17.10.23 um 14:06 schrieb Karolina Stolarek: On 17.10.2023 13:57, Christian König wrote: Am 17.10.23 um 13:22 schrieb Somalapuram, Amaranath: On 10/17/2023 4:35 PM, Karolina Stolarek wrote: Hi Amaranath, On 16.10.2023 15:08, Somalapuram

Re: [PATCH v5 0/4] Improve test coverage of TTM

2023-10-17 Thread Karolina Stolarek
On 17.10.2023 13:57, Christian König wrote: Am 17.10.23 um 13:22 schrieb Somalapuram, Amaranath: On 10/17/2023 4:35 PM, Karolina Stolarek wrote: Hi Amaranath, On 16.10.2023 15:08, Somalapuram, Amaranath wrote: On 10/16/2023 2:22 PM, Karolina Stolarek wrote: Add tests for building blocks

Re: [PATCH v5 0/4] Improve test coverage of TTM

2023-10-17 Thread Karolina Stolarek
Hi Amaranath, On 16.10.2023 15:08, Somalapuram, Amaranath wrote: On 10/16/2023 2:22 PM, Karolina Stolarek wrote: Add tests for building blocks of the TTM subsystem, such as ttm_resource, ttm_resource_manager, ttm_tt and ttm_buffer_object. This series covers basic functions

[PATCH] drm/ttm: Reorder sys manager cleanup step

2023-10-16 Thread Karolina Stolarek
list and drain its workqueue before releasing the system domain manager in ttm_device_fini(). Signed-off-by: Karolina Stolarek --- This is actually a reiteration of a patch sent in [1], but the solution and commit message changed significantly, so I decided not to send it as v2. [1

Re: [PATCH] drm/ttm: Drain workqueue before sys manager release

2023-10-16 Thread Karolina Stolarek
On 16.10.2023 13:03, Christian König wrote: Am 13.10.23 um 16:34 schrieb Karolina Stolarek: In rare cases, a delayed destruction of a BO with a system resource could stay in the workqueue until drain_workqueue() is called in ttm_device_fini(). An attempt to free a resource from an already

  1   2   >