[PATCH 12/12] tests/amdgpu: add test to submit a sdma command with secure context

Aaron Liu aaron.liu at amd.com
Fri Nov 15 03:34:55 UTC 2019


This patch add test to submit a sdma command with secure context.

Signed-off-by: Aaron Liu <aaron.liu at amd.com>
---
 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



More information about the amd-gfx mailing list