[Intel-gfx] [PATCH] igt: adding parameter to drm_open_any and drm_open_any_master to allow specification of non-intel GPUs
Micah Fedke
micah.fedke at collabora.co.uk
Mon Jun 15 15:28:20 PDT 2015
---
A second swing at non-intel GPU support in igt. This patch updates igt's
internal API to support opening different GPUs by adding a parameter to
drm_open_any() and drm_open_any_master(). The interesting changes are in lib/,
the rest of the changes are just updates to the call sites. I have a .cocci
for this, but I couldn't get it to cover 100% of the calls, so this is the
product of some hand editing, for now. I'll keep working on that. Danvet -
the drm_require_driver and prime stuff are not addressed, yet.
benchmarks/gem_userptr_benchmark.c | 2 +-
benchmarks/intel_upload_blit_large.c | 2 +-
benchmarks/intel_upload_blit_large_gtt.c | 2 +-
benchmarks/intel_upload_blit_large_map.c | 2 +-
benchmarks/intel_upload_blit_small.c | 2 +-
lib/drmtest.c | 79 +++++++++++++++++++++++++-------
lib/drmtest.h | 12 +++--
lib/igt_gt.c | 4 +-
lib/igt_gt.h | 2 +-
lib/igt_kms.c | 6 ++-
lib/igt_kms.h | 2 +-
tests/core_get_client_auth.c | 6 +--
tests/core_getclient.c | 2 +-
tests/core_getstats.c | 2 +-
tests/core_getversion.c | 2 +-
tests/drm_import_export.c | 4 +-
tests/drm_read.c | 2 +-
tests/drm_vma_limiter.c | 2 +-
tests/drm_vma_limiter_cached.c | 2 +-
tests/drm_vma_limiter_cpu.c | 2 +-
tests/drm_vma_limiter_gtt.c | 2 +-
tests/drv_getparams.c | 2 +-
tests/drv_hangman.c | 4 +-
tests/drv_suspend.c | 2 +-
tests/eviction_common.c | 2 +-
tests/gem_alive.c | 2 +-
tests/gem_bad_address.c | 2 +-
tests/gem_bad_batch.c | 2 +-
tests/gem_bad_blit.c | 2 +-
tests/gem_bad_length.c | 2 +-
tests/gem_bad_reloc.c | 2 +-
tests/gem_basic.c | 2 +-
tests/gem_caching.c | 2 +-
tests/gem_concurrent_blit.c | 4 +-
tests/gem_cpu_reloc.c | 2 +-
tests/gem_cs_prefetch.c | 2 +-
tests/gem_cs_tlb.c | 2 +-
tests/gem_double_irq_loop.c | 2 +-
tests/gem_dummy_reloc_loop.c | 4 +-
tests/gem_evict_alignment.c | 4 +-
tests/gem_evict_everything.c | 4 +-
tests/gem_exec_bad_domains.c | 2 +-
tests/gem_exec_big.c | 2 +-
tests/gem_exec_blt.c | 2 +-
tests/gem_exec_faulting_reloc.c | 2 +-
tests/gem_exec_lut_handle.c | 2 +-
tests/gem_exec_nop.c | 2 +-
tests/gem_exec_params.c | 2 +-
tests/gem_exec_parse.c | 2 +-
tests/gem_fd_exhaustion.c | 2 +-
tests/gem_fence_thrash.c | 2 +-
tests/gem_fence_upload.c | 8 ++--
tests/gem_fenced_exec_thrash.c | 2 +-
tests/gem_flink.c | 6 +--
tests/gem_flink_race.c | 6 +--
tests/gem_gtt_cpu_tlb.c | 2 +-
tests/gem_gtt_hog.c | 4 +-
tests/gem_gtt_speed.c | 2 +-
tests/gem_hang.c | 2 +-
tests/gem_hangcheck_forcewake.c | 2 +-
tests/gem_largeobject.c | 2 +-
tests/gem_linear_blits.c | 2 +-
tests/gem_lut_handle.c | 2 +-
tests/gem_madvise.c | 12 ++---
tests/gem_mmap.c | 2 +-
tests/gem_mmap_gtt.c | 4 +-
tests/gem_mmap_offset_exhaustion.c | 2 +-
tests/gem_mmap_wc.c | 2 +-
tests/gem_multi_bsd_sync_loop.c | 4 +-
tests/gem_non_secure_batch.c | 2 +-
tests/gem_partial_pwrite_pread.c | 2 +-
tests/gem_persistent_relocs.c | 2 +-
tests/gem_pin.c | 2 +-
tests/gem_pipe_control_store_loop.c | 2 +-
tests/gem_ppgtt.c | 4 +-
tests/gem_pread.c | 2 +-
tests/gem_pread_after_blit.c | 2 +-
tests/gem_pwrite.c | 2 +-
tests/gem_pwrite_pread.c | 2 +-
tests/gem_readwrite.c | 2 +-
tests/gem_reg_read.c | 2 +-
tests/gem_reloc_overflow.c | 2 +-
tests/gem_reloc_vs_gpu.c | 4 +-
tests/gem_render_copy_redux.c | 2 +-
tests/gem_render_linear_blits.c | 2 +-
tests/gem_render_tiled_blits.c | 2 +-
tests/gem_reset_stats.c | 40 ++++++++--------
tests/gem_ring_sync_loop.c | 2 +-
tests/gem_ringfill.c | 2 +-
tests/gem_seqno_wrap.c | 2 +-
tests/gem_set_tiling_vs_blt.c | 2 +-
tests/gem_set_tiling_vs_gtt.c | 2 +-
tests/gem_set_tiling_vs_pwrite.c | 2 +-
tests/gem_storedw_batches_loop.c | 2 +-
tests/gem_storedw_loop_blt.c | 2 +-
tests/gem_storedw_loop_bsd.c | 2 +-
tests/gem_storedw_loop_render.c | 2 +-
tests/gem_storedw_loop_vebox.c | 2 +-
tests/gem_stress.c | 2 +-
tests/gem_threaded_access_tiled.c | 2 +-
tests/gem_tiled_blits.c | 2 +-
tests/gem_tiled_fence_blits.c | 2 +-
tests/gem_tiled_partial_pwrite_pread.c | 2 +-
tests/gem_tiled_pread.c | 2 +-
tests/gem_tiled_pread_pwrite.c | 2 +-
tests/gem_tiled_swapping.c | 2 +-
tests/gem_tiled_wb.c | 2 +-
tests/gem_tiled_wc.c | 2 +-
tests/gem_tiling_max_stride.c | 2 +-
tests/gem_unfence_active_buffers.c | 2 +-
tests/gem_unref_active_buffers.c | 2 +-
tests/gem_userptr_blits.c | 6 +--
tests/gem_wait.c | 2 +-
tests/gem_workarounds.c | 2 +-
tests/gem_write_read_ring_switch.c | 2 +-
tests/gen3_mixed_blits.c | 2 +-
tests/gen3_render_linear_blits.c | 2 +-
tests/gen3_render_mixed_blits.c | 2 +-
tests/gen3_render_tiledx_blits.c | 2 +-
tests/gen3_render_tiledy_blits.c | 2 +-
tests/gen7_forcewake_mt.c | 2 +-
tests/kms_3d.c | 2 +-
tests/kms_addfb.c | 2 +-
tests/kms_cursor_crc.c | 2 +-
tests/kms_fbc_crc.c | 2 +-
tests/kms_fence_pin_leak.c | 2 +-
tests/kms_flip.c | 4 +-
tests/kms_flip_event_leak.c | 4 +-
tests/kms_flip_tiling.c | 2 +-
tests/kms_force_connector.c | 2 +-
tests/kms_mmio_vs_cs_flip.c | 2 +-
tests/kms_pipe_crc_basic.c | 4 +-
tests/kms_plane.c | 2 +-
tests/kms_psr_sink_crc.c | 2 +-
tests/kms_pwrite_crc.c | 2 +-
tests/kms_render.c | 2 +-
tests/kms_rotation_crc.c | 2 +-
tests/kms_setmode.c | 2 +-
tests/kms_sink_crc_basic.c | 2 +-
tests/kms_universal_plane.c | 2 +-
tests/pm_lpsp.c | 2 +-
tests/pm_rc6_residency.c | 2 +-
tests/pm_rpm.c | 2 +-
tests/pm_rps.c | 4 +-
tests/prime_self_import.c | 28 +++++------
tests/template.c | 2 +-
tests/testdisplay.c | 2 +-
tools/intel_display_poller.c | 2 +-
tools/intel_gpu_frequency.c | 2 +-
tools/intel_l3_parity.c | 2 +-
tools/intel_perf_counters.c | 2 +-
151 files changed, 286 insertions(+), 235 deletions(-)
diff --git a/benchmarks/gem_userptr_benchmark.c b/benchmarks/gem_userptr_benchmark.c
index 4d7442b..fb0b5ef 100644
--- a/benchmarks/gem_userptr_benchmark.c
+++ b/benchmarks/gem_userptr_benchmark.c
@@ -470,7 +470,7 @@ int main(int argc, char **argv)
igt_subtest_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_assert(fd >= 0);
ret = has_userptr(fd);
diff --git a/benchmarks/intel_upload_blit_large.c b/benchmarks/intel_upload_blit_large.c
index 689f9c4..3a96947 100644
--- a/benchmarks/intel_upload_blit_large.c
+++ b/benchmarks/intel_upload_blit_large.c
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
struct intel_batchbuffer *batch;
int i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/benchmarks/intel_upload_blit_large_gtt.c b/benchmarks/intel_upload_blit_large_gtt.c
index 601496d..69b9fee 100644
--- a/benchmarks/intel_upload_blit_large_gtt.c
+++ b/benchmarks/intel_upload_blit_large_gtt.c
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
struct intel_batchbuffer *batch;
int i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/benchmarks/intel_upload_blit_large_map.c b/benchmarks/intel_upload_blit_large_map.c
index d916737..69a15d9 100644
--- a/benchmarks/intel_upload_blit_large_map.c
+++ b/benchmarks/intel_upload_blit_large_map.c
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
struct intel_batchbuffer *batch;
int i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/benchmarks/intel_upload_blit_small.c b/benchmarks/intel_upload_blit_small.c
index b9640a4..98ec157 100644
--- a/benchmarks/intel_upload_blit_small.c
+++ b/benchmarks/intel_upload_blit_small.c
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
struct intel_batchbuffer *batch;
int i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/lib/drmtest.c b/lib/drmtest.c
index ee5c123..521c7fc 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -75,19 +75,51 @@
uint16_t __drm_device_id;
-static int is_i915_device(int fd)
+/**
+ * __get_drm_device_name:
+ *
+ * Obtains the name of the drm device driver of the opened drm fd
+ *
+ * @fd: opened drm file descriptor to query
+ * @name: output: pointer to string to be filled with the device name
+ *
+ * Returns:
+ * 0 if the name was successfully written to @name, or -1 on error
+ */
+static int __get_drm_device_name(int fd, char *name)
{
drm_version_t version;
- char name[5] = "";
memset(&version, 0, sizeof(version));
version.name_len = 4;
version.name = name;
- if (drmIoctl(fd, DRM_IOCTL_VERSION, &version))
+ if (drmIoctl(fd, DRM_IOCTL_VERSION, &version)){
+ printf( "mfdebug: got drm device name: \"%s\"\n", name );
return 0;
+ }
+
+ return -1;
+}
+
+static int is_i915_device(int fd)
+{
+ int ret;
+ char name[5] = "";
- return strcmp("i915", name) == 0;
+ ret = __get_drm_device_name(fd, name);
+
+ return !ret && strcmp("i915", name) == 0;
+}
+
+static int is_exynos_device(int fd)
+{
+ int ret;
+ char name[5] = "";
+
+ ret = __get_drm_device_name(fd, name);
+
+ return !ret && strcmp("exynos", name) == 0;
}
static int
@@ -230,19 +262,32 @@ int drm_get_card(void)
return -1;
}
-/** Open the first DRM device we can find, searching up to 16 device nodes */
-int __drm_open_any(void)
+/**
+ * __drm_open_any:
+ *
+ * Open the first DRM device we can find, searching up to 16 device nodes
+ *
+ * @chipset: OR'd flags for each chipset to search, eg. OPEN_INTEL|OPEN_EXYNOS
+ *
+ * Returns:
+ * An open DRM fd or -1 on error
+ */
+int __drm_open_any(int chipset)
{
for (int i = 0; i < 16; i++) {
char name[80];
int fd;
+ bool found_intel, found_exynos;
sprintf(name, "/dev/dri/card%u", i);
fd = open(name, O_RDWR);
if (fd == -1)
continue;
- if (is_i915_device(fd) && is_intel(fd))
+ found_intel = (chipset & OPEN_INTEL) && is_i915_device(fd) && is_intel(fd);
+ found_exynos = (chipset & OPEN_EXYNOS) && is_exynos_device(fd);
+
+ if (found_intel || found_exynos)
return fd;
close(fd);
@@ -252,7 +297,7 @@ int __drm_open_any(void)
return -1;
}
-static int __drm_open_any_render(void)
+static int __drm_open_any_render(int chipset)
{
char *name;
int i, fd;
@@ -314,10 +359,10 @@ static void quiescent_gpu_at_exit_render(int sig)
*
* Returns: a i915 drm file descriptor
*/
-int drm_open_any(void)
+int drm_open_any(int chipset)
{
static int open_count;
- int fd = __drm_open_any();
+ int fd = __drm_open_any(chipset);
igt_require(fd >= 0);
@@ -325,7 +370,7 @@ int drm_open_any(void)
return fd;
gem_quiescent_gpu(fd);
- at_exit_drm_fd = __drm_open_any();
+ at_exit_drm_fd = __drm_open_any(chipset);
igt_install_exit_handler(quiescent_gpu_at_exit);
return fd;
@@ -339,9 +384,9 @@ int drm_open_any(void)
* Returns:
* The i915 drm file descriptor or -1 on error
*/
-int drm_open_any_master(void)
+int drm_open_any_master(int chipset)
{
- int fd = drm_open_any();
+ int fd = drm_open_any(chipset);
igt_require(fd >= 0);
igt_require_f(drmSetMaster(fd) == 0, "Can't become DRM master, "
@@ -358,19 +403,19 @@ int drm_open_any_master(void)
* Returns:
* The i915 drm file descriptor or -1 on error
*/
-int drm_open_any_render(void)
+int drm_open_any_render(int chipset)
{
static int open_count;
- int fd = __drm_open_any_render();
+ int fd = __drm_open_any_render(chipset);
/* no render nodes, fallback to drm_open_any() */
if (fd == -1)
- return drm_open_any();
+ return drm_open_any(chipset);
if (__sync_fetch_and_add(&open_count, 1))
return fd;
- at_exit_drm_render_fd = __drm_open_any();
+ at_exit_drm_render_fd = __drm_open_any(chipset);
gem_quiescent_gpu(fd);
igt_install_exit_handler(quiescent_gpu_at_exit_render);
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 508cc83..1aa8e18 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -38,6 +38,10 @@
#include "intel_batchbuffer.h"
+#define OPEN_INTEL 0x1
+#define OPEN_EXYNOS 0x1 << 1
+#define OPEN_ANY_GPU OPEN_INTEL|OPEN_EXYNOS
+
#ifdef ANDROID
#ifndef HAVE_MMAP64
extern void* __mmap2(void *, size_t, int, int, int, off_t);
@@ -71,10 +75,10 @@ static inline void *igt_mmap64(void *addr, size_t length, int prot, int flags,
#define ALIGN(v, a) (((v) + (a)-1) & ~((a)-1))
int drm_get_card(void);
-int __drm_open_any(void);
-int drm_open_any(void);
-int drm_open_any_master(void);
-int drm_open_any_render(void);
+int __drm_open_any(int chipset);
+int drm_open_any(int chipset);
+int drm_open_any_master(int chipset);
+int drm_open_any_render(int chipset);
void gem_quiescent_gpu(int fd);
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 84aa5d3..8670745 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -178,14 +178,14 @@ hang_helper_process(pid_t pid, int fd)
* In tests with subtests this function can be called outside of failure
* catching code blocks like #igt_fixture or #igt_subtest.
*/
-int igt_fork_hang_helper(void)
+int igt_fork_hang_helper(int chipset)
{
int fd, gen;
if (igt_only_list_subtests())
return 1;
- fd = drm_open_any();
+ fd = drm_open_any(chipset);
if (fd == -1)
return 0;
diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index 5105423..9d43322 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -36,7 +36,7 @@ typedef struct igt_hang_ring {
struct igt_hang_ring igt_hang_ring(int fd, int ring);
void igt_post_hang_ring(int fd, struct igt_hang_ring arg);
-int igt_fork_hang_helper(void);
+int igt_fork_hang_helper(int chipset);
void igt_stop_hang_helper(void);
int igt_open_forcewake_handle(void);
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9c131f0..ea03219 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1800,14 +1800,16 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
*
* An exit handler is installed to ensure connectors are reset when the test
* exits.
+ *
+ * @chipset OR'd flags selecting the chipsets to operate on
*/
-void igt_enable_connectors(void)
+void igt_enable_connectors(int chipset)
{
drmModeRes *res;
drmModeConnector *c;
int drm_fd;
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(chipset);
res = drmModeGetResources(drm_fd);
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 565df14..e9e4fc3 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -270,7 +270,7 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
#define IGT_FIXED(i,f) ((i) << 16 | (f))
-void igt_enable_connectors(void);
+void igt_enable_connectors(int chipset);
void igt_reset_connectors(void);
#define EDID_LENGTH 128
diff --git a/tests/core_get_client_auth.c b/tests/core_get_client_auth.c
index bbfdddf..24dbff0 100644
--- a/tests/core_get_client_auth.c
+++ b/tests/core_get_client_auth.c
@@ -84,7 +84,7 @@ igt_main
{
/* root (which we run igt as) should always be authenticated */
igt_subtest("simple") {
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
igt_assert(check_auth(fd) == true);
@@ -92,8 +92,8 @@ igt_main
}
igt_subtest("master-drop") {
- int fd = drm_open_any();
- int fd2 = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
+ int fd2 = drm_open_any(OPEN_INTEL);
igt_assert(check_auth(fd2) == true);
diff --git a/tests/core_getclient.c b/tests/core_getclient.c
index 7598e0f..b6dec2e 100644
--- a/tests/core_getclient.c
+++ b/tests/core_getclient.c
@@ -39,7 +39,7 @@ igt_simple_main
int fd, ret;
drm_client_t client;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
/* Look for client index 0. This should exist whether we're operating
* on an otherwise unused drm device, or the X Server is running on
diff --git a/tests/core_getstats.c b/tests/core_getstats.c
index 52a2d20..4911d0b 100644
--- a/tests/core_getstats.c
+++ b/tests/core_getstats.c
@@ -48,7 +48,7 @@ igt_simple_main
int fd, ret;
drm_stats_t stats;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
igt_assert(ret == 0);
diff --git a/tests/core_getversion.c b/tests/core_getversion.c
index 30132e4..f14e7fa 100644
--- a/tests/core_getversion.c
+++ b/tests/core_getversion.c
@@ -37,7 +37,7 @@ igt_simple_main
int fd;
drmVersionPtr v;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
v = drmGetVersion(fd);
igt_assert(strlen(v->name) != 0);
igt_assert(strlen(v->date) != 0);
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index 57b13dd..c442f7f 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -138,14 +138,14 @@ pthread_t test_thread_id4;
igt_main {
igt_fixture {
- fd1 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
igt_assert(fd1 >= 0);
bufmgr1 = drm_intel_bufmgr_gem_init(fd1, 8 *1024);
igt_assert(bufmgr1);
drm_intel_bufmgr_gem_enable_reuse(bufmgr1);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_assert(fd >= 0);
bufmgr = drm_intel_bufmgr_gem_init(fd, 8 *1024);
igt_assert(bufmgr);
diff --git a/tests/drm_read.c b/tests/drm_read.c
index 334f26a..cb64ca5 100644
--- a/tests/drm_read.c
+++ b/tests/drm_read.c
@@ -202,7 +202,7 @@ igt_main
siginterrupt(SIGALRM, 1);
igt_fixture {
- fd = drm_open_any_master();
+ fd = drm_open_any_master(OPEN_INTEL);
igt_require(pipe0_enabled(fd));
}
diff --git a/tests/drm_vma_limiter.c b/tests/drm_vma_limiter.c
index bb7102f..97619cc 100644
--- a/tests/drm_vma_limiter.c
+++ b/tests/drm_vma_limiter.c
@@ -64,7 +64,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/drm_vma_limiter_cached.c b/tests/drm_vma_limiter_cached.c
index 74d0c1a..82e44be 100644
--- a/tests/drm_vma_limiter_cached.c
+++ b/tests/drm_vma_limiter_cached.c
@@ -63,7 +63,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/drm_vma_limiter_cpu.c b/tests/drm_vma_limiter_cpu.c
index e17a679..c505873 100644
--- a/tests/drm_vma_limiter_cpu.c
+++ b/tests/drm_vma_limiter_cpu.c
@@ -63,7 +63,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/drm_vma_limiter_gtt.c b/tests/drm_vma_limiter_gtt.c
index 303e86d..383932b 100644
--- a/tests/drm_vma_limiter_gtt.c
+++ b/tests/drm_vma_limiter_gtt.c
@@ -64,7 +64,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/drv_getparams.c b/tests/drv_getparams.c
index f383662..71c059c 100644
--- a/tests/drv_getparams.c
+++ b/tests/drv_getparams.c
@@ -41,7 +41,7 @@ int devid;
static void
init(void)
{
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(drm_fd);
}
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index d93bef3..5ace834 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -224,7 +224,7 @@ static void test_error_state_basic(void)
clear_error_state();
assert_error_state_clear();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
submit_batch(fd, I915_EXEC_RENDER, true);
close(fd);
@@ -376,7 +376,7 @@ static void test_error_state_capture(unsigned ring_id,
clear_error_state();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gen = intel_gen(intel_get_drm_devid(fd));
cmd_parser = uses_cmd_parser(fd, gen);
diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c
index d67a794..4201e3a 100644
--- a/tests/drv_suspend.c
+++ b/tests/drv_suspend.c
@@ -182,7 +182,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_subtest("fence-restore-tiled2untiled")
test_fence_restore(fd, true, false);
diff --git a/tests/eviction_common.c b/tests/eviction_common.c
index 82cdaeb..358c88c 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -208,7 +208,7 @@ static int forking_evictions(int fd, struct igt_eviction_test_ops *ops,
igt_permute_array(bo, bo_count, exchange_uint32_t);
if (flags & FORKING_EVICTIONS_DUP_DRMFD) {
- realfd = drm_open_any();
+ realfd = drm_open_any(OPEN_INTEL);
/* We can overwrite the bo array since we're forked. */
for (l = 0; l < bo_count; l++) {
diff --git a/tests/gem_alive.c b/tests/gem_alive.c
index 390a54f..adf524f 100644
--- a/tests/gem_alive.c
+++ b/tests/gem_alive.c
@@ -14,7 +14,7 @@ int main(void)
signal(SIGALRM, SIG_IGN);
- fd = __drm_open_any();
+ fd = __drm_open_any(OPEN_INTEL);
if (fd < 0)
return IGT_EXIT_SKIP;
diff --git a/tests/gem_bad_address.c b/tests/gem_bad_address.c
index 4a4a570..d33d297 100644
--- a/tests/gem_bad_address.c
+++ b/tests/gem_bad_address.c
@@ -64,7 +64,7 @@ igt_simple_main
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_bad_batch.c b/tests/gem_bad_batch.c
index e3de3b6..5090b34 100644
--- a/tests/gem_bad_batch.c
+++ b/tests/gem_bad_batch.c
@@ -60,7 +60,7 @@ igt_simple_main
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_bad_blit.c b/tests/gem_bad_blit.c
index 366b182..6552ddf 100644
--- a/tests/gem_bad_blit.c
+++ b/tests/gem_bad_blit.c
@@ -100,7 +100,7 @@ igt_simple_main
drm_intel_bo *src;
int fd;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_bad_length.c b/tests/gem_bad_length.c
index 29b3925..086ba9b 100644
--- a/tests/gem_bad_length.c
+++ b/tests/gem_bad_length.c
@@ -124,7 +124,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
create0(fd);
diff --git a/tests/gem_bad_reloc.c b/tests/gem_bad_reloc.c
index 36d8c09..b420284 100644
--- a/tests/gem_bad_reloc.c
+++ b/tests/gem_bad_reloc.c
@@ -208,7 +208,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
}
igt_subtest("negative-reloc")
diff --git a/tests/gem_basic.c b/tests/gem_basic.c
index f79b066..40016d3 100644
--- a/tests/gem_basic.c
+++ b/tests/gem_basic.c
@@ -80,7 +80,7 @@ int fd;
igt_main
{
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_subtest("bad-close")
test_bad_close(fd);
diff --git a/tests/gem_caching.c b/tests/gem_caching.c
index 2fad0ec..4d36a0f 100644
--- a/tests/gem_caching.c
+++ b/tests/gem_caching.c
@@ -119,7 +119,7 @@ igt_main
igt_fixture {
srandom(0xdeadbeef);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gem_require_caching(fd);
diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c
index e1693ba..36e1e8b 100644
--- a/tests/gem_concurrent_blit.c
+++ b/tests/gem_concurrent_blit.c
@@ -637,7 +637,7 @@ static void run_forked(const struct access_mode *mode,
drm_intel_bufmgr *bufmgr;
/* recreate process local variables */
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
@@ -833,7 +833,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
gen = intel_gen(devid);
rendercopy = igt_get_render_copyfunc(devid);
diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c
index c67907a..8850fe8 100644
--- a/tests/gem_cpu_reloc.c
+++ b/tests/gem_cpu_reloc.c
@@ -168,7 +168,7 @@ igt_simple_main
uint32_t *handles;
int fd, i, count;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
noop = intel_get_drm_devid(fd);
use_blt = 0;
diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index 8a912ef..62adc28 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -103,7 +103,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
igt_assert(bufmgr);
diff --git a/tests/gem_cs_tlb.c b/tests/gem_cs_tlb.c
index 3df4f37..e34f785 100644
--- a/tests/gem_cs_tlb.c
+++ b/tests/gem_cs_tlb.c
@@ -157,7 +157,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
/* This test is very sensitive to residual gtt_mm noise from previous
* tests. Try to quiet thing down first. */
diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c
index a43fd1a..7d43291 100644
--- a/tests/gem_double_irq_loop.c
+++ b/tests/gem_double_irq_loop.c
@@ -99,7 +99,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
igt_require_f(HAS_BLT_RING(devid),
"not (yet) implemented for pre-snb\n");
diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c
index 5e0a10a..fa10543 100644
--- a/tests/gem_dummy_reloc_loop.c
+++ b/tests/gem_dummy_reloc_loop.c
@@ -182,7 +182,7 @@ igt_main
igt_fixture {
int i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
num_rings = gem_get_num_rings(fd);
/* Not yet implemented on pre-snb. */
@@ -206,7 +206,7 @@ igt_main
for (i = 0; i < NUM_FD; i++) {
sprintf(buffer_name, "Target buffer %d\n", i);
- mfd[i] = drm_open_any();
+ mfd[i] = drm_open_any(OPEN_INTEL);
mbufmgr[i] = drm_intel_bufmgr_gem_init(mfd[i], 4096);
igt_assert_f(mbufmgr[i],
"fail to initialize buf manager "
diff --git a/tests/gem_evict_alignment.c b/tests/gem_evict_alignment.c
index 02cbb3a..3cbd959 100644
--- a/tests/gem_evict_alignment.c
+++ b/tests/gem_evict_alignment.c
@@ -196,7 +196,7 @@ igt_main
int size, count;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
}
igt_subtest("minor-normal") {
@@ -224,7 +224,7 @@ igt_main
major_evictions(fd, size, count);
}
- if (igt_fork_hang_helper()) {
+ if (igt_fork_hang_helper(OPEN_INTEL)) {
igt_subtest("minor-hang") {
size = 1024 * 1024;
count = 3*gem_aperture_size(fd) / size / 4;
diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c
index 15ab382..b5af1b5 100644
--- a/tests/gem_evict_everything.c
+++ b/tests/gem_evict_everything.c
@@ -187,7 +187,7 @@ igt_main
fd = -1;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
size = 1024 * 1024;
count = 3*gem_aperture_size(fd) / size / 4;
@@ -236,7 +236,7 @@ igt_main
test_major_evictions(fd, size, count);
}
- if (igt_fork_hang_helper()) {
+ if (igt_fork_hang_helper(OPEN_INTEL)) {
igt_subtest("swapping-hang")
test_swapping_evictions(fd, size, count);
diff --git a/tests/gem_exec_bad_domains.c b/tests/gem_exec_bad_domains.c
index 69e9189..905b571 100644
--- a/tests/gem_exec_bad_domains.c
+++ b/tests/gem_exec_bad_domains.c
@@ -156,7 +156,7 @@ drm_intel_bo *tmp;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_exec_big.c b/tests/gem_exec_big.c
index 15337e6..59ecd28 100644
--- a/tests/gem_exec_big.c
+++ b/tests/gem_exec_big.c
@@ -166,7 +166,7 @@ igt_simple_main
unsigned batch_size;
int max;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
max = 3 * gem_aperture_size(fd) / 4;
intel_require_memory(1, max, CHECK_RAM);
diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c
index b3c1ca6..5830526 100644
--- a/tests/gem_exec_blt.c
+++ b/tests/gem_exec_blt.c
@@ -196,7 +196,7 @@ static void run(int object_size, bool dumb)
int fd, len, count;
int ring;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
if (dumb)
handle = dumb_create(fd);
else
diff --git a/tests/gem_exec_faulting_reloc.c b/tests/gem_exec_faulting_reloc.c
index 8b780a6..54e118a 100644
--- a/tests/gem_exec_faulting_reloc.c
+++ b/tests/gem_exec_faulting_reloc.c
@@ -175,7 +175,7 @@ static void run(int object_size)
int fd, len;
int ring;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
handle = gem_create(fd, 4096);
src = gem_create(fd, object_size);
diff --git a/tests/gem_exec_lut_handle.c b/tests/gem_exec_lut_handle.c
index c2d490f..a5e02fd 100644
--- a/tests/gem_exec_lut_handle.c
+++ b/tests/gem_exec_lut_handle.c
@@ -130,7 +130,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
for (n = 0; n < MAX_NUM_EXEC; n++) {
gem_exec[n].handle = gem_create(fd, 4096);
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index e0709e9..7d5d5af 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -112,7 +112,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = gem_create(fd, 4096);
gem_write(fd, handle, 0, batch, sizeof(batch));
diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 54f0dc3..ddddbc4 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -58,7 +58,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
index fff166a..6927400 100644
--- a/tests/gem_exec_parse.c
+++ b/tests/gem_exec_parse.c
@@ -301,7 +301,7 @@ igt_main
drm_i915_getparam_t gp;
int rc;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gp.param = I915_PARAM_CMD_PARSER_VERSION;
gp.value = &parser_version;
diff --git a/tests/gem_fd_exhaustion.c b/tests/gem_fd_exhaustion.c
index 8ba631f..ef6d726 100644
--- a/tests/gem_fd_exhaustion.c
+++ b/tests/gem_fd_exhaustion.c
@@ -56,7 +56,7 @@ igt_simple_main
rlim.rlim_max = nofile_rlim;
igt_assert(setrlimit(RLIMIT_NOFILE, &rlim) == 0);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_assert(open("/dev/null", O_RDONLY) >= 0);
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index 6447e13..37f32b5 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -166,7 +166,7 @@ static int run_test(int threads_per_fence, void *f, int tiling,
pthread_t *threads;
int n, num_fences, num_threads;
- t.fd = drm_open_any();
+ t.fd = drm_open_any(OPEN_INTEL);
t.tiling = tiling;
t.num_surfaces = surfaces_per_thread;
diff --git a/tests/gem_fence_upload.c b/tests/gem_fence_upload.c
index 9595bc8..0469824 100644
--- a/tests/gem_fence_upload.c
+++ b/tests/gem_fence_upload.c
@@ -57,7 +57,7 @@ static void performance(void)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
num_fences = gem_available_fences(fd);
igt_require(num_fences > 0);
@@ -162,7 +162,7 @@ static void thread_performance(unsigned mask)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
num_fences = gem_available_fences(fd);
igt_require(num_fences > 0);
@@ -289,7 +289,7 @@ static void thread_contention(void)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
num_fences = gem_available_fences(fd);
igt_require(num_fences > 0);
@@ -344,7 +344,7 @@ static void wc_contention(void)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gem_require_mmap_wc(fd);
num_fences = gem_available_fences(fd);
diff --git a/tests/gem_fenced_exec_thrash.c b/tests/gem_fenced_exec_thrash.c
index 75f251c..d281f27 100644
--- a/tests/gem_fenced_exec_thrash.c
+++ b/tests/gem_fenced_exec_thrash.c
@@ -225,7 +225,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
num_fences = gem_available_fences(fd);
igt_assert(num_fences > 4);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_flink.c b/tests/gem_flink.c
index 91444e8..196b1dd 100644
--- a/tests/gem_flink.c
+++ b/tests/gem_flink.c
@@ -124,7 +124,7 @@ test_flink_lifetime(int fd)
igt_info("Testing flink lifetime.\n");
- fd2 = drm_open_any();
+ fd2 = drm_open_any(OPEN_INTEL);
memset(&create, 0, sizeof(create));
create.size = 16 * 1024;
@@ -141,7 +141,7 @@ test_flink_lifetime(int fd)
igt_assert(open_struct.handle != 0);
close(fd2);
- fd2 = drm_open_any();
+ fd2 = drm_open_any(OPEN_INTEL);
open_struct.name = flink.name;
ret = ioctl(fd2, DRM_IOCTL_GEM_OPEN, &open_struct);
@@ -154,7 +154,7 @@ int fd;
igt_main
{
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_subtest("basic")
test_flink(fd);
diff --git a/tests/gem_flink_race.c b/tests/gem_flink_race.c
index 6ef15f3..4abf857 100644
--- a/tests/gem_flink_race.c
+++ b/tests/gem_flink_race.c
@@ -102,7 +102,7 @@ static void test_flink_name(void)
threads = calloc(num_threads, sizeof(pthread_t));
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
for (i = 0; i < num_threads; i++) {
r = pthread_create(&threads[i], NULL,
@@ -163,7 +163,7 @@ static void test_flink_close(void)
/* Allocate exit handler fds in here so that we dont screw
* up the counts */
- fake = drm_open_any();
+ fake = drm_open_any(OPEN_INTEL);
obj_count = get_object_count();
@@ -171,7 +171,7 @@ static void test_flink_close(void)
threads = calloc(num_threads, sizeof(pthread_t));
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
for (i = 0; i < num_threads; i++) {
r = pthread_create(&threads[i], NULL,
diff --git a/tests/gem_gtt_cpu_tlb.c b/tests/gem_gtt_cpu_tlb.c
index a019061..fbe23c7 100644
--- a/tests/gem_gtt_cpu_tlb.c
+++ b/tests/gem_gtt_cpu_tlb.c
@@ -79,7 +79,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = gem_create(fd, OBJ_SIZE);
diff --git a/tests/gem_gtt_hog.c b/tests/gem_gtt_hog.c
index 39dfa48..6c414f2 100644
--- a/tests/gem_gtt_hog.c
+++ b/tests/gem_gtt_hog.c
@@ -159,12 +159,12 @@ igt_simple_main
data_t data = {};
/* check for an intel gpu before goint nuts. */
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
close(fd);
igt_skip_on_simulation();
- data.fd = drm_open_any();
+ data.fd = drm_open_any(OPEN_INTEL);
data.devid = intel_get_drm_devid(data.fd);
data.intel_gen = intel_gen(data.devid);
diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c
index d5e745e..182a823 100644
--- a/tests/gem_gtt_speed.c
+++ b/tests/gem_gtt_speed.c
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
buf = malloc(size);
memset(buf, 0, size);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = gem_create(fd, size);
igt_assert(handle);
diff --git a/tests/gem_hang.c b/tests/gem_hang.c
index 8767615..ea26c71 100644
--- a/tests/gem_hang.c
+++ b/tests/gem_hang.c
@@ -80,7 +80,7 @@ int main(int argc, char **argv)
bad_pipe = atoi(argv[1]);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_hangcheck_forcewake.c b/tests/gem_hangcheck_forcewake.c
index f274fab..9bc9e49 100644
--- a/tests/gem_hangcheck_forcewake.c
+++ b/tests/gem_hangcheck_forcewake.c
@@ -72,7 +72,7 @@ igt_simple_main
memset(blob, 'A', sizeof(blob));
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_largeobject.c b/tests/gem_largeobject.c
index 0f929f8..1d3b862 100644
--- a/tests/gem_largeobject.c
+++ b/tests/gem_largeobject.c
@@ -79,7 +79,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
test_large_object(fd);
}
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index 0be13eb..8212391 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -258,7 +258,7 @@ int main(int argc, char **argv)
igt_subtest_init(argc, argv);
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
}
igt_subtest("basic")
diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c
index 7fc72f1..051cd2b 100644
--- a/tests/gem_lut_handle.c
+++ b/tests/gem_lut_handle.c
@@ -181,7 +181,7 @@ igt_simple_main
uint32_t handle;
int fd, i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = gem_create(fd, 4096);
gem_write(fd, handle, 0, batch, sizeof(batch));
diff --git a/tests/gem_madvise.c b/tests/gem_madvise.c
index 58ab629..9415e11 100644
--- a/tests/gem_madvise.c
+++ b/tests/gem_madvise.c
@@ -39,8 +39,8 @@
#include "ioctl_wrappers.h"
#include "drmtest.h"
-IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use"
- " purged bo.");
+//IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use"
+// " purged bo.");
#define OBJECT_SIZE (1024*1024)
@@ -58,7 +58,7 @@ static void sigtrap(int sig)
static void
dontneed_before_mmap(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
uint32_t handle;
char *ptr;
@@ -73,7 +73,7 @@ dontneed_before_mmap(void)
static void
dontneed_after_mmap(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
uint32_t handle;
char *ptr;
@@ -100,7 +100,7 @@ dontneed_after_mmap(void)
static void
dontneed_before_pwrite(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
uint32_t buf[] = { MI_BATCH_BUFFER_END, 0 };
struct drm_i915_gem_pwrite gem_pwrite;
@@ -120,7 +120,7 @@ dontneed_before_pwrite(void)
static void
dontneed_before_exec(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_exec_object2 exec;
uint32_t buf[] = { MI_BATCH_BUFFER_END, 0 };
diff --git a/tests/gem_mmap.c b/tests/gem_mmap.c
index bbc5c4c..a57d009 100644
--- a/tests/gem_mmap.c
+++ b/tests/gem_mmap.c
@@ -51,7 +51,7 @@ igt_main
int ret;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_subtest("bad-object") {
memset(&arg, 0, sizeof(arg));
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c
index 55c66a2..b3ff42a 100644
--- a/tests/gem_mmap_gtt.c
+++ b/tests/gem_mmap_gtt.c
@@ -84,7 +84,7 @@ test_access(int fd)
handle = gem_create(fd, OBJECT_SIZE);
igt_assert(handle);
- fd2 = drm_open_any();
+ fd2 = drm_open_any(OPEN_INTEL);
/* Check that fd1 can mmap. */
mmap_arg.handle = handle;
@@ -363,7 +363,7 @@ igt_main
OBJECT_SIZE = 1 * 1024 * 1024;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_subtest("access")
test_access(fd);
diff --git a/tests/gem_mmap_offset_exhaustion.c b/tests/gem_mmap_offset_exhaustion.c
index b031050..35cb784 100644
--- a/tests/gem_mmap_offset_exhaustion.c
+++ b/tests/gem_mmap_offset_exhaustion.c
@@ -82,7 +82,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
/* we have 32bit of address space, so try to fit one MB more
* than that. */
diff --git a/tests/gem_mmap_wc.c b/tests/gem_mmap_wc.c
index 73a97d5..d441805 100644
--- a/tests/gem_mmap_wc.c
+++ b/tests/gem_mmap_wc.c
@@ -427,7 +427,7 @@ igt_main
OBJECT_SIZE = 1 * 1024 * 1024;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_subtest("invalid-flags")
test_invalid_flags(fd);
diff --git a/tests/gem_multi_bsd_sync_loop.c b/tests/gem_multi_bsd_sync_loop.c
index 0766eb6..03a4e7d 100644
--- a/tests/gem_multi_bsd_sync_loop.c
+++ b/tests/gem_multi_bsd_sync_loop.c
@@ -110,7 +110,7 @@ igt_simple_main
int devid;
int i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
gem_require_ring(fd, I915_EXEC_BLT);
@@ -131,7 +131,7 @@ igt_simple_main
for (i = 0; i < NUM_FD; i++) {
sprintf(buffer_name, "Target buffer %d\n", i);
- mfd[i] = drm_open_any();
+ mfd[i] = drm_open_any(OPEN_INTEL);
mbufmgr[i] = drm_intel_bufmgr_gem_init(mfd[i], 4096);
igt_assert_f(mbufmgr[i],
"fail to initialize buf manager for drm_fd %d\n",
diff --git a/tests/gem_non_secure_batch.c b/tests/gem_non_secure_batch.c
index d00ce45..133965e 100644
--- a/tests/gem_non_secure_batch.c
+++ b/tests/gem_non_secure_batch.c
@@ -82,7 +82,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
if (HAS_BSD_RING(devid))
diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c
index 0be749c..338ed29 100644
--- a/tests/gem_partial_pwrite_pread.c
+++ b/tests/gem_partial_pwrite_pread.c
@@ -262,7 +262,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
//drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_persistent_relocs.c b/tests/gem_persistent_relocs.c
index a6ae386..6bb5597 100644
--- a/tests/gem_persistent_relocs.c
+++ b/tests/gem_persistent_relocs.c
@@ -327,7 +327,7 @@ igt_main
memset(blob, 'A', sizeof(blob));
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
/* disable reuse, otherwise the test fails */
diff --git a/tests/gem_pin.c b/tests/gem_pin.c
index b35496e..994eca2 100644
--- a/tests/gem_pin.c
+++ b/tests/gem_pin.c
@@ -212,7 +212,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(test_can_pin(fd));
diff --git a/tests/gem_pipe_control_store_loop.c b/tests/gem_pipe_control_store_loop.c
index 86ee405..9a04626 100644
--- a/tests/gem_pipe_control_store_loop.c
+++ b/tests/gem_pipe_control_store_loop.c
@@ -164,7 +164,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c
index 5bf773c..bc6769d 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -89,7 +89,7 @@ static void fork_rcs_copy(int target, dri_bo **dst, int count, unsigned flags)
int devid;
for (int child = 0; child < count; child++) {
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
drm_intel_bufmgr *bufmgr;
devid = intel_get_drm_devid(fd);
@@ -153,7 +153,7 @@ static void fork_bcs_copy(int target, dri_bo **dst, int count)
for (int child = 0; child < count; child++) {
drm_intel_bufmgr *bufmgr;
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_pread.c b/tests/gem_pread.c
index cc83948..44b28bf 100644
--- a/tests/gem_pread.c
+++ b/tests/gem_pread.c
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
object_size = (object_size + 3) & -4;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
dst = gem_create(fd, object_size);
src = malloc(object_size);
diff --git a/tests/gem_pread_after_blit.c b/tests/gem_pread_after_blit.c
index 8ed4310..09ef2ff 100644
--- a/tests/gem_pread_after_blit.c
+++ b/tests/gem_pread_after_blit.c
@@ -216,7 +216,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c
index 6378b0a..b5e0c5b 100644
--- a/tests/gem_pwrite.c
+++ b/tests/gem_pwrite.c
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
object_size = (object_size + 3) & -4;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
dst = gem_create(fd, object_size);
src = malloc(object_size);
diff --git a/tests/gem_pwrite_pread.c b/tests/gem_pwrite_pread.c
index 88c2070..29662ed 100644
--- a/tests/gem_pwrite_pread.c
+++ b/tests/gem_pwrite_pread.c
@@ -275,7 +275,7 @@ int main(int argc, char **argv)
igt_fixture {
uint32_t devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
dst = gem_create(fd, object_size);
src = gem_create(fd, object_size);
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
index a8a7105..2595e71 100644
--- a/tests/gem_readwrite.c
+++ b/tests/gem_readwrite.c
@@ -85,7 +85,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = gem_create(fd, OBJECT_SIZE);
}
diff --git a/tests/gem_reg_read.c b/tests/gem_reg_read.c
index d3e68d9..967333e 100644
--- a/tests/gem_reg_read.c
+++ b/tests/gem_reg_read.c
@@ -55,7 +55,7 @@ igt_simple_main
struct local_drm_i915_reg_read reg_read;
int fd, ret;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
reg_read.offset = 0x2358;
ret = drmIoctl(fd, REG_READ_IOCTL, ®_read);
diff --git a/tests/gem_reloc_overflow.c b/tests/gem_reloc_overflow.c
index ea59171..2202298 100644
--- a/tests/gem_reloc_overflow.c
+++ b/tests/gem_reloc_overflow.c
@@ -329,7 +329,7 @@ igt_main
int ring;
uint32_t batch_data [2] = { MI_NOOP, MI_BATCH_BUFFER_END };
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c
index 47fbe75..b730cc2 100644
--- a/tests/gem_reloc_vs_gpu.c
+++ b/tests/gem_reloc_vs_gpu.c
@@ -279,7 +279,7 @@ static void do_forked_test(int fd, unsigned flags)
igt_fork(i, num_threads * 4) {
/* re-create process local data */
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
batch = intel_batchbuffer_alloc(bufmgr, devid);
@@ -307,7 +307,7 @@ igt_main
memset(blob, 'A', sizeof(blob));
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
/* disable reuse, otherwise the test fails */
//drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_render_copy_redux.c b/tests/gem_render_copy_redux.c
index 43d4c5a..452e7e9 100644
--- a/tests/gem_render_copy_redux.c
+++ b/tests/gem_render_copy_redux.c
@@ -75,7 +75,7 @@ typedef struct {
static void data_init(data_t *data)
{
- data->fd = drm_open_any();
+ data->fd = drm_open_any(OPEN_INTEL);
data->devid = intel_get_drm_devid(data->fd);
data->bufmgr = drm_intel_bufmgr_gem_init(data->fd, 4096);
diff --git a/tests/gem_render_linear_blits.c b/tests/gem_render_linear_blits.c
index f83c6d4..8302900 100644
--- a/tests/gem_render_linear_blits.c
+++ b/tests/gem_render_linear_blits.c
@@ -192,7 +192,7 @@ igt_main
int count=0;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
}
igt_subtest("basic") {
diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c
index f669270..5a605b3 100644
--- a/tests/gem_render_tiled_blits.c
+++ b/tests/gem_render_tiled_blits.c
@@ -205,7 +205,7 @@ igt_main
int count = 0;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
}
igt_subtest("basic") {
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index 0e9db10..aa14eaa 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -89,7 +89,7 @@ static const struct target_ring {
static void check_context(const struct target_ring *ring)
{
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
gem_context_destroy(fd,
gem_context_create(fd));
@@ -346,7 +346,7 @@ static void test_rs(int num_fds, int hang_index, int rs_assumed_no_hang)
igt_assert_lt(hang_index, MAX_FD);
for (i = 0; i < num_fds; i++) {
- fd[i] = drm_open_any();
+ fd[i] = drm_open_any(OPEN_INTEL);
igt_assert(fd[i]);
}
@@ -400,7 +400,7 @@ static void test_rs_ctx(int num_fds, int num_ctx, int hang_index,
test_rs(num_fds, -1, RS_NO_ERROR);
for (i = 0; i < num_fds; i++) {
- fd[i] = drm_open_any();
+ fd[i] = drm_open_any(OPEN_INTEL);
igt_assert(fd[i]);
assert_reset_status(fd[i], 0, RS_NO_ERROR);
@@ -474,9 +474,9 @@ static void test_ban(void)
int active_count = 0, pending_count = 0;
struct local_drm_i915_reset_stats rs_bad, rs_good;
- fd_bad = drm_open_any();
+ fd_bad = drm_open_any(OPEN_INTEL);
- fd_good = drm_open_any();
+ fd_good = drm_open_any(OPEN_INTEL);
assert_reset_status(fd_bad, 0, RS_NO_ERROR);
assert_reset_status(fd_good, 0, RS_NO_ERROR);
@@ -561,7 +561,7 @@ static void test_ban_ctx(void)
int active_count = 0, pending_count = 0;
struct local_drm_i915_reset_stats rs_bad, rs_good;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
assert_reset_status(fd, 0, RS_NO_ERROR);
@@ -652,8 +652,8 @@ static void test_unrelated_ctx(void)
int fd1,fd2;
int ctx_guilty, ctx_unrelated;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
+ fd2 = drm_open_any(OPEN_INTEL);
assert_reset_status(fd1, 0, RS_NO_ERROR);
assert_reset_status(fd2, 0, RS_NO_ERROR);
ctx_guilty = gem_context_create(fd1);
@@ -700,7 +700,7 @@ static void test_close_pending_ctx(void)
int fd, h;
uint32_t ctx;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
ctx = gem_context_create(fd);
assert_reset_status(fd, ctx, RS_NO_ERROR);
@@ -718,7 +718,7 @@ static void test_close_pending(void)
{
int fd, h;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
assert_reset_status(fd, 0, RS_NO_ERROR);
@@ -780,7 +780,7 @@ static void test_close_pending_fork(const bool reverse)
int pid;
int fd, h;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
assert_reset_status(fd, 0, RS_NO_ERROR);
@@ -795,7 +795,7 @@ static void test_close_pending_fork(const bool reverse)
*/
pid = fork();
if (pid == 0) {
- const int fd2 = drm_open_any();
+ const int fd2 = drm_open_any(OPEN_INTEL);
igt_assert_lte(0, fd2);
/* The crucial component is that we schedule the same noop batch
@@ -819,7 +819,7 @@ static void test_close_pending_fork(const bool reverse)
close(fd);
/* Then we just wait on hang to happen */
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
h = exec_valid(fd, 0);
igt_assert_lte(0, h);
@@ -834,7 +834,7 @@ static void test_reset_count(const bool create_ctx)
int fd, h, ctx;
long c1, c2;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
if (create_ctx)
ctx = gem_context_create(fd);
else
@@ -944,7 +944,7 @@ static void test_params_ctx(void)
{
int fd, ctx;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
ctx = gem_context_create(fd);
_test_param(fd, ctx);
@@ -956,7 +956,7 @@ static void test_params(void)
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
_test_param(fd, 0);
@@ -969,7 +969,7 @@ static void defer_hangcheck(int ring_num)
int fd, count_start, count_end;
int seconds = 30;
const struct target_ring *next_ring;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
do {
next_ring = &rings[(++ring_num) % NUM_RINGS];
@@ -1043,7 +1043,7 @@ static void check_gpu_ok(void)
igt_assert(flags == 0);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gem_quiescent_gpu(fd);
close(fd);
}
@@ -1059,7 +1059,7 @@ igt_main
int fd;
bool has_reset_stats;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
has_reset_stats = gem_has_reset_stats(fd);
@@ -1080,7 +1080,7 @@ igt_main
name = current_ring->name;
igt_fixture {
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
gem_require_ring(fd, current_ring->exec);
close(fd);
}
diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 4b88530..d4904e4 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -98,7 +98,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
gem_require_ring(fd, I915_EXEC_BLT);
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index 85b01ea..6a3e5e5 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -202,7 +202,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index 43da450..7d3f496 100644
--- a/tests/gem_seqno_wrap.c
+++ b/tests/gem_seqno_wrap.c
@@ -186,7 +186,7 @@ static void run_sync_test(int num_buffers, bool verify)
unsigned int *p_dst1, *p_dst2;
struct igt_buf *s_src, *s_dst;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gem_quiescent_gpu(fd);
diff --git a/tests/gem_set_tiling_vs_blt.c b/tests/gem_set_tiling_vs_blt.c
index 956308a..451f6d7 100644
--- a/tests/gem_set_tiling_vs_blt.c
+++ b/tests/gem_set_tiling_vs_blt.c
@@ -235,7 +235,7 @@ igt_main
for (i = 0; i < 1024*256; i++)
data[i] = i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_set_tiling_vs_gtt.c b/tests/gem_set_tiling_vs_gtt.c
index 006f50a..bf2b5ba 100644
--- a/tests/gem_set_tiling_vs_gtt.c
+++ b/tests/gem_set_tiling_vs_gtt.c
@@ -61,7 +61,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
if (IS_GEN2(intel_get_drm_devid(fd)))
tile_height = 16;
diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c
index a4bdc64..4f8d68a 100644
--- a/tests/gem_set_tiling_vs_pwrite.c
+++ b/tests/gem_set_tiling_vs_pwrite.c
@@ -58,7 +58,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
for (i = 0; i < OBJECT_SIZE/4; i++)
data[i] = i;
diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index dcc11a5..d6c3e07 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -137,7 +137,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
has_ppgtt = gem_uses_aliasing_ppgtt(fd);
diff --git a/tests/gem_storedw_loop_blt.c b/tests/gem_storedw_loop_blt.c
index 44e46a8..c8cff8d 100644
--- a/tests/gem_storedw_loop_blt.c
+++ b/tests/gem_storedw_loop_blt.c
@@ -117,7 +117,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
has_ppgtt = gem_uses_aliasing_ppgtt(fd);
diff --git a/tests/gem_storedw_loop_bsd.c b/tests/gem_storedw_loop_bsd.c
index e534c16..e309569 100644
--- a/tests/gem_storedw_loop_bsd.c
+++ b/tests/gem_storedw_loop_bsd.c
@@ -117,7 +117,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
has_ppgtt = gem_uses_aliasing_ppgtt(fd);
diff --git a/tests/gem_storedw_loop_render.c b/tests/gem_storedw_loop_render.c
index 48fb6d4..e6490fb 100644
--- a/tests/gem_storedw_loop_render.c
+++ b/tests/gem_storedw_loop_render.c
@@ -117,7 +117,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
has_ppgtt = gem_uses_aliasing_ppgtt(fd);
diff --git a/tests/gem_storedw_loop_vebox.c b/tests/gem_storedw_loop_vebox.c
index 8643dd3..9ecf366 100644
--- a/tests/gem_storedw_loop_vebox.c
+++ b/tests/gem_storedw_loop_vebox.c
@@ -101,7 +101,7 @@ igt_simple_main
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(gem_has_vebox(fd));
igt_require(gem_uses_aliasing_ppgtt(fd));
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index 804684f..2ac35ad 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -857,7 +857,7 @@ int main(int argc, char **argv)
igt_simple_init_parse_opts(&argc, argv,"ds:g:c:t:rbuxmo:fp:",
long_options, NULL, parse_options);
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(drm_fd);
/* start our little helper early before too may allocations occur */
diff --git a/tests/gem_threaded_access_tiled.c b/tests/gem_threaded_access_tiled.c
index 16a50ad..68cad56 100644
--- a/tests/gem_threaded_access_tiled.c
+++ b/tests/gem_threaded_access_tiled.c
@@ -98,7 +98,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_assert(fd >= 0);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_tiled_blits.c b/tests/gem_tiled_blits.c
index 3fceb81..e9f7e87 100644
--- a/tests/gem_tiled_blits.c
+++ b/tests/gem_tiled_blits.c
@@ -203,7 +203,7 @@ int main(int argc, char **argv)
igt_subtest_init(argc, argv);
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_tiled_fence_blits.c b/tests/gem_tiled_fence_blits.c
index c852207..bf0e204 100644
--- a/tests/gem_tiled_fence_blits.c
+++ b/tests/gem_tiled_fence_blits.c
@@ -111,7 +111,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
if (count > intel_get_total_ram_mb() * 9 / 10) {
count = intel_get_total_ram_mb() * 9 / 10;
diff --git a/tests/gem_tiled_partial_pwrite_pread.c b/tests/gem_tiled_partial_pwrite_pread.c
index 8dea82e..a5e3825 100644
--- a/tests/gem_tiled_partial_pwrite_pread.c
+++ b/tests/gem_tiled_partial_pwrite_pread.c
@@ -262,7 +262,7 @@ igt_main
srandom(0xdeadbeef);
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
//drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_tiled_pread.c b/tests/gem_tiled_pread.c
index fdc5173..8ddfd32 100644
--- a/tests/gem_tiled_pread.c
+++ b/tests/gem_tiled_pread.c
@@ -120,7 +120,7 @@ igt_simple_main
uint32_t handle;
uint32_t devid;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = create_bo(fd);
gem_get_tiling(fd, handle, &tiling, &swizzle);
diff --git a/tests/gem_tiled_pread_pwrite.c b/tests/gem_tiled_pread_pwrite.c
index 3d8fdc9..26efc20 100644
--- a/tests/gem_tiled_pread_pwrite.c
+++ b/tests/gem_tiled_pread_pwrite.c
@@ -110,7 +110,7 @@ igt_simple_main
uint32_t handle, handle_target;
int count;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
count = SLOW_QUICK(intel_get_total_ram_mb() * 9 / 10, 8) ;
for (i = 0; i < count/2; i++) {
diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
index 2361dfc..6666388 100644
--- a/tests/gem_tiled_swapping.c
+++ b/tests/gem_tiled_swapping.c
@@ -190,7 +190,7 @@ igt_main
intel_purge_vm_caches();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
check_memory_layout();
diff --git a/tests/gem_tiled_wb.c b/tests/gem_tiled_wb.c
index b6efd6e..fee4659 100644
--- a/tests/gem_tiled_wb.c
+++ b/tests/gem_tiled_wb.c
@@ -140,7 +140,7 @@ igt_simple_main
uint32_t tiling, swizzle;
uint32_t handle;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = create_bo(fd);
get_tiling(fd, handle, &tiling, &swizzle);
diff --git a/tests/gem_tiled_wc.c b/tests/gem_tiled_wc.c
index b0f7a65..bc5f0f7 100644
--- a/tests/gem_tiled_wc.c
+++ b/tests/gem_tiled_wc.c
@@ -135,7 +135,7 @@ igt_simple_main
uint32_t tiling, swizzle;
uint32_t handle;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
gem_require_mmap_wc(fd);
handle = create_bo(fd);
diff --git a/tests/gem_tiling_max_stride.c b/tests/gem_tiling_max_stride.c
index fce1ac7..8594d37 100644
--- a/tests/gem_tiling_max_stride.c
+++ b/tests/gem_tiling_max_stride.c
@@ -71,7 +71,7 @@ igt_simple_main
int tile_width = 512;
int tile_height = 8;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_unfence_active_buffers.c b/tests/gem_unfence_active_buffers.c
index 125568e..7eaba21 100644
--- a/tests/gem_unfence_active_buffers.c
+++ b/tests/gem_unfence_active_buffers.c
@@ -77,7 +77,7 @@ igt_simple_main
for (i = 0; i < 1024*256; i++)
data[i] = i;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_unref_active_buffers.c b/tests/gem_unref_active_buffers.c
index 8c8efaa..cf7dd2c 100644
--- a/tests/gem_unref_active_buffers.c
+++ b/tests/gem_unref_active_buffers.c
@@ -60,7 +60,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
igt_assert(bufmgr);
diff --git a/tests/gem_userptr_blits.c b/tests/gem_userptr_blits.c
index 961a5af..ca34173 100644
--- a/tests/gem_userptr_blits.c
+++ b/tests/gem_userptr_blits.c
@@ -779,7 +779,7 @@ static int test_dmabuf(void)
int dma_buf_fd = -1;
int ret;
- fd1 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
handle = create_userptr_bo(fd1, sizeof(linear));
memset(get_handle_ptr(handle), counter, sizeof(linear));
@@ -795,7 +795,7 @@ static int test_dmabuf(void)
igt_assert_lte(0, dma_buf_fd);
}
- fd2 = drm_open_any();
+ fd2 = drm_open_any(OPEN_INTEL);
handle_import = prime_fd_to_handle(fd2, dma_buf_fd);
check_bo(fd1, handle, 1, fd2, handle_import);
@@ -1315,7 +1315,7 @@ int main(int argc, char **argv)
igt_fixture {
int ret;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_assert(fd >= 0);
ret = has_userptr(fd);
diff --git a/tests/gem_wait.c b/tests/gem_wait.c
index 67317dd..3d79f8b 100644
--- a/tests/gem_wait.c
+++ b/tests/gem_wait.c
@@ -262,7 +262,7 @@ int drm_fd;
igt_main
{
igt_fixture
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
igt_subtest("render_timeout")
render_timeout(drm_fd);
diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
index f1da3ef..04d01ca 100644
--- a/tests/gem_workarounds.c
+++ b/tests/gem_workarounds.c
@@ -188,7 +188,7 @@ igt_main
char *line = NULL;
size_t line_size;
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
devid = intel_get_drm_devid(drm_fd);
diff --git a/tests/gem_write_read_ring_switch.c b/tests/gem_write_read_ring_switch.c
index da579da..eb87b70 100644
--- a/tests/gem_write_read_ring_switch.c
+++ b/tests/gem_write_read_ring_switch.c
@@ -156,7 +156,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
/* Test requires MI_FLUSH_DW and MI_COND_BATCH_BUFFER_END */
igt_require(intel_gen(intel_get_drm_devid(fd)) >= 6);
diff --git a/tests/gen3_mixed_blits.c b/tests/gen3_mixed_blits.c
index 6203982..7d00678 100644
--- a/tests/gen3_mixed_blits.c
+++ b/tests/gen3_mixed_blits.c
@@ -465,7 +465,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(IS_GEN3(intel_get_drm_devid(fd)));
diff --git a/tests/gen3_render_linear_blits.c b/tests/gen3_render_linear_blits.c
index 5ed4c82..1580c3f 100644
--- a/tests/gen3_render_linear_blits.c
+++ b/tests/gen3_render_linear_blits.c
@@ -333,7 +333,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(IS_GEN3(intel_get_drm_devid(fd)));
diff --git a/tests/gen3_render_mixed_blits.c b/tests/gen3_render_mixed_blits.c
index 5e5e417..59715ea 100644
--- a/tests/gen3_render_mixed_blits.c
+++ b/tests/gen3_render_mixed_blits.c
@@ -353,7 +353,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(IS_GEN3(intel_get_drm_devid(fd)));
diff --git a/tests/gen3_render_tiledx_blits.c b/tests/gen3_render_tiledx_blits.c
index 4f309f7..2a11b5a 100644
--- a/tests/gen3_render_tiledx_blits.c
+++ b/tests/gen3_render_tiledx_blits.c
@@ -340,7 +340,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(IS_GEN3(intel_get_drm_devid(fd)));
diff --git a/tests/gen3_render_tiledy_blits.c b/tests/gen3_render_tiledy_blits.c
index 57ed984..b161d1e 100644
--- a/tests/gen3_render_tiledy_blits.c
+++ b/tests/gen3_render_tiledy_blits.c
@@ -340,7 +340,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
igt_require(IS_GEN3(intel_get_drm_devid(fd)));
diff --git a/tests/gen7_forcewake_mt.c b/tests/gen7_forcewake_mt.c
index 8337847..18a7dbf 100644
--- a/tests/gen7_forcewake_mt.c
+++ b/tests/gen7_forcewake_mt.c
@@ -130,7 +130,7 @@ igt_simple_main
struct thread t[16];
int i;
- t[0].fd = drm_open_any();
+ t[0].fd = drm_open_any(OPEN_INTEL);
t[0].mmio = igfx_get_mmio();
for (i = 2; i < 16; i++) {
diff --git a/tests/kms_3d.c b/tests/kms_3d.c
index fdc05b1..c06db6c 100644
--- a/tests/kms_3d.c
+++ b/tests/kms_3d.c
@@ -37,7 +37,7 @@ igt_simple_main
size_t length;
int mode_count, connector_id;
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
res = drmModeGetResources(drm_fd);
igt_assert(drmSetClientCap(drm_fd, DRM_CLIENT_CAP_STEREO_3D, 1) >= 0);
diff --git a/tests/kms_addfb.c b/tests/kms_addfb.c
index 28afdf0..aa39a7b 100644
--- a/tests/kms_addfb.c
+++ b/tests/kms_addfb.c
@@ -355,7 +355,7 @@ int gen;
igt_main
{
igt_fixture {
- fd = drm_open_any_master();
+ fd = drm_open_any_master(OPEN_INTEL);
gen = intel_gen(intel_get_drm_devid(fd));
}
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index fca8248..024c8e3 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -522,7 +522,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index b6de218..4dfafab 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -503,7 +503,7 @@ igt_main
char buf[64];
FILE *status;
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_fence_pin_leak.c b/tests/kms_fence_pin_leak.c
index 4d3d37a..4f1bcdb 100644
--- a/tests/kms_fence_pin_leak.c
+++ b/tests/kms_fence_pin_leak.c
@@ -215,7 +215,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 25c9243..0b4f593 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1700,9 +1700,9 @@ int main(int argc, char **argv)
igt_skip_on_simulation();
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
- igt_enable_connectors();
+ igt_enable_connectors(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
igt_install_exit_handler(kms_flip_exit_handler);
diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index 4e9f58a..deb40f9 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -73,7 +73,7 @@ static bool test(data_t *data, enum pipe pipe, igt_output_t *output)
igt_plane_set_fb(primary, &fb[0]);
igt_display_commit2(&data->display, COMMIT_LEGACY);
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
ret = drmDropMaster(data->drm_fd);
igt_assert_eq(ret, 0);
@@ -114,7 +114,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
igt_display_init(&data.display, data.drm_fd);
diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
index 3181260..65706f4 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -133,7 +133,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
data.gen = intel_gen(intel_get_drm_devid(data.drm_fd));
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index 42aaa7f..17b5877 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -42,7 +42,7 @@ igt_main
int start_n_modes;
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
res = drmModeGetResources(drm_fd);
/* find the vga connector */
diff --git a/tests/kms_mmio_vs_cs_flip.c b/tests/kms_mmio_vs_cs_flip.c
index b24c7f4..1c088c2 100644
--- a/tests/kms_mmio_vs_cs_flip.c
+++ b/tests/kms_mmio_vs_cs_flip.c
@@ -517,7 +517,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index bbedd58..e97d05f 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -226,9 +226,9 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
- igt_enable_connectors();
+ igt_enable_connectors(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index ffd31e0..1ea7b3c 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -410,7 +410,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index ba6fb1d..4e4299d 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -511,7 +511,7 @@ int main(int argc, char *argv[])
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_pwrite_crc.c b/tests/kms_pwrite_crc.c
index a8e40ef..075a150 100644
--- a/tests/kms_pwrite_crc.c
+++ b/tests/kms_pwrite_crc.c
@@ -193,7 +193,7 @@ igt_simple_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_render.c b/tests/kms_render.c
index 1759eaa..3beae0a 100644
--- a/tests/kms_render.c
+++ b/tests/kms_render.c
@@ -237,7 +237,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
devid = intel_get_drm_devid(drm_fd);
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index a57692e..fbfa27e 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -229,7 +229,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.gfx_fd = drm_open_any_master();
+ data.gfx_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 5520dcc..2b5e9b7 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -710,7 +710,7 @@ int main(int argc, char **argv)
"only one of -d and -t is accepted\n");
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
if (!dry_run)
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
index d2cc7ed..ec64675 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -171,7 +171,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
igt_display_init(&data.display, data.drm_fd);
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 39dd0aa..bd45534 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -666,7 +666,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_any_master(OPEN_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c
index 50b3dd9..4582569 100644
--- a/tests/pm_lpsp.c
+++ b/tests/pm_lpsp.c
@@ -226,7 +226,7 @@ igt_main
igt_fixture {
int i;
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
igt_require(drm_fd >= 0);
devid = intel_get_drm_devid(drm_fd);
diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index a945b47..ea9989f 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -141,7 +141,7 @@ igt_main
/* Use drm_open_any to verify device existence */
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
close(fd);
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 91df93a..200da76 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -724,7 +724,7 @@ static void setup_non_graphics_runtime_pm(void)
static void setup_environment(void)
{
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_any_master(OPEN_INTEL);
init_mode_set_data(&ms_data);
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 6289e1b..e2c855b 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -570,7 +570,7 @@ static void blocking(void)
int pre_freqs[NUMFREQ];
int post_freqs[NUMFREQ];
- int fd = drm_open_any();
+ int fd = drm_open_any(OPEN_INTEL);
igt_assert_lte(0, fd);
/*
@@ -626,7 +626,7 @@ igt_main
int ret;
/* Use drm_open_any to verify device existence */
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
do {
int val = -1;
diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c
index 20eb115..64c1c03 100644
--- a/tests/prime_self_import.c
+++ b/tests/prime_self_import.c
@@ -90,8 +90,8 @@ static void test_with_fd_dup(void)
counter = 0;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
+ fd2 = drm_open_any(OPEN_INTEL);
handle = gem_create(fd1, BO_SIZE);
@@ -118,8 +118,8 @@ static void test_with_two_bos(void)
counter = 0;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
+ fd2 = drm_open_any(OPEN_INTEL);
handle1 = gem_create(fd1, BO_SIZE);
handle2 = gem_create(fd1, BO_SIZE);
@@ -149,8 +149,8 @@ static void test_with_one_bo_two_files(void)
uint32_t handle_import, handle_open, handle_orig, flink_name;
int dma_buf_fd1, dma_buf_fd2;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
+ fd2 = drm_open_any(OPEN_INTEL);
handle_orig = gem_create(fd1, BO_SIZE);
dma_buf_fd1 = prime_handle_to_fd(fd1, handle_orig);
@@ -176,8 +176,8 @@ static void test_with_one_bo(void)
uint32_t handle, handle_import1, handle_import2, handle_selfimport;
int dma_buf_fd;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_any(OPEN_INTEL);
+ fd2 = drm_open_any(OPEN_INTEL);
handle = gem_create(fd1, BO_SIZE);
@@ -260,7 +260,7 @@ static void test_reimport_close_race(void)
/* Allocate exit handler fds in here so that we dont screw
* up the counts */
- fake = drm_open_any();
+ fake = drm_open_any(OPEN_INTEL);
obj_count = get_object_count();
@@ -268,7 +268,7 @@ static void test_reimport_close_race(void)
threads = calloc(num_threads, sizeof(pthread_t));
- fds[0] = drm_open_any();
+ fds[0] = drm_open_any(OPEN_INTEL);
handle = gem_create(fds[0], BO_SIZE);
@@ -350,11 +350,11 @@ static void test_export_close_race(void)
/* Allocate exit handler fds in here so that we dont screw
* up the counts */
- fake = drm_open_any();
+ fake = drm_open_any(OPEN_INTEL);
obj_count = get_object_count();
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
for (i = 0; i < num_threads; i++) {
r = pthread_create(&threads[i], NULL,
@@ -391,7 +391,7 @@ static void test_llseek_size(void)
counter = 0;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
for (i = 0; i < 10; i++) {
@@ -418,7 +418,7 @@ static void test_llseek_bad(void)
counter = 0;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
handle = gem_create(fd, BO_SIZE);
diff --git a/tests/template.c b/tests/template.c
index 24fd850..a96a21e 100644
--- a/tests/template.c
+++ b/tests/template.c
@@ -59,7 +59,7 @@ int drm_fd;
igt_main
{
igt_fixture {
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
igt_require(drm_fd >= 0);
/* Set up other interesting stuff shared by all tests. */
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index f864940..fdb2f04 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -744,7 +744,7 @@ int main(int argc, char **argv)
specified_mode_num == -1 && !test_stereo_modes)
test_all_modes = 1;
- drm_fd = drm_open_any();
+ drm_fd = drm_open_any(OPEN_INTEL);
if (test_stereo_modes &&
drmSetClientCap(drm_fd, DRM_CLIENT_CAP_STEREO_3D, 1) < 0) {
diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
index 2eab6c4..6cebb09 100644
--- a/tools/intel_display_poller.c
+++ b/tools/intel_display_poller.c
@@ -1210,7 +1210,7 @@ int main(int argc, char *argv[])
}
}
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
close(fd);
diff --git a/tools/intel_gpu_frequency.c b/tools/intel_gpu_frequency.c
index c5359c0..0a3e5d9 100644
--- a/tools/intel_gpu_frequency.c
+++ b/tools/intel_gpu_frequency.c
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
bool write, fail, targets[MAX+1] = {false};
int i, try = 1, set_freq[MAX+1] = {0};
- devid = intel_get_drm_devid(drm_open_any());
+ devid = intel_get_drm_devid(drm_open_any(OPEN_INTEL));
device = drm_get_card();
write = parse(argc, argv, targets, ARRAY_SIZE(targets), set_freq);
diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c
index a4b7d73..ca72221 100644
--- a/tools/intel_l3_parity.c
+++ b/tools/intel_l3_parity.c
@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
int row = 0, bank = 0, sbank = 0;
int fd[REAL_MAX_SLICES] = {0}, ret, i;
int action = '0';
- int drm_fd = drm_open_any();
+ int drm_fd = drm_open_any(OPEN_INTEL);
int daemonize = 0;
devid = intel_get_drm_devid(drm_fd);
diff --git a/tools/intel_perf_counters.c b/tools/intel_perf_counters.c
index 739f926..c8bda2d 100644
--- a/tools/intel_perf_counters.c
+++ b/tools/intel_perf_counters.c
@@ -454,7 +454,7 @@ main(int argc, char **argv)
int fd;
int l;
- fd = drm_open_any();
+ fd = drm_open_any(OPEN_INTEL);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
--
2.4.1
More information about the Intel-gfx
mailing list