[PATCH 08/12] tests/amdgpu: expand secure param for exec_cs_helper

Huang, Ray Ray.Huang at amd.com
Fri Nov 15 09:56:46 UTC 2019


On Fri, Nov 15, 2019 at 11:34:51AM +0800, Liu, Aaron wrote:
> This patch expands secure param for amdgpu_test_exec_cs_helper_raw.
> The flag is transfered to kernel with cs.
> 
> Signed-off-by: Aaron Liu <aaron.liu at amd.com>

Acked-by: Huang Rui <ray.huang at amd.com>

> ---
>  tests/amdgpu/basic_tests.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
> index 5154812..956be93 100644
> --- a/tests/amdgpu/basic_tests.c
> +++ b/tests/amdgpu/basic_tests.c
> @@ -1290,7 +1290,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;
> @@ -1324,6 +1325,7 @@ amdgpu_test_exec_cs_helper_raw(amdgpu_device_handle device_handle,
>  	ib_info->size = pm4_dw;
>  
>  	ibs_request->ip_type = ip_type;
> +	ibs_request->flags = secure ? 1 : 0;
>  	ibs_request->ring = instance;
>  	ibs_request->number_of_ibs = 1;
>  	ibs_request->ibs = ib_info;
> @@ -1374,7 +1376,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
> @@ -1466,7 +1468,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
> 


More information about the amd-gfx mailing list