summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-07-25 09:47:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-07-26 23:32:10 +0100
commit27b0205155bebf74c1f97d1617dbec426d2f719e (patch)
tree6fd9db4dc34c330037e3880417ff6c1a0cda099f
parentea6297d497d0667da9867f2275051bc866d96c92 (diff)
drm_import_export: Check for working and known GPU
Since this relies on libdrm being updated for new GPUs [spoiler warning], just mark future failures with a skip until support lands. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2220 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
-rw-r--r--tests/drm_import_export.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index 6174c997..65cac60d 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -40,6 +40,8 @@
#include <unistd.h>
#include <sys/syscall.h>
+#include "i915/gem.h"
+
#define DURATION 10
int fd;
@@ -234,14 +236,14 @@ pthread_t test_thread_id4;
igt_main {
igt_fixture {
fd1 = drm_open_driver(DRIVER_INTEL);
- igt_assert(fd1 >= 0);
+ igt_require_gem(fd1);
+
bufmgr1 = drm_intel_bufmgr_gem_init(fd1, 8 *1024);
- igt_assert(bufmgr1);
+ igt_require(bufmgr1);
drm_intel_bufmgr_gem_enable_reuse(bufmgr1);
- fd = drm_open_driver(DRIVER_INTEL);
- igt_assert(fd >= 0);
+ fd = gem_reopen_driver(fd1);
bufmgr = drm_intel_bufmgr_gem_init(fd, 8 *1024);
igt_assert(bufmgr);