From: Huang Rui <ray.huang@xxxxxxx> This patch is to add secure buffer allocation test for invisible VRAM. Signed-off-by: Huang Rui <ray.huang@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@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 afe79e5..a3807ee 100644 --- a/tests/amdgpu/security_tests.c +++ b/tests/amdgpu/security_tests.c @@ -102,4 +102,14 @@ 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 invisible VRAM */ + bo = gpu_mem_alloc(device_handle, 4096, 4096, + AMDGPU_GEM_DOMAIN_GTT, + AMDGPU_GEM_CREATE_ENCRYPTED | + AMDGPU_GEM_CREATE_NO_CPU_ACCESS, + &bo_mc, &va_handle); + + r = gpu_mem_free(bo, va_handle, bo_mc, 4096); + CU_ASSERT_EQUAL(r, 0); } -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx