Hi Christian and Amaranath,
On 12.06.2024 14:02, Karolina Stolarek wrote:
Introduce tests for ttm_bo_validate()/ttm_bo_init_validate() that exercise
simple BO placement as well as eviction (including the case where the evict
domain also requires eviction to fit the incoming buffer). Prepare
Update the tests and helpers to use unsigned kernel types.
Signed-off-by: Karolina Stolarek
Suggested-by: Thomas Hellström
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 12 ++--
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 6 ++
drivers/gpu
The test files are GPL and MIT, so update the definitions accordingly.
Signed-off-by: Karolina Stolarek
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 2 +-
drivers/gpu/drm/ttm/tests/ttm_device_test.c | 2 +-
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
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
List improvements for the test suite with some notes.
Signed-off-by: Karolina Stolarek
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/TODO | 27 +++
1 file changed, 27 insertions(+)
create mode 100644 drivers/gpu/drm/ttm/tests/TODO
diff --git a/drivers
common 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 -
driv
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
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
---
.
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
Reviewed
appings 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
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
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/dr
: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions")
Suggested-by: Christian König
Signed-off-by: Karolina Stolarek
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 40 +++
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 7 +++-
drive
accept a dma_resv object and update
calls to that helper (Christian)
- Update drm_buddy_free_list() calls with an extra argument
Karolina Stolarek (12):
drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk
drm/ttm/tests: Delete unnecessary config option
drm/ttm/tests: Set DMA mask
Update the tests and helpers to use unsigned kernel types.
Signed-off-by: Karolina Stolarek
Suggested-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 12 ++--
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 6 ++
drivers/gpu/drm/ttm/tests
The test files are GPL and MIT, so update the definitions accordingly.
Signed-off-by: Karolina Stolarek
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 2 +-
drivers/gpu/drm/ttm/tests/ttm_device_test.c | 2 +-
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 2 +-
drivers/gpu/drm/ttm/tests
List improvements for the test suite with some notes.
Signed-off-by: Karolina Stolarek
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/TODO | 27 +++
1 file changed, 27 insertions(+)
create mode 100644 drivers/gpu/drm/ttm/tests/TODO
diff --git a/drivers
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
common 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 -
driv
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
---
.
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
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
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
appings 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
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/dr
: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions")
Suggested-by: Christian König
Signed-off-by: Karolina Stolarek
Reviewed-by: Thomas Hellström
---
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 40 +++
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 7 +++-
drive
to create TT domain, so they can perform multihop
- Update TODO file, as it got outdated already
Karolina Stolarek (12):
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 i
On 3.06.2024 11:30, Thomas Hellström wrote:
On Mon, 2024-06-03 at 10:28 +0200, Karolina Stolarek wrote:
diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
index 2f590bae53f8..2a2585b37118 100644
--- a/drivers/gpu/drm/ttm/tests
diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
index 2f590bae53f8..2a2585b37118 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
@@ -27,8 +27,42 @@ static int mock_move(struct
Hi Thomas,
On 29.05.2024 14:58, Thomas Hellström wrote:
On Wed, 2024-05-15 at 13:24 +0200, Karolina Stolarek wrote:
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
common 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 -
driv
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
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
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
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
---
.
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
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
appings 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
: 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
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/dr
re updated 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
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 (&qu
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
---
.
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
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
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
common 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 -
driv
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
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/
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
the initialization 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 (
appings 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..cb1cd676f8ae 10
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
---
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 = TTM_PL_V
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
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
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):
undef
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
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
---
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
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
common 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/gp
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
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
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
appings 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..cb1cd676f8ae 10
because we try 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 creatio
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_HELPERS, in
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
Ack
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
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
common 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/gp
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-by
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_tes
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
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
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
ests as a module, even
if it 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: Fix argument in ttm_tt_kunit_init()
drm/ttm/tests: Use an init function from the helpers lib
common 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/gp
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-by
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
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
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_tes
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
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
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
ests as a module, even
if it 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: Fix argument in ttm_tt_kunit_init()
drm/ttm/tests: Use an init function from the helpers lib
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
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
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);
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
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
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-by
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
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_tes
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
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
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
test 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/gp
ng 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
drm/ttm/tests: Fix argument in ttm_tt_kunit_init()
drm/ttm/tests: Use an in
1 - 100 of 208 matches
Mail list logo