diff options
author | Aaron Liu <aaron.liu@amd.com> | 2019-11-14 16:36:53 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-10-15 13:46:29 -0400 |
commit | 00087856fc3dc11667ccb4872cd6df6d41ddff51 (patch) | |
tree | 4e0055d6a47636238e788a72c1649535030685ad | |
parent | 5de99b1fa610b8395e1501446ee8340fd044b1fe (diff) | |
download | libdrm-00087856fc3dc11667ccb4872cd6df6d41ddff51.tar.gz libdrm-00087856fc3dc11667ccb4872cd6df6d41ddff51.tar.bz2 libdrm-00087856fc3dc11667ccb4872cd6df6d41ddff51.zip |
tests/amdgpu: add test to submit a gfx command with secure context
This patch is to test the command submission with secure context.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | tests/amdgpu/security_tests.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c index a3807ee8..0bb4ad2a 100644 --- a/tests/amdgpu/security_tests.c +++ b/tests/amdgpu/security_tests.c @@ -32,6 +32,7 @@ static uint32_t major_version; static uint32_t minor_version; static void amdgpu_security_alloc_buf_test(void); +static void amdgpu_security_gfx_submission_test(void); CU_BOOL suite_security_tests_enable(void) { @@ -75,6 +76,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 }, CU_TEST_INFO_NULL, }; @@ -113,3 +115,10 @@ static void amdgpu_security_alloc_buf_test(void) r = gpu_mem_free(bo, va_handle, bo_mc, 4096); CU_ASSERT_EQUAL(r, 0); } + +static void amdgpu_security_gfx_submission_test(void) +{ + amdgpu_command_submission_write_linear_helper_with_secure(device_handle, + AMDGPU_HW_IP_GFX, + true); +} |