From e63b775e5ab4941debc537cd7ebbb410c4058a22 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Fri, 16 Aug 2019 16:18:21 +0800 Subject: [PATCH] tests/amdgpu: add secure buffer allocation test for system memory MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch is to add secure buffer allocation test for system memory. Acked-by: Huang Rui Acked-by: Leo Liu Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Acked-by: Christian König 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 182b03d..afe79e5 100644 --- a/tests/amdgpu/security_tests.c +++ b/tests/amdgpu/security_tests.c @@ -93,4 +93,13 @@ static void amdgpu_security_alloc_buf_test(void) r = gpu_mem_free(bo, va_handle, bo_mc, 4096); CU_ASSERT_EQUAL(r, 0); + + /* Test secure buffer allocation in system memory */ + bo = gpu_mem_alloc(device_handle, 4096, 4096, + AMDGPU_GEM_DOMAIN_GTT, + AMDGPU_GEM_CREATE_ENCRYPTED, + &bo_mc, &va_handle); + + r = gpu_mem_free(bo, va_handle, bo_mc, 4096); + CU_ASSERT_EQUAL(r, 0); } -- 2.7.4