On Fri, Nov 15, 2019 at 11:34:55AM +0800, Liu, Aaron wrote: > This patch add test to submit a sdma command with secure context. > > Signed-off-by: Aaron Liu <aaron.liu@xxxxxxx> Reviewed-by: Huang Rui <ray.huang@xxxxxxx> > --- > tests/amdgpu/security_tests.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c > index 0bb4ad2..eb239f4 100644 > --- a/tests/amdgpu/security_tests.c > +++ b/tests/amdgpu/security_tests.c > @@ -33,6 +33,8 @@ static uint32_t minor_version; > > static void amdgpu_security_alloc_buf_test(void); > static void amdgpu_security_gfx_submission_test(void); > +static void amdgpu_security_sdma_submission_test(void); > + > > CU_BOOL suite_security_tests_enable(void) > { > @@ -77,6 +79,7 @@ int suite_security_tests_clean(void) > CU_TestInfo security_tests[] = { > { "allocate secure buffer test", amdgpu_security_alloc_buf_test }, > { "graphics secure command submission", amdgpu_security_gfx_submission_test }, > + { "sdma secure command submission", amdgpu_security_sdma_submission_test }, > CU_TEST_INFO_NULL, > }; > > @@ -122,3 +125,10 @@ static void amdgpu_security_gfx_submission_test(void) > AMDGPU_HW_IP_GFX, > true); > } > + > +static void amdgpu_security_sdma_submission_test(void) > +{ > + amdgpu_command_submission_write_linear_helper_with_secure(device_handle, > + AMDGPU_HW_IP_DMA, > + true); > +} > -- > 2.7.4 > _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx