aboutsummaryrefslogtreecommitdiffstats
path: root/tests/amdgpu/basic_tests.c
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-07-09 13:51:13 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-08-05 13:47:52 -0400
commitf91b56dc8c604ec1c6f092d69550266d20dc9764 (patch)
tree6952e5b6e93f94a4dc8edb1889e532c229370c9b /tests/amdgpu/basic_tests.c
parent12802da74f0e480bbde5a11df689329910893e87 (diff)
downloadexternal_libdrm-f91b56dc8c604ec1c6f092d69550266d20dc9764.tar.gz
external_libdrm-f91b56dc8c604ec1c6f092d69550266d20dc9764.tar.bz2
external_libdrm-f91b56dc8c604ec1c6f092d69550266d20dc9764.zip
amdgpu: improve the amdgpu_cs_query_fence_status interface
make amdgpu_cs_query_fence reusable to support multi-fence query Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'tests/amdgpu/basic_tests.c')
-rw-r--r--tests/amdgpu/basic_tests.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 93743998..f369615e 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -215,10 +215,11 @@ static void amdgpu_command_submission_gfx_separate_ibs(void)
CU_ASSERT_EQUAL(r, 0);
fence_status.context = context_handle;
- fence_status.timeout_ns = AMDGPU_TIMEOUT_INFINITE;
fence_status.ip_type = AMDGPU_HW_IP_GFX;
- r = amdgpu_cs_query_fence_status(&fence_status, &expired);
+ r = amdgpu_cs_query_fence_status(&fence_status,
+ AMDGPU_TIMEOUT_INFINITE,
+ 0, &expired);
CU_ASSERT_EQUAL(r, 0);
r = amdgpu_bo_free(ib_result_handle);
@@ -289,10 +290,11 @@ static void amdgpu_command_submission_gfx_shared_ib(void)
CU_ASSERT_EQUAL(r, 0);
fence_status.context = context_handle;
- fence_status.timeout_ns = AMDGPU_TIMEOUT_INFINITE;
fence_status.ip_type = AMDGPU_HW_IP_GFX;
- r = amdgpu_cs_query_fence_status(&fence_status, &expired);
+ r = amdgpu_cs_query_fence_status(&fence_status,
+ AMDGPU_TIMEOUT_INFINITE,
+ 0, &expired);
CU_ASSERT_EQUAL(r, 0);
r = amdgpu_bo_free(ib_result_handle);
@@ -362,11 +364,12 @@ static void amdgpu_command_submission_compute(void)
CU_ASSERT_EQUAL(r, 0);
fence_status.context = context_handle;
- fence_status.timeout_ns = AMDGPU_TIMEOUT_INFINITE;
fence_status.ip_type = AMDGPU_HW_IP_COMPUTE;
fence_status.ring = instance;
- r = amdgpu_cs_query_fence_status(&fence_status, &expired);
+ r = amdgpu_cs_query_fence_status(&fence_status,
+ AMDGPU_TIMEOUT_INFINITE,
+ 0, &expired);
CU_ASSERT_EQUAL(r, 0);
r = amdgpu_bo_list_destroy(bo_list);
@@ -446,10 +449,11 @@ static void amdgpu_sdma_test_exec_cs(amdgpu_context_handle context_handle,
fence_status.ip_type = AMDGPU_HW_IP_DMA;
fence_status.ring = ibs_request->ring;
fence_status.context = context_handle;
- fence_status.timeout_ns = AMDGPU_TIMEOUT_INFINITE;
/* wait for IB accomplished */
- r = amdgpu_cs_query_fence_status(&fence_status, &expired);
+ r = amdgpu_cs_query_fence_status(&fence_status,
+ AMDGPU_TIMEOUT_INFINITE,
+ 0, &expired);
CU_ASSERT_EQUAL(r, 0);
CU_ASSERT_EQUAL(expired, true);