diff options
-rw-r--r-- | tests/amdgpu/basic_tests.c | 15 | ||||
-rw-r--r-- | tests/amdgpu/cs_tests.c | 7 |
2 files changed, 15 insertions, 7 deletions
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 67a8d3c6..0ae25d6f 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -210,6 +210,12 @@ static void amdgpu_command_submission_gfx_separate_ibs(void) r = amdgpu_cs_query_fence_status(&fence_status, &expired); CU_ASSERT_EQUAL(r, 0); + r = amdgpu_cs_free_ib(ib_result.handle); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_cs_free_ib(ib_result_ce.handle); + CU_ASSERT_EQUAL(r, 0); + r = amdgpu_cs_ctx_free(context_handle); CU_ASSERT_EQUAL(r, 0); } @@ -266,6 +272,9 @@ static void amdgpu_command_submission_gfx_shared_ib(void) r = amdgpu_cs_query_fence_status(&fence_status, &expired); CU_ASSERT_EQUAL(r, 0); + r = amdgpu_cs_free_ib(ib_result.handle); + CU_ASSERT_EQUAL(r, 0); + r = amdgpu_cs_ctx_free(context_handle); CU_ASSERT_EQUAL(r, 0); } @@ -324,6 +333,9 @@ static void amdgpu_command_submission_compute(void) r = amdgpu_cs_query_fence_status(&fence_status, &expired); CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_cs_free_ib(ib_result.handle); + CU_ASSERT_EQUAL(r, 0); } r = amdgpu_cs_ctx_free(context_handle); @@ -394,6 +406,9 @@ static void amdgpu_sdma_test_exec_cs(amdgpu_context_handle context_handle, r = amdgpu_cs_query_fence_status(&fence_status, &expired); CU_ASSERT_EQUAL(r, 0); CU_ASSERT_EQUAL(expired, true); + + r = amdgpu_cs_free_ib(ib_result.handle); + CU_ASSERT_EQUAL(r, 0); } static void amdgpu_command_submission_sdma_write_linear(void) diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c index 6d485ae3..5fb11b18 100644 --- a/tests/amdgpu/cs_tests.c +++ b/tests/amdgpu/cs_tests.c @@ -133,13 +133,6 @@ static int submit(unsigned ndw, unsigned ip) if (r) return r; - r = amdgpu_cs_alloc_ib(context_handle, IB_SIZE, &ib_result); - if (r) - return r; - - ib_handle = ib_result.handle; - ib_cpu = ib_result.cpu; - fence_status.context = context_handle; fence_status.timeout_ns = AMDGPU_TIMEOUT_INFINITE; fence_status.ip_type = ip; |