diff options
author | Ken Wang <Qingqing.Wang@amd.com> | 2015-07-10 22:22:27 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 13:47:52 -0400 |
commit | 926c80568691e04abdfcd21b6e9be61331e95b03 (patch) | |
tree | bc358b99874cfc930c8e3853b9d3db3f7b4ecee9 /tests | |
parent | 01e4546ff34a57faaefd41fce323c691902501c5 (diff) |
amdgpu : move management of user fence from libdrm to UMD
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/amdgpu/basic_tests.c | 23 | ||||
-rw-r--r-- | tests/amdgpu/cs_tests.c | 3 | ||||
-rw-r--r-- | tests/amdgpu/vce_tests.c | 3 |
3 files changed, 17 insertions, 12 deletions
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 84789708..009e0f0f 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -209,13 +209,15 @@ static void amdgpu_command_submission_gfx_separate_ibs(void) ibs_request.number_of_ibs = 2; ibs_request.ibs = ib_info; ibs_request.resources = bo_list; + ibs_request.fence_info.handle = NULL; + + r = amdgpu_cs_submit(context_handle, 0,&ibs_request, 1); - r = amdgpu_cs_submit(context_handle, 0, - &ibs_request, 1, &fence_status.fence); CU_ASSERT_EQUAL(r, 0); fence_status.context = context_handle; fence_status.ip_type = AMDGPU_HW_IP_GFX; + fence_status.fence = ibs_request.seq_no; r = amdgpu_cs_query_fence_status(&fence_status, AMDGPU_TIMEOUT_INFINITE, @@ -233,6 +235,7 @@ static void amdgpu_command_submission_gfx_separate_ibs(void) r = amdgpu_cs_ctx_free(context_handle); CU_ASSERT_EQUAL(r, 0); + } static void amdgpu_command_submission_gfx_shared_ib(void) @@ -284,13 +287,15 @@ static void amdgpu_command_submission_gfx_shared_ib(void) ibs_request.number_of_ibs = 2; ibs_request.ibs = ib_info; ibs_request.resources = bo_list; + ibs_request.fence_info.handle = NULL; + + r = amdgpu_cs_submit(context_handle, 0, &ibs_request, 1); - r = amdgpu_cs_submit(context_handle, 0, - &ibs_request, 1, &fence_status.fence); CU_ASSERT_EQUAL(r, 0); fence_status.context = context_handle; fence_status.ip_type = AMDGPU_HW_IP_GFX; + fence_status.fence = ibs_request.seq_no; r = amdgpu_cs_query_fence_status(&fence_status, AMDGPU_TIMEOUT_INFINITE, @@ -357,15 +362,16 @@ static void amdgpu_command_submission_compute(void) ibs_request.number_of_ibs = 1; ibs_request.ibs = &ib_info; ibs_request.resources = bo_list; + ibs_request.fence_info.handle = NULL; memset(&fence_status, 0, sizeof(struct amdgpu_cs_fence)); - r = amdgpu_cs_submit(context_handle, 0, - &ibs_request, 1, &fence_status.fence); + r = amdgpu_cs_submit(context_handle, 0,&ibs_request, 1); CU_ASSERT_EQUAL(r, 0); fence_status.context = context_handle; fence_status.ip_type = AMDGPU_HW_IP_COMPUTE; fence_status.ring = instance; + fence_status.fence = ibs_request.seq_no; r = amdgpu_cs_query_fence_status(&fence_status, AMDGPU_TIMEOUT_INFINITE, @@ -428,6 +434,7 @@ static void amdgpu_sdma_test_exec_cs(amdgpu_context_handle context_handle, ibs_request->ring = instance; ibs_request->number_of_ibs = 1; ibs_request->ibs = ib_info; + ibs_request->fence_info.handle = NULL; memcpy(all_res, resources, sizeof(resources[0]) * res_cnt); all_res[res_cnt] = ib_result_handle; @@ -439,8 +446,7 @@ static void amdgpu_sdma_test_exec_cs(amdgpu_context_handle context_handle, CU_ASSERT_NOT_EQUAL(ibs_request, NULL); /* submit CS */ - r = amdgpu_cs_submit(context_handle, 0, - ibs_request, 1, &fence_status.fence); + r = amdgpu_cs_submit(context_handle, 0, ibs_request, 1); CU_ASSERT_EQUAL(r, 0); r = amdgpu_bo_list_destroy(ibs_request->resources); @@ -449,6 +455,7 @@ 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.fence = ibs_request->seq_no; /* wait for IB accomplished */ r = amdgpu_cs_query_fence_status(&fence_status, diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c index b1e4d36b..3d9a1c2c 100644 --- a/tests/amdgpu/cs_tests.c +++ b/tests/amdgpu/cs_tests.c @@ -130,8 +130,7 @@ static int submit(unsigned ndw, unsigned ip) ibs_request.number_of_ibs = 1; ibs_request.ibs = &ib_info; - r = amdgpu_cs_submit(context_handle, 0, - &ibs_request, 1, &fence_status.fence); + r = amdgpu_cs_submit(context_handle, 0, &ibs_request, 1); if (r) return r; diff --git a/tests/amdgpu/vce_tests.c b/tests/amdgpu/vce_tests.c index 10398904..44f7c7ed 100644 --- a/tests/amdgpu/vce_tests.c +++ b/tests/amdgpu/vce_tests.c @@ -147,8 +147,7 @@ static int submit(unsigned ndw, unsigned ip) ibs_request.number_of_ibs = 1; ibs_request.ibs = &ib_info; - r = amdgpu_cs_submit(context_handle, 0, - &ibs_request, 1, &fence_status.fence); + r = amdgpu_cs_submit(context_handle, 0, &ibs_request, 1); if (r) return r; |