From b352ef44b879cfac275d5aeb06d0ab8511dd0d14 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Thu, 14 Nov 2019 15:54:10 +0800 Subject: [PATCH] tests/amdgpu: expand secure param for exec_cs_helper (v2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch expands secure param for amdgpu_test_exec_cs_helper_raw. The flag is transfered to kernel with cs. v2: squash in change from context to IB flag Acked-by: Huang Rui Acked-by: Leo Liu Signed-off-by: Aaron Liu Acked-by: Christian König Acked-by: Huang Rui Signed-off-by: Alex Deucher --- tests/amdgpu/basic_tests.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 156aa90..c43f222 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -1277,7 +1277,8 @@ amdgpu_test_exec_cs_helper_raw(amdgpu_device_handle device_handle, uint32_t *pm4_src, int res_cnt, amdgpu_bo_handle *resources, struct amdgpu_cs_ib_info *ib_info, - struct amdgpu_cs_request *ibs_request) + struct amdgpu_cs_request *ibs_request, + bool secure) { int r; uint32_t expired; @@ -1309,6 +1310,8 @@ amdgpu_test_exec_cs_helper_raw(amdgpu_device_handle device_handle, ib_info->ib_mc_address = ib_result_mc_address; ib_info->size = pm4_dw; + if (secure) + ib_info->flags |= AMDGPU_IB_FLAGS_SECURE; ibs_request->ip_type = ip_type; ibs_request->ring = instance; @@ -1361,7 +1364,7 @@ amdgpu_test_exec_cs_helper(amdgpu_context_handle context_handle, amdgpu_test_exec_cs_helper_raw(device_handle, context_handle, ip_type, instance, pm4_dw, pm4_src, res_cnt, resources, ib_info, - ibs_request); + ibs_request, false); } void @@ -1453,7 +1456,7 @@ amdgpu_command_submission_write_linear_helper_with_secure(amdgpu_device_handle amdgpu_test_exec_cs_helper_raw(device, context_handle, ip_type, ring_id, i, pm4, 1, resources, ib_info, - ibs_request); + ibs_request, secure); /* verify if SDMA test result meets with expected */ i = 0; -- 2.7.4