tests/amdgpu: expand write/copy tests to compute

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
main
Alex Deucher 2016-02-19 19:28:23 -05:00
parent b7a51965e1
commit 3f5b31939c
1 changed files with 34 additions and 7 deletions

View File

@ -445,17 +445,17 @@ static void amdgpu_command_submission_gfx_shared_ib(void)
CU_ASSERT_EQUAL(r, 0); CU_ASSERT_EQUAL(r, 0);
} }
static void amdgpu_command_submission_cp_write_data(void) static void amdgpu_command_submission_gfx_cp_write_data(void)
{ {
amdgpu_command_submission_write_linear_helper(AMDGPU_HW_IP_GFX); amdgpu_command_submission_write_linear_helper(AMDGPU_HW_IP_GFX);
} }
static void amdgpu_command_submission_cp_const_fill(void) static void amdgpu_command_submission_gfx_cp_const_fill(void)
{ {
amdgpu_command_submission_const_fill_helper(AMDGPU_HW_IP_GFX); amdgpu_command_submission_const_fill_helper(AMDGPU_HW_IP_GFX);
} }
static void amdgpu_command_submission_cp_copy_data(void) static void amdgpu_command_submission_gfx_cp_copy_data(void)
{ {
amdgpu_command_submission_copy_linear_helper(AMDGPU_HW_IP_GFX); amdgpu_command_submission_copy_linear_helper(AMDGPU_HW_IP_GFX);
} }
@ -463,11 +463,11 @@ static void amdgpu_command_submission_cp_copy_data(void)
static void amdgpu_command_submission_gfx(void) static void amdgpu_command_submission_gfx(void)
{ {
/* write data using the CP */ /* write data using the CP */
amdgpu_command_submission_cp_write_data(); amdgpu_command_submission_gfx_cp_write_data();
/* const fill using the CP */ /* const fill using the CP */
amdgpu_command_submission_cp_const_fill(); amdgpu_command_submission_gfx_cp_const_fill();
/* copy data using the CP */ /* copy data using the CP */
amdgpu_command_submission_cp_copy_data(); amdgpu_command_submission_gfx_cp_copy_data();
/* separate IB buffers for multi-IB submission */ /* separate IB buffers for multi-IB submission */
amdgpu_command_submission_gfx_separate_ibs(); amdgpu_command_submission_gfx_separate_ibs();
/* shared IB buffer for multi-IB submission */ /* shared IB buffer for multi-IB submission */
@ -602,7 +602,7 @@ static void amdgpu_semaphore_test(void)
CU_ASSERT_EQUAL(r, 0); CU_ASSERT_EQUAL(r, 0);
} }
static void amdgpu_command_submission_compute(void) static void amdgpu_command_submission_compute_nop(void)
{ {
amdgpu_context_handle context_handle; amdgpu_context_handle context_handle;
amdgpu_bo_handle ib_result_handle; amdgpu_bo_handle ib_result_handle;
@ -673,6 +673,33 @@ static void amdgpu_command_submission_compute(void)
CU_ASSERT_EQUAL(r, 0); CU_ASSERT_EQUAL(r, 0);
} }
static void amdgpu_command_submission_compute_cp_write_data(void)
{
amdgpu_command_submission_write_linear_helper(AMDGPU_HW_IP_COMPUTE);
}
static void amdgpu_command_submission_compute_cp_const_fill(void)
{
amdgpu_command_submission_const_fill_helper(AMDGPU_HW_IP_COMPUTE);
}
static void amdgpu_command_submission_compute_cp_copy_data(void)
{
amdgpu_command_submission_copy_linear_helper(AMDGPU_HW_IP_COMPUTE);
}
static void amdgpu_command_submission_compute(void)
{
/* write data using the CP */
amdgpu_command_submission_compute_cp_write_data();
/* const fill using the CP */
amdgpu_command_submission_compute_cp_const_fill();
/* copy data using the CP */
amdgpu_command_submission_compute_cp_copy_data();
/* nop test */
amdgpu_command_submission_compute_nop();
}
/* /*
* caller need create/release: * caller need create/release:
* pm4_src, resources, ib_info, and ibs_request * pm4_src, resources, ib_info, and ibs_request