From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::60c]) by gabe.freedesktop.org (Postfix) with ESMTPS id E173910E919 for ; Thu, 14 Dec 2023 09:08:45 +0000 (UTC) From: Jesse Zhang To: Subject: [PATCH i-g-t] tests/amdgpu: fix VM test issue Date: Thu, 14 Dec 2023 17:07:49 +0800 Message-ID: <20231214090749.1711421-1-jesse.zhang@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luben Tuikov , Alex Deucher , Christian Koenig Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: In some cases, the size of Vram and GTT is not large, such as mobile devices. It should be skipped. Cc: Vitaly Prosyak Cc: Alex Deucher Cc: Christian Koenig Cc: Kamil Konieczny Signed-off-by: Jesse zhang --- tests/amdgpu/amd_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/amdgpu/amd_vm.c b/tests/amdgpu/amd_vm.c index 11be25ae8..0dde28e2e 100644 --- a/tests/amdgpu/amd_vm.c +++ b/tests/amdgpu/amd_vm.c @@ -127,8 +127,8 @@ amdgpu_vm_unaligned_map(amdgpu_device_handle device_handle) request.preferred_heap = AMDGPU_GEM_DOMAIN_VRAM; request.flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS; - r = amdgpu_bo_alloc(device_handle, &request, &buf_handle); - igt_assert_eq(r, 0); + /* Don't let the test fail if the device doesn't have enough VRAM */ + igt_skip_on(amdgpu_bo_alloc(device_handle, &request, &buf_handle)); r = amdgpu_va_range_alloc(device_handle, amdgpu_gpu_va_range_general, 4ULL << 30, 1ULL << 30, 0, &vmc_addr, -- 2.25.1