From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2043.outbound.protection.outlook.com [40.107.223.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 231A410E1C2 for ; Fri, 11 Nov 2022 21:53:04 +0000 (UTC) From: To: Date: Fri, 11 Nov 2022 16:52:11 -0500 Message-ID: <20221111215213.48679-7-vitaly.prosyak@amd.com> In-Reply-To: <20221111215213.48679-1-vitaly.prosyak@amd.com> References: <20221111215213.48679-1-vitaly.prosyak@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Subject: [igt-dev] [PATCH 7/9] tests/amdgpu: add tests for invalid memory and register access List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre-eric Pelloux-prayer , marek.olsak@amd.com, christian.koenig@amd.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Vitaly Prosyak Signed-off-by: Vitaly Prosyak Reviewed-by: Pierre-eric Pelloux-prayer --- tests/amdgpu/amd_deadlock.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/amdgpu/amd_deadlock.c b/tests/amdgpu/amd_deadlock.c index d4de20114..df650c921 100644 --- a/tests/amdgpu/amd_deadlock.c +++ b/tests/amdgpu/amd_deadlock.c @@ -58,6 +58,18 @@ amdgpu_deadlock_sdma(amdgpu_device_handle device_handle) amdgpu_wait_memory_helper(device_handle, AMDGPU_HW_IP_DMA); } +static void +amdgpu_gfx_illegal_reg_access(amdgpu_device_handle device_handle) +{ + bad_access_helper(device_handle, 1, AMDGPU_HW_IP_GFX); +} + +static void +amdgpu_gfx_illegal_mem_access(amdgpu_device_handle device_handle) +{ + bad_access_helper(device_handle, 0, AMDGPU_HW_IP_GFX); +} + igt_main { amdgpu_device_handle device; @@ -86,6 +98,12 @@ igt_main igt_subtest("amdgpu_deadlock_sdma") amdgpu_deadlock_sdma(device); + igt_subtest("amdgpu_gfx_illegal_reg_access") + amdgpu_gfx_illegal_reg_access(device); + + igt_subtest("amdgpu_gfx_illegal_mem_access") + amdgpu_gfx_illegal_mem_access(device); + igt_subtest("amdgpu_deadlock_gfx") amdgpu_deadlock_gfx(device); -- 2.25.1