From 00087856fc3dc11667ccb4872cd6df6d41ddff51 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Thu, 14 Nov 2019 16:36:53 +0800 Subject: [PATCH] tests/amdgpu: add test to submit a gfx command with secure context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch is to test the command submission with secure context. Acked-by: Huang Rui Acked-by: Leo Liu Signed-off-by: Aaron Liu Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- tests/amdgpu/security_tests.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/amdgpu/security_tests.c b/tests/amdgpu/security_tests.c index a3807ee..0bb4ad2 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); +} -- 2.7.4