Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/amdgpu: fix VM test issue
@ 2023-12-14  9:07 Jesse Zhang
  2023-12-14  9:53 ` Christian König
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jesse Zhang @ 2023-12-14  9:07 UTC (permalink / raw)
  To: igt-dev; +Cc: Luben Tuikov, Alex Deucher, Christian Koenig

In some cases, the size of Vram and GTT is not large, such as mobile devices.
It should be skipped.

Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>

Signed-off-by: Jesse zhang <jesse.zhang@amd.com>
---
 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

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH i-g-t] tests/amdgpu:fix vm test issue
@ 2024-01-05  5:18 Jesse Zhang
  2024-01-05  5:18 ` Jesse Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jesse Zhang @ 2024-01-05  5:18 UTC (permalink / raw)
  To: igt-dev; +Cc: Alex Deucher, Christian Koenig

Initialize the variable "r" before using it.

Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
---
 tests/amdgpu/amd_vm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/amdgpu/amd_vm.c b/tests/amdgpu/amd_vm.c
index dab91f291..bb7b6f173 100644
--- a/tests/amdgpu/amd_vm.c
+++ b/tests/amdgpu/amd_vm.c
@@ -127,7 +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;
 
-	if (-ENOMEM == amdgpu_bo_alloc(device_handle, &request, &buf_handle)) {
+	r = amdgpu_bo_alloc(device_handle, &request, &buf_handle);
+	if (-ENOMEM == r) {
 		/* Try allocate on the device of small memory */
 		request.alloc_size = 8ULL << 20;
 		map_size = (8ULL << 20) - (2 << 12);
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-01-05  9:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14  9:07 [PATCH i-g-t] tests/amdgpu: fix VM test issue Jesse Zhang
2023-12-14  9:53 ` Christian König
2023-12-15  1:43   ` Zhang, Jesse(Jie)
2023-12-15  9:28     ` Christian König
2023-12-14 12:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2023-12-14 12:57 ` ✓ CI.xeBAT: " Patchwork
2023-12-14 13:46 ` ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-01-05  5:18 [PATCH i-g-t] tests/amdgpu:fix vm " Jesse Zhang
2024-01-05  5:18 ` Jesse Zhang
2024-01-05  9:42 ` Kamil Konieczny
2024-01-05  9:43 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox