mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-06 09:28:19 +02:00
tests/amdgpu: manage IB in client side
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
40c5336043
commit
1041cfdc38
2 changed files with 15 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue