summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-12-13 11:54:36 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-12-17 15:23:49 +0000
commit270da20849db4d170db09673c6b67712c90ec9fe (patch)
tree72197b7d009db08df64ccdd4405ceed2850a9d62 /tests
parent90c76cb9bb47a5a3ebb34ad6b1a557bc02d39713 (diff)
igt/amdgpu_amd_prime: Bail if we fail to create more contexts
amdgpu has started to report out of space after creating a few contexts. This is not the scope of this test as here we are just verifying that fences created in amd can be imported and used for synchronisation by i915 and for that we just need at least one context created! References: https://bugs.freedesktop.org/show_bug.cgi?id=109049 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/amdgpu/amd_prime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
index bda0ce83d..518c88963 100644
--- a/tests/amdgpu/amd_prime.c
+++ b/tests/amdgpu/amd_prime.c
@@ -354,8 +354,8 @@ static void amd_to_i915(int i915, int amd, amdgpu_device_handle device)
contexts = realloc(contexts, size * sizeof(*contexts));
}
- r = amdgpu_cs_ctx_create(device, &contexts[count]);
- igt_assert_eq(r, 0);
+ if (amdgpu_cs_ctx_create(device, &contexts[count]))
+ break;
r = amdgpu_cs_submit(contexts[count], 0, &ibs_request, 1);
igt_assert_eq(r, 0);
@@ -364,6 +364,7 @@ static void amd_to_i915(int i915, int amd, amdgpu_device_handle device)
}
igt_info("Reservation width = %ld\n", count);
+ igt_require(count);
amdgpu_bo_export(ib_result_handle,
amdgpu_bo_handle_type_dma_buf_fd,