summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Fedke <micah.fedke@collabora.co.uk>2015-07-22 21:54:02 +0000
committerThomas Wood <thomas.wood@intel.com>2015-09-11 14:39:43 +0100
commitc81d293aed94fea9c48899187016a1b28f8989d5 (patch)
tree7d7fd67c9f8eb843b799111e8cf0776829cd585e
parente2241805a43e2cbd5287010e90005542845b48cd (diff)
convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
-rw-r--r--benchmarks/gem_create.c2
-rw-r--r--benchmarks/gem_exec_ctx.c2
-rw-r--r--benchmarks/gem_exec_nop.c2
-rw-r--r--benchmarks/gem_exec_reloc.c2
-rw-r--r--benchmarks/gem_exec_trace.c2
-rw-r--r--benchmarks/gem_mmap.c2
-rw-r--r--benchmarks/gem_prw.c2
-rw-r--r--benchmarks/gem_userptr_benchmark.c2
-rw-r--r--benchmarks/intel_upload_blit_large.c2
-rw-r--r--benchmarks/intel_upload_blit_large_gtt.c2
-rw-r--r--benchmarks/intel_upload_blit_large_map.c2
-rw-r--r--benchmarks/intel_upload_blit_small.c2
-rw-r--r--benchmarks/kms_vblank.c2
-rw-r--r--debugger/eudb.c2
-rw-r--r--lib/igt_gt.c2
-rw-r--r--lib/igt_kms.c2
-rw-r--r--tests/core_get_client_auth.c6
-rw-r--r--tests/core_getclient.c2
-rw-r--r--tests/core_getstats.c2
-rw-r--r--tests/core_getversion.c2
-rw-r--r--tests/drm_auth.c4
-rw-r--r--tests/drm_import_export.c4
-rw-r--r--tests/drm_read.c2
-rw-r--r--tests/drm_vma_limiter.c2
-rw-r--r--tests/drm_vma_limiter_cached.c2
-rw-r--r--tests/drm_vma_limiter_cpu.c2
-rw-r--r--tests/drm_vma_limiter_gtt.c2
-rw-r--r--tests/drv_getparams_basic.c2
-rw-r--r--tests/drv_hangman.c4
-rw-r--r--tests/drv_suspend.c2
-rw-r--r--tests/eviction_common.c2
-rw-r--r--tests/gem_alive.c2
-rw-r--r--tests/gem_bad_address.c2
-rw-r--r--tests/gem_bad_batch.c2
-rw-r--r--tests/gem_bad_blit.c2
-rw-r--r--tests/gem_bad_length.c2
-rw-r--r--tests/gem_bad_reloc.c2
-rw-r--r--tests/gem_basic.c2
-rw-r--r--tests/gem_caching.c2
-rw-r--r--tests/gem_concurrent_all.c4
-rw-r--r--tests/gem_cpu_reloc.c2
-rw-r--r--tests/gem_cs_prefetch.c2
-rw-r--r--tests/gem_cs_tlb.c2
-rw-r--r--tests/gem_ctx_bad_destroy.c2
-rw-r--r--tests/gem_ctx_bad_exec.c2
-rw-r--r--tests/gem_ctx_basic.c4
-rw-r--r--tests/gem_ctx_create.c2
-rw-r--r--tests/gem_ctx_exec.c2
-rw-r--r--tests/gem_ctx_param_basic.c2
-rw-r--r--tests/gem_ctx_thrash.c4
-rw-r--r--tests/gem_double_irq_loop.c2
-rw-r--r--tests/gem_dummy_reloc_loop.c4
-rw-r--r--tests/gem_eio.c2
-rw-r--r--tests/gem_evict_alignment.c2
-rw-r--r--tests/gem_evict_everything.c2
-rw-r--r--tests/gem_exec_alignment.c2
-rw-r--r--tests/gem_exec_bad_domains.c2
-rw-r--r--tests/gem_exec_big.c2
-rw-r--r--tests/gem_exec_blt.c2
-rw-r--r--tests/gem_exec_faulting_reloc.c2
-rw-r--r--tests/gem_exec_lut_handle.c2
-rw-r--r--tests/gem_exec_nop.c2
-rw-r--r--tests/gem_exec_params.c2
-rw-r--r--tests/gem_exec_parse.c2
-rw-r--r--tests/gem_fd_exhaustion.c2
-rw-r--r--tests/gem_fence_thrash.c2
-rw-r--r--tests/gem_fence_upload.c8
-rw-r--r--tests/gem_fenced_exec_thrash.c2
-rw-r--r--tests/gem_flink_basic.c6
-rw-r--r--tests/gem_flink_race.c6
-rw-r--r--tests/gem_gpgpu_fill.c2
-rw-r--r--tests/gem_gtt_cpu_tlb.c2
-rw-r--r--tests/gem_gtt_hog.c4
-rw-r--r--tests/gem_gtt_speed.c2
-rw-r--r--tests/gem_hang.c2
-rw-r--r--tests/gem_hangcheck_forcewake.c2
-rw-r--r--tests/gem_largeobject.c2
-rw-r--r--tests/gem_linear_blits.c2
-rw-r--r--tests/gem_lut_handle.c2
-rw-r--r--tests/gem_madvise.c8
-rw-r--r--tests/gem_media_fill.c2
-rw-r--r--tests/gem_mmap.c2
-rw-r--r--tests/gem_mmap_gtt.c4
-rw-r--r--tests/gem_mmap_offset_exhaustion.c2
-rw-r--r--tests/gem_mmap_wc.c2
-rw-r--r--tests/gem_multi_bsd_sync_loop.c4
-rw-r--r--tests/gem_non_secure_batch.c2
-rw-r--r--tests/gem_partial_pwrite_pread.c2
-rw-r--r--tests/gem_persistent_relocs.c2
-rw-r--r--tests/gem_pin.c2
-rw-r--r--tests/gem_pipe_control_store_loop.c2
-rw-r--r--tests/gem_ppgtt.c8
-rw-r--r--tests/gem_pread.c2
-rw-r--r--tests/gem_pread_after_blit.c2
-rw-r--r--tests/gem_pwrite.c2
-rw-r--r--tests/gem_pwrite_pread.c2
-rw-r--r--tests/gem_pwrite_snooped.c2
-rw-r--r--tests/gem_read_read_speed.c2
-rw-r--r--tests/gem_readwrite.c2
-rw-r--r--tests/gem_reg_read.c2
-rw-r--r--tests/gem_reloc_overflow.c2
-rw-r--r--tests/gem_reloc_vs_gpu.c4
-rw-r--r--tests/gem_render_copy.c2
-rw-r--r--tests/gem_render_copy_redux.c2
-rw-r--r--tests/gem_render_linear_blits.c2
-rw-r--r--tests/gem_render_tiled_blits.c2
-rw-r--r--tests/gem_reset_stats.c40
-rw-r--r--tests/gem_ring_sync_copy.c2
-rw-r--r--tests/gem_ring_sync_loop.c2
-rw-r--r--tests/gem_ringfill.c2
-rw-r--r--tests/gem_seqno_wrap.c2
-rw-r--r--tests/gem_set_tiling_vs_blt.c2
-rw-r--r--tests/gem_set_tiling_vs_gtt.c2
-rw-r--r--tests/gem_set_tiling_vs_pwrite.c2
-rw-r--r--tests/gem_storedw_batches_loop.c2
-rw-r--r--tests/gem_storedw_loop.c2
-rw-r--r--tests/gem_streaming_writes.c2
-rw-r--r--tests/gem_stress.c2
-rw-r--r--tests/gem_threaded_access_tiled.c2
-rw-r--r--tests/gem_tiled_blits.c2
-rw-r--r--tests/gem_tiled_fence_blits.c2
-rw-r--r--tests/gem_tiled_partial_pwrite_pread.c2
-rw-r--r--tests/gem_tiled_pread_basic.c2
-rw-r--r--tests/gem_tiled_pread_pwrite.c2
-rw-r--r--tests/gem_tiled_swapping.c2
-rw-r--r--tests/gem_tiled_wb.c2
-rw-r--r--tests/gem_tiled_wc.c2
-rw-r--r--tests/gem_tiling_max_stride.c2
-rw-r--r--tests/gem_unfence_active_buffers.c2
-rw-r--r--tests/gem_unref_active_buffers.c2
-rw-r--r--tests/gem_userptr_blits.c6
-rw-r--r--tests/gem_wait.c2
-rw-r--r--tests/gem_workarounds.c2
-rw-r--r--tests/gem_write_read_ring_switch.c2
-rw-r--r--tests/gen3_mixed_blits.c2
-rw-r--r--tests/gen3_render_linear_blits.c2
-rw-r--r--tests/gen3_render_mixed_blits.c2
-rw-r--r--tests/gen3_render_tiledx_blits.c2
-rw-r--r--tests/gen3_render_tiledy_blits.c2
-rw-r--r--tests/gen7_forcewake_mt.c2
-rw-r--r--tests/kms_3d.c2
-rw-r--r--tests/kms_addfb_basic.c2
-rw-r--r--tests/kms_crtc_background_color.c2
-rw-r--r--tests/kms_cursor_crc.c2
-rw-r--r--tests/kms_draw_crc.c2
-rw-r--r--tests/kms_fbc_crc.c2
-rw-r--r--tests/kms_fbcon_fbt.c4
-rw-r--r--tests/kms_fence_pin_leak.c2
-rw-r--r--tests/kms_flip.c2
-rw-r--r--tests/kms_flip_event_leak.c4
-rw-r--r--tests/kms_flip_tiling.c2
-rw-r--r--tests/kms_force_connector.c2
-rw-r--r--tests/kms_frontbuffer_tracking.c2
-rw-r--r--tests/kms_legacy_colorkey.c2
-rw-r--r--tests/kms_mmio_vs_cs_flip.c2
-rw-r--r--tests/kms_panel_fitting.c2
-rw-r--r--tests/kms_pipe_b_c_ivb.c2
-rw-r--r--tests/kms_pipe_crc_basic.c2
-rw-r--r--tests/kms_plane.c2
-rw-r--r--tests/kms_plane_scaling.c2
-rw-r--r--tests/kms_psr_sink_crc.c2
-rw-r--r--tests/kms_pwrite_crc.c2
-rw-r--r--tests/kms_render.c2
-rw-r--r--tests/kms_rotation_crc.c2
-rw-r--r--tests/kms_setmode.c2
-rw-r--r--tests/kms_sink_crc_basic.c2
-rw-r--r--tests/kms_universal_plane.c2
-rw-r--r--tests/kms_vblank.c2
-rw-r--r--tests/pm_lpsp.c2
-rw-r--r--tests/pm_rc6_residency.c4
-rw-r--r--tests/pm_rpm.c2
-rw-r--r--tests/pm_rps.c6
-rw-r--r--tests/pm_sseu.c2
-rw-r--r--tests/prime_self_import.c28
-rw-r--r--tests/template.c2
-rw-r--r--tests/testdisplay.c2
-rw-r--r--tools/intel_display_poller.c2
-rw-r--r--tools/intel_gpu_frequency.c2
-rw-r--r--tools/intel_l3_parity.c2
-rw-r--r--tools/intel_perf_counters.c2
180 files changed, 245 insertions, 245 deletions
diff --git a/benchmarks/gem_create.c b/benchmarks/gem_create.c
index 21e8d86e..9ead30cf 100644
--- a/benchmarks/gem_create.c
+++ b/benchmarks/gem_create.c
@@ -88,7 +88,7 @@ static void make_busy(int fd, uint32_t handle)
int main(int argc, char **argv)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
int size = 0;
int busy = 0;
int reps = 13;
diff --git a/benchmarks/gem_exec_ctx.c b/benchmarks/gem_exec_ctx.c
index dbf7c3af..2da653aa 100644
--- a/benchmarks/gem_exec_ctx.c
+++ b/benchmarks/gem_exec_ctx.c
@@ -89,7 +89,7 @@ static int loop(unsigned ring, int reps, enum mode mode)
int count, fd;
uint32_t ctx;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
memset(&gem_exec, 0, sizeof(gem_exec));
gem_exec.handle = batch(fd);
diff --git a/benchmarks/gem_exec_nop.c b/benchmarks/gem_exec_nop.c
index 2a3abd27..c22e1dac 100644
--- a/benchmarks/gem_exec_nop.c
+++ b/benchmarks/gem_exec_nop.c
@@ -76,7 +76,7 @@ static int loop(unsigned ring, int reps)
struct drm_i915_gem_exec_object2 gem_exec;
int count, fd;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
memset(&gem_exec, 0, sizeof(gem_exec));
gem_exec.handle = batch(fd);
diff --git a/benchmarks/gem_exec_reloc.c b/benchmarks/gem_exec_reloc.c
index 42007d09..274ce41a 100644
--- a/benchmarks/gem_exec_reloc.c
+++ b/benchmarks/gem_exec_reloc.c
@@ -84,7 +84,7 @@ static int run(unsigned batch_size,
mem_reloc = calloc(sizeof(*mem_reloc), num_relocs);
target = calloc(sizeof(*target), num_relocs);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
for (n = 0; n < num_objects; n++)
gem_exec[n].handle = gem_create(fd, 4096);
diff --git a/benchmarks/gem_exec_trace.c b/benchmarks/gem_exec_trace.c
index 64b2615e..b487d76b 100644
--- a/benchmarks/gem_exec_trace.c
+++ b/benchmarks/gem_exec_trace.c
@@ -118,7 +118,7 @@ static void replay(const char *filename)
madvise(ptr, st.st_size, MADV_SEQUENTIAL);
end = ptr + st.st_size;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
clock_gettime(CLOCK_MONOTONIC, &t_start);
do {
diff --git a/benchmarks/gem_mmap.c b/benchmarks/gem_mmap.c
index da712749..bc26d310 100644
--- a/benchmarks/gem_mmap.c
+++ b/benchmarks/gem_mmap.c
@@ -54,7 +54,7 @@ static uint64_t elapsed(const struct timespec *start,
int main(int argc, char **argv)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
enum map {CPU, GTT, WC} map = CPU;
enum dir {READ, WRITE, CLEAR, FAULT} dir = READ;
int tiling = I915_TILING_NONE;
diff --git a/benchmarks/gem_prw.c b/benchmarks/gem_prw.c
index cf9218e4..c2846040 100644
--- a/benchmarks/gem_prw.c
+++ b/benchmarks/gem_prw.c
@@ -54,7 +54,7 @@ static uint64_t elapsed(const struct timespec *start,
int main(int argc, char **argv)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
int domain = I915_GEM_DOMAIN_GTT;
enum dir { READ, WRITE } dir = READ;
void *buf = malloc(OBJECT_SIZE);
diff --git a/benchmarks/gem_userptr_benchmark.c b/benchmarks/gem_userptr_benchmark.c
index b804fdd5..1eae7ffd 100644
--- a/benchmarks/gem_userptr_benchmark.c
+++ b/benchmarks/gem_userptr_benchmark.c
@@ -515,7 +515,7 @@ int main(int argc, char **argv)
igt_subtest_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 689f9c41..1984bfde 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_driver(DRIVER_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 601496dd..d62a01ea 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_driver(DRIVER_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 d9167376..03bf760f 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_driver(DRIVER_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 b9640a4f..ac557a4e 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_driver(DRIVER_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/benchmarks/kms_vblank.c b/benchmarks/kms_vblank.c
index 3d2f9772..838afa0d 100644
--- a/benchmarks/kms_vblank.c
+++ b/benchmarks/kms_vblank.c
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
}
}
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
if (!crtc0_active(fd)) {
fprintf(stderr, "CRTC/pipe 0 not active\n");
return 77;
diff --git a/debugger/eudb.c b/debugger/eudb.c
index 275a27ef..e015e2e3 100644
--- a/debugger/eudb.c
+++ b/debugger/eudb.c
@@ -551,7 +551,7 @@ int main(int argc, char* argv[]) {
*/
if (!clear_waits) {
int dh_handle;
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
setup_hw_bits();
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index c181e433..69cf3654 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -200,7 +200,7 @@ int igt_fork_hang_helper(void)
if (igt_only_list_subtests())
return 1;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
if (fd == -1)
return 0;
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 0d45f452..51d735d2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1957,7 +1957,7 @@ void igt_enable_connectors(void)
drmModeConnector *c;
int drm_fd;
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_INTEL);
res = drmModeGetResources(drm_fd);
diff --git a/tests/core_get_client_auth.c b/tests/core_get_client_auth.c
index 7301ca0c..85479c8c 100644
--- a/tests/core_get_client_auth.c
+++ b/tests/core_get_client_auth.c
@@ -83,7 +83,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_driver(DRIVER_INTEL);
igt_assert(check_auth(fd) == true);
@@ -91,8 +91,8 @@ igt_main
}
igt_subtest("master-drop") {
- int fd = drm_open_any();
- int fd2 = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
+ int fd2 = drm_open_driver(DRIVER_INTEL);
igt_assert(check_auth(fd2) == true);
diff --git a/tests/core_getclient.c b/tests/core_getclient.c
index aae00ea2..811a7738 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_driver(DRIVER_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 3db6b09d..aebbc454 100644
--- a/tests/core_getstats.c
+++ b/tests/core_getstats.c
@@ -47,7 +47,7 @@ igt_simple_main
int fd, ret;
drm_stats_t stats;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 1c0f824a..530d725a 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_driver(DRIVER_INTEL);
v = drmGetVersion(fd);
igt_assert(strlen(v->name) != 0);
igt_assert(strlen(v->date) != 0);
diff --git a/tests/drm_auth.c b/tests/drm_auth.c
index e936666b..d262469d 100644
--- a/tests/drm_auth.c
+++ b/tests/drm_auth.c
@@ -120,7 +120,7 @@ static void test_basic_auth(int master)
int slave;
/* open slave and make sure it's NOT a master */
- slave = drm_open_any();
+ slave = drm_open_driver(DRIVER_INTEL);
igt_require(slave >= 0);
igt_require(drmSetMaster(slave) < 0);
@@ -151,7 +151,7 @@ igt_main
int master;
igt_fixture
- master = drm_open_any_master();
+ master = drm_open_driver_master(DRIVER_INTEL);
igt_subtest("basic-auth")
test_basic_auth(master);
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index 41c47467..29c228f6 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -239,14 +239,14 @@ pthread_t test_thread_id4;
igt_main {
igt_fixture {
- fd1 = drm_open_any();
+ fd1 = drm_open_driver(DRIVER_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_driver(DRIVER_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 b808bed6..8587aeeb 100644
--- a/tests/drm_read.c
+++ b/tests/drm_read.c
@@ -200,7 +200,7 @@ igt_main
siginterrupt(SIGALRM, 1);
igt_fixture {
- fd = drm_open_any_master();
+ fd = drm_open_driver_master(DRIVER_INTEL);
igt_require(pipe0_enabled(fd));
}
diff --git a/tests/drm_vma_limiter.c b/tests/drm_vma_limiter.c
index ce3d3642..fc853f31 100644
--- a/tests/drm_vma_limiter.c
+++ b/tests/drm_vma_limiter.c
@@ -60,7 +60,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 d4608726..a47c7970 100644
--- a/tests/drm_vma_limiter_cached.c
+++ b/tests/drm_vma_limiter_cached.c
@@ -59,7 +59,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 f2a78437..5ea7491d 100644
--- a/tests/drm_vma_limiter_cpu.c
+++ b/tests/drm_vma_limiter_cpu.c
@@ -59,7 +59,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 d7e86194..52028230 100644
--- a/tests/drm_vma_limiter_gtt.c
+++ b/tests/drm_vma_limiter_gtt.c
@@ -60,7 +60,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/drv_getparams_basic.c b/tests/drv_getparams_basic.c
index 39120dde..7cb210df 100644
--- a/tests/drv_getparams_basic.c
+++ b/tests/drv_getparams_basic.c
@@ -40,7 +40,7 @@ int devid;
static void
init(void)
{
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(drm_fd);
}
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index 4f4e76c5..6caf910b 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -220,7 +220,7 @@ static void test_error_state_basic(void)
clear_error_state();
assert_error_state_clear();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
submit_batch(fd, I915_EXEC_RENDER, true);
close(fd);
@@ -375,7 +375,7 @@ static void test_error_state_capture(unsigned ring_id,
clear_error_state();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 795fed14..c8af46bf 100644
--- a/tests/drv_suspend.c
+++ b/tests/drv_suspend.c
@@ -179,7 +179,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 5b36fb86..6c1f17d3 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -272,7 +272,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_driver(DRIVER_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 c94e3dce..75444438 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_driver(DRIVER_INTEL);
if (fd < 0)
return IGT_EXIT_SKIP;
diff --git a/tests/gem_bad_address.c b/tests/gem_bad_address.c
index b777fa9b..a970dfa4 100644
--- a/tests/gem_bad_address.c
+++ b/tests/gem_bad_address.c
@@ -60,7 +60,7 @@ igt_simple_main
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 d93ccad2..a11e1918 100644
--- a/tests/gem_bad_batch.c
+++ b/tests/gem_bad_batch.c
@@ -56,7 +56,7 @@ igt_simple_main
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 b9521558..47e6e90d 100644
--- a/tests/gem_bad_blit.c
+++ b/tests/gem_bad_blit.c
@@ -96,7 +96,7 @@ igt_simple_main
drm_intel_bo *src;
int fd;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 c85b349f..cca0145e 100644
--- a/tests/gem_bad_length.c
+++ b/tests/gem_bad_length.c
@@ -123,7 +123,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
create0(fd);
diff --git a/tests/gem_bad_reloc.c b/tests/gem_bad_reloc.c
index d2e0b70c..9c285edd 100644
--- a/tests/gem_bad_reloc.c
+++ b/tests/gem_bad_reloc.c
@@ -231,7 +231,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("negative-reloc")
diff --git a/tests/gem_basic.c b/tests/gem_basic.c
index 553088d3..9f7412f2 100644
--- a/tests/gem_basic.c
+++ b/tests/gem_basic.c
@@ -79,7 +79,7 @@ int fd;
igt_main
{
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_subtest("bad-close")
test_bad_close(fd);
diff --git a/tests/gem_caching.c b/tests/gem_caching.c
index 2f1efece..2ef364d5 100644
--- a/tests/gem_caching.c
+++ b/tests/gem_caching.c
@@ -114,7 +114,7 @@ igt_main
igt_fixture {
srandom(0xdeadbeef);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
gem_require_caching(fd);
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c
index dc0761ea..167f383f 100644
--- a/tests/gem_concurrent_all.c
+++ b/tests/gem_concurrent_all.c
@@ -823,7 +823,7 @@ static void run_forked(struct buffers *buffers,
igt_fork(child, 16) {
/* recreate process local variables */
buffers->count = 0;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
batch = buffers_init(buffers, buffers->mode, fd);
@@ -1072,7 +1072,7 @@ igt_main
all = true;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 9dcd5080..520030a4 100644
--- a/tests/gem_cpu_reloc.c
+++ b/tests/gem_cpu_reloc.c
@@ -246,7 +246,7 @@ igt_main
int fd, count;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("basic") {
diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index ea7882a3..a9918de9 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -82,7 +82,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 e436dd40..8b640faa 100644
--- a/tests/gem_cs_tlb.c
+++ b/tests/gem_cs_tlb.c
@@ -154,7 +154,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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_ctx_bad_destroy.c b/tests/gem_ctx_bad_destroy.c
index c1f6bd85..fd6d988b 100644
--- a/tests/gem_ctx_bad_destroy.c
+++ b/tests/gem_ctx_bad_destroy.c
@@ -43,7 +43,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
ctx_id = gem_context_create(fd);
/* Make sure a proper destroy works first */
diff --git a/tests/gem_ctx_bad_exec.c b/tests/gem_ctx_bad_exec.c
index 2dd601da..5b3577fc 100644
--- a/tests/gem_ctx_bad_exec.c
+++ b/tests/gem_ctx_bad_exec.c
@@ -92,7 +92,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
ctx_id = gem_context_create(fd);
diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c
index 967a3a7a..c18a9efa 100644
--- a/tests/gem_ctx_basic.c
+++ b/tests/gem_ctx_basic.c
@@ -77,7 +77,7 @@ static void *work(void *arg)
int i;
if (multiple_fds)
- td_fd = fd = drm_open_any_render();
+ td_fd = fd = drm_open_driver_render(DRIVER_INTEL);
else
td_fd = fd;
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
igt_simple_init_parse_opts(&argc, argv, "i:c:n:mu", NULL, NULL,
opt_handler, NULL);
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
if (igt_run_in_simulation()) {
diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c
index 4b60450c..1ea61f19 100644
--- a/tests/gem_ctx_create.c
+++ b/tests/gem_ctx_create.c
@@ -37,7 +37,7 @@ struct drm_i915_gem_context_create create;
igt_main
{
igt_fixture
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
igt_subtest("basic") {
create.ctx_id = rand();
diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index 5171d1fc..f2b7cb6e 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -160,7 +160,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
handle = gem_create(fd, 4096);
diff --git a/tests/gem_ctx_param_basic.c b/tests/gem_ctx_param_basic.c
index ac5f0385..6a1694d3 100644
--- a/tests/gem_ctx_param_basic.c
+++ b/tests/gem_ctx_param_basic.c
@@ -51,7 +51,7 @@ igt_main
memset(&ctx_param, 0, sizeof(ctx_param));
igt_fixture {
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
ctx = gem_context_create(fd);
}
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c
index 8e742edc..acfa8f51 100644
--- a/tests/gem_ctx_thrash.c
+++ b/tests/gem_ctx_thrash.c
@@ -146,7 +146,7 @@ processes(void)
igt_skip_on_simulation();
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
aperture = gem_aperture_size(fd);
@@ -248,7 +248,7 @@ threads(void)
igt_skip_on_simulation();
- fd = drm_open_any_render();
+ fd = drm_open_driver_render(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
aperture = gem_aperture_size(fd);
diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c
index fa4a9aab..71ed3b0c 100644
--- a/tests/gem_double_irq_loop.c
+++ b/tests/gem_double_irq_loop.c
@@ -95,7 +95,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 21bf4bf5..1810a865 100644
--- a/tests/gem_dummy_reloc_loop.c
+++ b/tests/gem_dummy_reloc_loop.c
@@ -178,7 +178,7 @@ igt_main
igt_fixture {
int i;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
num_rings = gem_get_num_rings(fd);
/* Not yet implemented on pre-snb. */
@@ -202,7 +202,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_driver(DRIVER_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_eio.c b/tests/gem_eio.c
index 7b7815e6..a24c8f1c 100644
--- a/tests/gem_eio.c
+++ b/tests/gem_eio.c
@@ -175,7 +175,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_require_hang_ring(fd, -1);
}
diff --git a/tests/gem_evict_alignment.c b/tests/gem_evict_alignment.c
index 10f79025..2c0d261d 100644
--- a/tests/gem_evict_alignment.c
+++ b/tests/gem_evict_alignment.c
@@ -192,7 +192,7 @@ igt_main
int size, count;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("minor-normal") {
diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c
index a7c3bf45..12ad6dfd 100644
--- a/tests/gem_evict_everything.c
+++ b/tests/gem_evict_everything.c
@@ -189,7 +189,7 @@ igt_main
fd = -1;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
size = 1024 * 1024;
count = 3*gem_aperture_size(fd) / size / 4;
diff --git a/tests/gem_exec_alignment.c b/tests/gem_exec_alignment.c
index 21c32193..98f6f8af 100644
--- a/tests/gem_exec_alignment.c
+++ b/tests/gem_exec_alignment.c
@@ -55,7 +55,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
memset(&execobj, 0, sizeof(execobj));
memset(&execbuf, 0, sizeof(execbuf));
diff --git a/tests/gem_exec_bad_domains.c b/tests/gem_exec_bad_domains.c
index 2fa205fe..1c18461f 100644
--- a/tests/gem_exec_bad_domains.c
+++ b/tests/gem_exec_bad_domains.c
@@ -152,7 +152,7 @@ drm_intel_bo *tmp;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 a7280aa3..1cc7da61 100644
--- a/tests/gem_exec_big.c
+++ b/tests/gem_exec_big.c
@@ -189,7 +189,7 @@ igt_simple_main
uint64_t batch_size, max, reloc_ofs;
int fd;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
use_64bit_relocs = intel_gen(intel_get_drm_devid(fd)) >= 8;
max = 3 * gem_aperture_size(fd) / 4;
diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c
index 765282b1..74f5c2ba 100644
--- a/tests/gem_exec_blt.c
+++ b/tests/gem_exec_blt.c
@@ -207,7 +207,7 @@ static void run(int object_size, bool dumb)
int fd, len, count;
int ring;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 d538a2b7..623b7e53 100644
--- a/tests/gem_exec_faulting_reloc.c
+++ b/tests/gem_exec_faulting_reloc.c
@@ -171,7 +171,7 @@ static void run(int object_size)
int fd, len;
int ring;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 52cc3924..875fea2a 100644
--- a/tests/gem_exec_lut_handle.c
+++ b/tests/gem_exec_lut_handle.c
@@ -103,7 +103,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
memset(gem_exec, 0, sizeof(gem_exec));
for (n = 0; n < MAX_NUM_EXEC; n++)
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 2eacd128..a287d08a 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -208,7 +208,7 @@ igt_main
uint32_t handle = 0;
igt_fixture {
- device = drm_open_any();
+ device = drm_open_driver(DRIVER_INTEL);
min = sysfs_read("gt_min_freq_mhz");
max = sysfs_read("gt_max_freq_mhz");
diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 8dee3627..06dfd639 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -55,7 +55,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
index 0871fc94..f7e7c862 100644
--- a/tests/gem_exec_parse.c
+++ b/tests/gem_exec_parse.c
@@ -299,7 +299,7 @@ igt_main
drm_i915_getparam_t gp;
int rc;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 b768c726..e919dfcc 100644
--- a/tests/gem_fd_exhaustion.c
+++ b/tests/gem_fd_exhaustion.c
@@ -54,7 +54,7 @@ igt_simple_main
rlim.rlim_max = nofile_rlim;
igt_assert(setrlimit(RLIMIT_NOFILE, &rlim) == 0);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_assert(open("/dev/null", O_RDONLY) >= 0);
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index 46613b53..6f3d768c 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -168,7 +168,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_driver(DRIVER_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 9735b235..ab139250 100644
--- a/tests/gem_fence_upload.c
+++ b/tests/gem_fence_upload.c
@@ -56,7 +56,7 @@ static void performance(void)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
num_fences = gem_available_fences(fd);
igt_require(num_fences > 0);
@@ -161,7 +161,7 @@ static void thread_performance(unsigned mask)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
num_fences = gem_available_fences(fd);
igt_require(num_fences > 0);
@@ -288,7 +288,7 @@ static void thread_contention(void)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
num_fences = gem_available_fences(fd);
igt_require(num_fences > 0);
@@ -343,7 +343,7 @@ static void wc_contention(void)
int fd, num_fences;
double linear[2], tiled[2];
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 786e856c..a74bc361 100644
--- a/tests/gem_fenced_exec_thrash.c
+++ b/tests/gem_fenced_exec_thrash.c
@@ -228,7 +228,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
num_fences = gem_available_fences(fd);
igt_assert(num_fences > 4);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_flink_basic.c b/tests/gem_flink_basic.c
index 84d3101a..26ae7d63 100644
--- a/tests/gem_flink_basic.c
+++ b/tests/gem_flink_basic.c
@@ -123,7 +123,7 @@ test_flink_lifetime(int fd)
igt_info("Testing flink lifetime.\n");
- fd2 = drm_open_any();
+ fd2 = drm_open_driver(DRIVER_INTEL);
memset(&create, 0, sizeof(create));
create.size = 16 * 1024;
@@ -140,7 +140,7 @@ test_flink_lifetime(int fd)
igt_assert(open_struct.handle != 0);
close(fd2);
- fd2 = drm_open_any();
+ fd2 = drm_open_driver(DRIVER_INTEL);
open_struct.name = flink.name;
ret = ioctl(fd2, DRM_IOCTL_GEM_OPEN, &open_struct);
@@ -153,7 +153,7 @@ int fd;
igt_main
{
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_subtest("basic")
test_flink(fd);
diff --git a/tests/gem_flink_race.c b/tests/gem_flink_race.c
index 766c24ad..b17ef85a 100644
--- a/tests/gem_flink_race.c
+++ b/tests/gem_flink_race.c
@@ -101,7 +101,7 @@ static void test_flink_name(void)
threads = calloc(num_threads, sizeof(pthread_t));
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
for (i = 0; i < num_threads; i++) {
r = pthread_create(&threads[i], NULL,
@@ -162,7 +162,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_driver(DRIVER_INTEL);
gem_quiescent_gpu(fake);
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_driver(DRIVER_INTEL);
for (i = 0; i < num_threads; i++) {
r = pthread_create(&threads[i], NULL,
diff --git a/tests/gem_gpgpu_fill.c b/tests/gem_gpgpu_fill.c
index 9a84f284..df9e86f6 100644
--- a/tests/gem_gpgpu_fill.c
+++ b/tests/gem_gpgpu_fill.c
@@ -100,7 +100,7 @@ igt_simple_main
igt_fillfunc_t gpgpu_fill = NULL;
int i, j;
- data.drm_fd = drm_open_any_render();
+ data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
diff --git a/tests/gem_gtt_cpu_tlb.c b/tests/gem_gtt_cpu_tlb.c
index 0808f6c0..027d5cf1 100644
--- a/tests/gem_gtt_cpu_tlb.c
+++ b/tests/gem_gtt_cpu_tlb.c
@@ -77,7 +77,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd, OBJ_SIZE);
diff --git a/tests/gem_gtt_hog.c b/tests/gem_gtt_hog.c
index 6be6f243..43cb0fbd 100644
--- a/tests/gem_gtt_hog.c
+++ b/tests/gem_gtt_hog.c
@@ -157,12 +157,12 @@ igt_simple_main
data_t data = {};
/* check for an intel gpu before goint nuts. */
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
close(fd);
igt_skip_on_simulation();
- data.fd = drm_open_any();
+ data.fd = drm_open_driver(DRIVER_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 5eb639f8..e71da848 100644
--- a/tests/gem_gtt_speed.c
+++ b/tests/gem_gtt_speed.c
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
buf = malloc(size);
memset(buf, 0, size);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd, size);
igt_assert(handle);
diff --git a/tests/gem_hang.c b/tests/gem_hang.c
index d406709f..f506fc70 100644
--- a/tests/gem_hang.c
+++ b/tests/gem_hang.c
@@ -76,7 +76,7 @@ int main(int argc, char **argv)
bad_pipe = atoi(argv[1]);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 70d3f99d..16f2167f 100644
--- a/tests/gem_hangcheck_forcewake.c
+++ b/tests/gem_hangcheck_forcewake.c
@@ -68,7 +68,7 @@ igt_simple_main
memset(blob, 'A', sizeof(blob));
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 19603075..2f0ec93a 100644
--- a/tests/gem_largeobject.c
+++ b/tests/gem_largeobject.c
@@ -78,7 +78,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
test_large_object(fd);
}
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index 06be78a1..55b01c8a 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -222,7 +222,7 @@ int main(int argc, char **argv)
igt_subtest_init(argc, argv);
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("basic")
diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c
index 9aa6f595..11dc1414 100644
--- a/tests/gem_lut_handle.c
+++ b/tests/gem_lut_handle.c
@@ -180,7 +180,7 @@ igt_simple_main
uint32_t handle;
int fd, i;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 1b03b275..a991ea35 100644
--- a/tests/gem_madvise.c
+++ b/tests/gem_madvise.c
@@ -57,7 +57,7 @@ static void sigtrap(int sig)
static void
dontneed_before_mmap(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
uint32_t handle;
char *ptr;
@@ -72,7 +72,7 @@ dontneed_before_mmap(void)
static void
dontneed_after_mmap(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
uint32_t handle;
char *ptr;
@@ -99,7 +99,7 @@ dontneed_after_mmap(void)
static void
dontneed_before_pwrite(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
uint32_t buf[] = { MI_BATCH_BUFFER_END, 0 };
struct drm_i915_gem_pwrite gem_pwrite;
@@ -119,7 +119,7 @@ dontneed_before_pwrite(void)
static void
dontneed_before_exec(void)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_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_media_fill.c b/tests/gem_media_fill.c
index d187bdbf..2c522607 100644
--- a/tests/gem_media_fill.c
+++ b/tests/gem_media_fill.c
@@ -103,7 +103,7 @@ igt_simple_main
igt_fillfunc_t media_fill = NULL;
int i, j;
- data.drm_fd = drm_open_any_render();
+ data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
diff --git a/tests/gem_mmap.c b/tests/gem_mmap.c
index c06a80b1..49e72596 100644
--- a/tests/gem_mmap.c
+++ b/tests/gem_mmap.c
@@ -125,7 +125,7 @@ igt_main
int ret;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 b5f9d12e..8c26c22a 100644
--- a/tests/gem_mmap_gtt.c
+++ b/tests/gem_mmap_gtt.c
@@ -87,7 +87,7 @@ test_access(int fd)
handle = gem_create(fd, OBJECT_SIZE);
igt_assert(handle);
- fd2 = drm_open_any();
+ fd2 = drm_open_driver(DRIVER_INTEL);
/* Check that fd1 can mmap. */
mmap_arg.handle = handle;
@@ -520,7 +520,7 @@ igt_main
OBJECT_SIZE = 1 * 1024 * 1024;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_subtest("basic")
test_access(fd);
diff --git a/tests/gem_mmap_offset_exhaustion.c b/tests/gem_mmap_offset_exhaustion.c
index eae77d87..6c517620 100644
--- a/tests/gem_mmap_offset_exhaustion.c
+++ b/tests/gem_mmap_offset_exhaustion.c
@@ -81,7 +81,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 f46c0459..e312805f 100644
--- a/tests/gem_mmap_wc.c
+++ b/tests/gem_mmap_wc.c
@@ -441,7 +441,7 @@ igt_main
OBJECT_SIZE = 1 * 1024 * 1024;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 1d36bef0..1e03544f 100644
--- a/tests/gem_multi_bsd_sync_loop.c
+++ b/tests/gem_multi_bsd_sync_loop.c
@@ -106,7 +106,7 @@ igt_simple_main
int devid;
int i;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
gem_require_ring(fd, I915_EXEC_BLT);
@@ -127,7 +127,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_driver(DRIVER_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 afa8ce05..5f339914 100644
--- a/tests/gem_non_secure_batch.c
+++ b/tests/gem_non_secure_batch.c
@@ -78,7 +78,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 5722a0b8..0f431663 100644
--- a/tests/gem_partial_pwrite_pread.c
+++ b/tests/gem_partial_pwrite_pread.c
@@ -258,7 +258,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 547fd82b..98676528 100644
--- a/tests/gem_persistent_relocs.c
+++ b/tests/gem_persistent_relocs.c
@@ -324,7 +324,7 @@ igt_main
memset(blob, 'A', sizeof(blob));
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 743e2995..e49d0f7f 100644
--- a/tests/gem_pin.c
+++ b/tests/gem_pin.c
@@ -208,7 +208,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 83e3779c..a155ad14 100644
--- a/tests/gem_pipe_control_store_loop.c
+++ b/tests/gem_pipe_control_store_loop.c
@@ -160,7 +160,7 @@ int fd;
igt_main
{
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 4f6df063..22adf805 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -100,7 +100,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_driver(DRIVER_INTEL);
drm_intel_bufmgr *bufmgr;
devid = intel_get_drm_devid(fd);
@@ -164,7 +164,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_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
@@ -238,13 +238,13 @@ static void flink_and_close(void)
uint32_t bo, flinked_bo, new_bo, name;
uint64_t offset, offset_new;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_require(uses_full_ppgtt(fd));
bo = gem_create(fd, 4096);
name = gem_flink(fd, bo);
- fd2 = drm_open_any();
+ fd2 = drm_open_driver(DRIVER_INTEL);
flinked_bo = gem_open(fd2, name);
offset = exec_and_get_offset(fd2, flinked_bo);
diff --git a/tests/gem_pread.c b/tests/gem_pread.c
index 2675362d..2b4cf09b 100644
--- a/tests/gem_pread.c
+++ b/tests/gem_pread.c
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
object_size = (object_size + 3) & -4;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 c5422dd0..b1d1dba0 100644
--- a/tests/gem_pread_after_blit.c
+++ b/tests/gem_pread_after_blit.c
@@ -211,7 +211,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 5c11f994..fce71c74 100644
--- a/tests/gem_pwrite.c
+++ b/tests/gem_pwrite.c
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
object_size = (object_size + 3) & -4;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 ae119057..ef8890e5 100644
--- a/tests/gem_pwrite_pread.c
+++ b/tests/gem_pwrite_pread.c
@@ -271,7 +271,7 @@ int main(int argc, char **argv)
igt_fixture {
uint32_t devid;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
dst = gem_create(fd, object_size);
src = gem_create(fd, object_size);
diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c
index 3bc4bad1..5783e3b2 100644
--- a/tests/gem_pwrite_snooped.c
+++ b/tests/gem_pwrite_snooped.c
@@ -129,7 +129,7 @@ igt_simple_main
{
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_read_read_speed.c b/tests/gem_read_read_speed.c
index 18b3cad6..0e291787 100644
--- a/tests/gem_read_read_speed.c
+++ b/tests/gem_read_read_speed.c
@@ -206,7 +206,7 @@ igt_main
igt_fixture {
int devid;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
igt_require(intel_gen(devid) >= 6);
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
index eaae0473..f5dd9ab0 100644
--- a/tests/gem_readwrite.c
+++ b/tests/gem_readwrite.c
@@ -84,7 +84,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd, OBJECT_SIZE);
}
diff --git a/tests/gem_reg_read.c b/tests/gem_reg_read.c
index 03617d31..8fa70d07 100644
--- a/tests/gem_reg_read.c
+++ b/tests/gem_reg_read.c
@@ -151,7 +151,7 @@ igt_main
int fd = -1;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
is_x86_64 = check_kernel_x86_64();
has_proper_timestamp = check_timestamp(fd);
}
diff --git a/tests/gem_reloc_overflow.c b/tests/gem_reloc_overflow.c
index 71e3cefa..304e3d88 100644
--- a/tests/gem_reloc_overflow.c
+++ b/tests/gem_reloc_overflow.c
@@ -326,7 +326,7 @@ igt_main
int ring;
uint32_t batch_data [2] = { MI_NOOP, MI_BATCH_BUFFER_END };
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c
index 65f46c36..bfd93678 100644
--- a/tests/gem_reloc_vs_gpu.c
+++ b/tests/gem_reloc_vs_gpu.c
@@ -273,7 +273,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_driver(DRIVER_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
batch = intel_batchbuffer_alloc(bufmgr, devid);
@@ -301,7 +301,7 @@ igt_main
memset(blob, 'A', sizeof(blob));
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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.c b/tests/gem_render_copy.c
index a031b055..a036a924 100644
--- a/tests/gem_render_copy.c
+++ b/tests/gem_render_copy.c
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
opt_handler, NULL);
igt_fixture {
- data.drm_fd = drm_open_any_render();
+ data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
diff --git a/tests/gem_render_copy_redux.c b/tests/gem_render_copy_redux.c
index 966270fa..95d1f975 100644
--- a/tests/gem_render_copy_redux.c
+++ b/tests/gem_render_copy_redux.c
@@ -70,7 +70,7 @@ typedef struct {
static void data_init(data_t *data)
{
- data->fd = drm_open_any();
+ data->fd = drm_open_driver(DRIVER_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 64367963..8df180a0 100644
--- a/tests/gem_render_linear_blits.c
+++ b/tests/gem_render_linear_blits.c
@@ -187,7 +187,7 @@ igt_main
int count=0;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("basic") {
diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c
index c820a690..9f6cbd53 100644
--- a/tests/gem_render_tiled_blits.c
+++ b/tests/gem_render_tiled_blits.c
@@ -200,7 +200,7 @@ igt_main
int count = 0;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("basic") {
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index c2992c94..4cbbb4ee 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -84,7 +84,7 @@ static const struct target_ring {
static void check_context(const struct target_ring *ring)
{
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
gem_context_destroy(fd,
gem_context_create(fd));
@@ -341,7 +341,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_driver(DRIVER_INTEL);
igt_assert(fd[i]);
}
@@ -395,7 +395,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_driver(DRIVER_INTEL);
igt_assert(fd[i]);
assert_reset_status(fd[i], 0, RS_NO_ERROR);
@@ -469,9 +469,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_driver(DRIVER_INTEL);
- fd_good = drm_open_any();
+ fd_good = drm_open_driver(DRIVER_INTEL);
assert_reset_status(fd_bad, 0, RS_NO_ERROR);
assert_reset_status(fd_good, 0, RS_NO_ERROR);
@@ -556,7 +556,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_driver(DRIVER_INTEL);
assert_reset_status(fd, 0, RS_NO_ERROR);
@@ -647,8 +647,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_driver(DRIVER_INTEL);
+ fd2 = drm_open_driver(DRIVER_INTEL);
assert_reset_status(fd1, 0, RS_NO_ERROR);
assert_reset_status(fd2, 0, RS_NO_ERROR);
ctx_guilty = gem_context_create(fd1);
@@ -695,7 +695,7 @@ static void test_close_pending_ctx(void)
int fd, h;
uint32_t ctx;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
ctx = gem_context_create(fd);
assert_reset_status(fd, ctx, RS_NO_ERROR);
@@ -713,7 +713,7 @@ static void test_close_pending(void)
{
int fd, h;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
assert_reset_status(fd, 0, RS_NO_ERROR);
@@ -775,7 +775,7 @@ static void test_close_pending_fork(const bool reverse)
int pid;
int fd, h;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
assert_reset_status(fd, 0, RS_NO_ERROR);
@@ -790,7 +790,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_driver(DRIVER_INTEL);
igt_assert_lte(0, fd2);
/* The crucial component is that we schedule the same noop batch
@@ -814,7 +814,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_driver(DRIVER_INTEL);
h = exec_valid(fd, 0);
igt_assert_lte(0, h);
@@ -829,7 +829,7 @@ static void test_reset_count(const bool create_ctx)
int fd, h, ctx;
long c1, c2;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
if (create_ctx)
ctx = gem_context_create(fd);
else
@@ -939,7 +939,7 @@ static void test_params_ctx(void)
{
int fd, ctx;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
ctx = gem_context_create(fd);
_test_param(fd, ctx);
@@ -951,7 +951,7 @@ static void test_params(void)
{
int fd;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
_test_param(fd, 0);
@@ -964,7 +964,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_driver(DRIVER_INTEL);
do {
next_ring = &rings[(++ring_num) % NUM_RINGS];
@@ -1044,7 +1044,7 @@ static void check_gpu_ok(void)
*/
igt_set_stop_rings(0);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
gem_quiescent_gpu(fd);
close(fd);
}
@@ -1060,7 +1060,7 @@ igt_main
int fd;
bool has_reset_stats;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
has_reset_stats = gem_has_reset_stats(fd);
@@ -1081,7 +1081,7 @@ igt_main
name = current_ring->name;
igt_fixture {
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
gem_require_ring(fd, current_ring->exec);
close(fd);
}
diff --git a/tests/gem_ring_sync_copy.c b/tests/gem_ring_sync_copy.c
index e1e7c69a..a949753d 100644
--- a/tests/gem_ring_sync_copy.c
+++ b/tests/gem_ring_sync_copy.c
@@ -332,7 +332,7 @@ igt_main
};
igt_fixture {
- data.drm_fd = drm_open_any_render();
+ data.drm_fd = drm_open_driver_render(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
data.n_buffers_load = 1000;
diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 45800606..452ccd8d 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -94,7 +94,7 @@ igt_simple_main
int fd;
int devid;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 cb46e7a8..84f40628 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -236,7 +236,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("blitter")
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index 0cf3d583..f6320f44 100644
--- a/tests/gem_seqno_wrap.c
+++ b/tests/gem_seqno_wrap.c
@@ -179,7 +179,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_driver(DRIVER_INTEL);
gem_quiescent_gpu(fd);
diff --git a/tests/gem_set_tiling_vs_blt.c b/tests/gem_set_tiling_vs_blt.c
index 6ce5a142..f6cd5b91 100644
--- a/tests/gem_set_tiling_vs_blt.c
+++ b/tests/gem_set_tiling_vs_blt.c
@@ -231,7 +231,7 @@ igt_main
for (i = 0; i < 1024*256; i++)
data[i] = i;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 4a3cba63..487556aa 100644
--- a/tests/gem_set_tiling_vs_gtt.c
+++ b/tests/gem_set_tiling_vs_gtt.c
@@ -58,7 +58,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 4d208353..9b2263a9 100644
--- a/tests/gem_set_tiling_vs_pwrite.c
+++ b/tests/gem_set_tiling_vs_pwrite.c
@@ -56,7 +56,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 52335412..29080d8a 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -133,7 +133,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
has_ppgtt = gem_uses_aliasing_ppgtt(fd);
diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c
index 08a6ad62..10b12d41 100644
--- a/tests/gem_storedw_loop.c
+++ b/tests/gem_storedw_loop.c
@@ -154,7 +154,7 @@ igt_main
int fd, i;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
diff --git a/tests/gem_streaming_writes.c b/tests/gem_streaming_writes.c
index 119f8b2e..39cb88df 100644
--- a/tests/gem_streaming_writes.c
+++ b/tests/gem_streaming_writes.c
@@ -376,7 +376,7 @@ igt_main
int fd, sync;
igt_fixture
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
for (sync = 2; sync--; ) {
igt_subtest_f("cpu%s", sync ? "-sync":"")
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index becb991f..4d0de5c4 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -852,7 +852,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, NULL);
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_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 d6a4840a..288324d4 100644
--- a/tests/gem_threaded_access_tiled.c
+++ b/tests/gem_threaded_access_tiled.c
@@ -97,7 +97,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 eb93f8dd..10e30dfb 100644
--- a/tests/gem_tiled_blits.c
+++ b/tests/gem_tiled_blits.c
@@ -199,7 +199,7 @@ int main(int argc, char **argv)
igt_subtest_init(argc, argv);
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 b35a960b..d4bcf203 100644
--- a/tests/gem_tiled_fence_blits.c
+++ b/tests/gem_tiled_fence_blits.c
@@ -165,7 +165,7 @@ igt_main
int fd, count;
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
}
igt_subtest("basic") {
diff --git a/tests/gem_tiled_partial_pwrite_pread.c b/tests/gem_tiled_partial_pwrite_pread.c
index 16d16c8c..fe573c37 100644
--- a/tests/gem_tiled_partial_pwrite_pread.c
+++ b/tests/gem_tiled_partial_pwrite_pread.c
@@ -258,7 +258,7 @@ igt_main
srandom(0xdeadbeef);
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
//drm_intel_bufmgr_gem_enable_reuse(bufmgr);
diff --git a/tests/gem_tiled_pread_basic.c b/tests/gem_tiled_pread_basic.c
index 4292e114..421e35eb 100644
--- a/tests/gem_tiled_pread_basic.c
+++ b/tests/gem_tiled_pread_basic.c
@@ -117,7 +117,7 @@ igt_simple_main
uint32_t handle;
uint32_t devid;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 66a87b22..ff27e042 100644
--- a/tests/gem_tiled_pread_pwrite.c
+++ b/tests/gem_tiled_pread_pwrite.c
@@ -107,7 +107,7 @@ igt_simple_main
uint32_t handle, handle_target;
int count;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 22593ed8..537b53a7 100644
--- a/tests/gem_tiled_swapping.c
+++ b/tests/gem_tiled_swapping.c
@@ -186,7 +186,7 @@ igt_main
intel_purge_vm_caches();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
check_memory_layout();
diff --git a/tests/gem_tiled_wb.c b/tests/gem_tiled_wb.c
index ea1e7a17..f52588d9 100644
--- a/tests/gem_tiled_wb.c
+++ b/tests/gem_tiled_wb.c
@@ -137,7 +137,7 @@ igt_simple_main
uint32_t tiling, swizzle;
uint32_t handle;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 8c1e9bec..0f742236 100644
--- a/tests/gem_tiled_wc.c
+++ b/tests/gem_tiled_wc.c
@@ -132,7 +132,7 @@ igt_simple_main
uint32_t tiling, swizzle;
uint32_t handle;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 9ab5341d..62fa4fee 100644
--- a/tests/gem_tiling_max_stride.c
+++ b/tests/gem_tiling_max_stride.c
@@ -68,7 +68,7 @@ igt_simple_main
int tile_width = 512;
int tile_height = 8;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
diff --git a/tests/gem_unfence_active_buffers.c b/tests/gem_unfence_active_buffers.c
index d1692531..6df23cc5 100644
--- a/tests/gem_unfence_active_buffers.c
+++ b/tests/gem_unfence_active_buffers.c
@@ -73,7 +73,7 @@ igt_simple_main
for (i = 0; i < 1024*256; i++)
data[i] = i;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 6478257c..353b40ae 100644
--- a/tests/gem_unref_active_buffers.c
+++ b/tests/gem_unref_active_buffers.c
@@ -56,7 +56,7 @@ igt_simple_main
igt_skip_on_simulation();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 448a0ea2..c9e35ed8 100644
--- a/tests/gem_userptr_blits.c
+++ b/tests/gem_userptr_blits.c
@@ -776,7 +776,7 @@ static int test_dmabuf(void)
int dma_buf_fd = -1;
int ret;
- fd1 = drm_open_any();
+ fd1 = drm_open_driver(DRIVER_INTEL);
handle = create_userptr_bo(fd1, sizeof(linear));
memset(get_handle_ptr(handle), counter, sizeof(linear));
@@ -792,7 +792,7 @@ static int test_dmabuf(void)
igt_assert_lte(0, dma_buf_fd);
}
- fd2 = drm_open_any();
+ fd2 = drm_open_driver(DRIVER_INTEL);
handle_import = prime_fd_to_handle(fd2, dma_buf_fd);
check_bo(fd1, handle, 1, fd2, handle_import);
@@ -1318,7 +1318,7 @@ int main(int argc, char **argv)
igt_fixture {
int ret;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_assert(fd >= 0);
ret = has_userptr(fd);
diff --git a/tests/gem_wait.c b/tests/gem_wait.c
index 32d05f8e..e1c174b3 100644
--- a/tests/gem_wait.c
+++ b/tests/gem_wait.c
@@ -260,7 +260,7 @@ int drm_fd;
igt_main
{
igt_fixture
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_INTEL);
igt_subtest("render_timeout")
render_timeout(drm_fd);
diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
index 3759c23a..87c798b9 100644
--- a/tests/gem_workarounds.c
+++ b/tests/gem_workarounds.c
@@ -183,7 +183,7 @@ igt_main
char *line = NULL;
size_t line_size;
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_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 5bc3dac3..d00d4f95 100644
--- a/tests/gem_write_read_ring_switch.c
+++ b/tests/gem_write_read_ring_switch.c
@@ -152,7 +152,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 309a643a..40a1f0a1 100644
--- a/tests/gen3_mixed_blits.c
+++ b/tests/gen3_mixed_blits.c
@@ -461,7 +461,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 4d864c20..e56bff93 100644
--- a/tests/gen3_render_linear_blits.c
+++ b/tests/gen3_render_linear_blits.c
@@ -329,7 +329,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 1fcea1ad..c03cb3bc 100644
--- a/tests/gen3_render_mixed_blits.c
+++ b/tests/gen3_render_mixed_blits.c
@@ -349,7 +349,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 e72149b0..eb6c4eac 100644
--- a/tests/gen3_render_tiledx_blits.c
+++ b/tests/gen3_render_tiledx_blits.c
@@ -336,7 +336,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 f0a07f4f..e3e0abf1 100644
--- a/tests/gen3_render_tiledy_blits.c
+++ b/tests/gen3_render_tiledy_blits.c
@@ -336,7 +336,7 @@ int main(int argc, char **argv)
igt_simple_init(argc, argv);
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_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 754c8435..4cf09020 100644
--- a/tests/gen7_forcewake_mt.c
+++ b/tests/gen7_forcewake_mt.c
@@ -127,7 +127,7 @@ igt_simple_main
struct thread t[16];
int i;
- t[0].fd = drm_open_any();
+ t[0].fd = drm_open_driver(DRIVER_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 73b1f3eb..642a3d6d 100644
--- a/tests/kms_3d.c
+++ b/tests/kms_3d.c
@@ -35,7 +35,7 @@ igt_simple_main
size_t length;
int mode_count, connector_id;
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
res = drmModeGetResources(drm_fd);
igt_assert(drmSetClientCap(drm_fd, DRM_CLIENT_CAP_STEREO_3D, 1) >= 0);
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 9c3659d1..d466e4dd 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -416,7 +416,7 @@ int gen;
igt_main
{
igt_fixture {
- fd = drm_open_any_master();
+ fd = drm_open_driver_master(DRIVER_INTEL);
gen = intel_gen(intel_get_drm_devid(fd));
}
diff --git a/tests/kms_crtc_background_color.c b/tests/kms_crtc_background_color.c
index b09f55cc..b496625c 100644
--- a/tests/kms_crtc_background_color.c
+++ b/tests/kms_crtc_background_color.c
@@ -181,7 +181,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.gfx_fd = drm_open_any();
+ data.gfx_fd = drm_open_driver(DRIVER_INTEL);
igt_require_pipe_crc();
igt_display_init(&data.display, data.gfx_fd);
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 1317fcca..3495b26d 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -556,7 +556,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c
index ba67c591..10a84faa 100644
--- a/tests/kms_draw_crc.c
+++ b/tests/kms_draw_crc.c
@@ -225,7 +225,7 @@ static void setup_environment(void)
{
int i;
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
igt_require(drm_fd >= 0);
drm_res = drmModeGetResources(drm_fd);
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 7b4a667a..d580a945 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -535,7 +535,7 @@ igt_main
igt_fixture {
char buf[128];
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
kmstest_set_vt_graphics_mode();
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index 4970c895..0feb1a49 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -57,7 +57,7 @@ static void setup_drm(struct drm_info *drm)
{
int i;
- drm->fd = drm_open_any_master();
+ drm->fd = drm_open_driver_master(DRIVER_INTEL);
drm->res = drmModeGetResources(drm->fd);
igt_assert(drm->res->count_connectors <= MAX_CONNECTORS);
@@ -242,7 +242,7 @@ static void setup_environment(void)
{
int drm_fd;
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
igt_require(drm_fd >= 0);
igt_assert(close(drm_fd) == 0);
}
diff --git a/tests/kms_fence_pin_leak.c b/tests/kms_fence_pin_leak.c
index b9d600ec..7d4ffbcd 100644
--- a/tests/kms_fence_pin_leak.c
+++ b/tests/kms_fence_pin_leak.c
@@ -210,7 +210,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 93c4fbde..a139d402 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1695,7 +1695,7 @@ int main(int argc, char **argv)
igt_skip_on_simulation();
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
igt_enable_connectors();
diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index 6b619f01..c19ed989 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -68,7 +68,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_driver(DRIVER_INTEL);
ret = drmDropMaster(data->drm_fd);
igt_assert_eq(ret, 0);
@@ -109,7 +109,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_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 2e277947..653a9706 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -177,7 +177,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_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 86d2d7f5..7485ca84 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -40,7 +40,7 @@ igt_main
int start_n_modes;
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
res = drmModeGetResources(drm_fd);
/* find the vga connector */
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 4f20811f..971e3e9f 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1244,7 +1244,7 @@ static void setup_drm(void)
{
int i;
- drm.fd = drm_open_any_master();
+ drm.fd = drm_open_driver_master(DRIVER_INTEL);
drm.res = drmModeGetResources(drm.fd);
igt_assert(drm.res->count_connectors <= MAX_CONNECTORS);
diff --git a/tests/kms_legacy_colorkey.c b/tests/kms_legacy_colorkey.c
index 0c24cfcc..25f98aad 100644
--- a/tests/kms_legacy_colorkey.c
+++ b/tests/kms_legacy_colorkey.c
@@ -47,7 +47,7 @@ igt_simple_main
{
igt_skip_on_simulation();
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_mmio_vs_cs_flip.c b/tests/kms_mmio_vs_cs_flip.c
index dcaaa151..25854020 100644
--- a/tests/kms_mmio_vs_cs_flip.c
+++ b/tests/kms_mmio_vs_cs_flip.c
@@ -513,7 +513,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
index a42a897c..6b442417 100644
--- a/tests/kms_panel_fitting.c
+++ b/tests/kms_panel_fitting.c
@@ -245,7 +245,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any();
+ data.drm_fd = drm_open_driver(DRIVER_INTEL);
igt_require_pipe_crc();
igt_display_init(&data.display, data.drm_fd);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_pipe_b_c_ivb.c b/tests/kms_pipe_b_c_ivb.c
index f66e9c43..9d66bda0 100644
--- a/tests/kms_pipe_b_c_ivb.c
+++ b/tests/kms_pipe_b_c_ivb.c
@@ -258,7 +258,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
devid = intel_get_drm_devid(data.drm_fd);
igt_skip_on(!IS_IVYBRIDGE(devid));
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 33c83f03..a6ebf36d 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -210,7 +210,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
igt_enable_connectors();
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index a6f40209..b7a42c60 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -405,7 +405,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 61e2dbb2..22e0388c 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -351,7 +351,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any();
+ data.drm_fd = drm_open_driver(DRIVER_INTEL);
igt_require_pipe_crc();
igt_display_init(&data.display, data.drm_fd);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 676dae17..77c92d33 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -552,7 +552,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_driver_master(DRIVER_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 a4fd5798..983418f8 100644
--- a/tests/kms_pwrite_crc.c
+++ b/tests/kms_pwrite_crc.c
@@ -195,7 +195,7 @@ igt_simple_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
data.devid = intel_get_drm_devid(data.drm_fd);
diff --git a/tests/kms_render.c b/tests/kms_render.c
index 8fefcf2e..467d71f6 100644
--- a/tests/kms_render.c
+++ b/tests/kms_render.c
@@ -232,7 +232,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_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 00a65c17..cc9847ec 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -272,7 +272,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.gfx_fd = drm_open_any_master();
+ data.gfx_fd = drm_open_driver_master(DRIVER_INTEL);
gen = intel_gen(intel_get_drm_devid(data.gfx_fd));
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index feafc068..ce016ed4 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -707,7 +707,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_driver_master(DRIVER_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 b480a994..e47b8b51 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -169,7 +169,7 @@ igt_simple_main
igt_skip_on_simulation();
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_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 481c6011..b2331662 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -669,7 +669,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- data.drm_fd = drm_open_any_master();
+ data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
data.gen = intel_gen(intel_get_drm_devid(data.drm_fd));
kmstest_set_vt_graphics_mode();
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 853cbdf7..e27a5dbd 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -177,7 +177,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
igt_require(crtc0_active(fd));
}
diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c
index 43444d80..2badb5c2 100644
--- a/tests/pm_lpsp.c
+++ b/tests/pm_lpsp.c
@@ -223,7 +223,7 @@ igt_main
igt_fixture {
int i;
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_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 79091620..a1e281cd 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -183,9 +183,9 @@ igt_main
igt_skip_on_simulation();
- /* Use drm_open_any to verify device existence */
+ /* Use drm_open_driver to verify device existence */
igt_fixture {
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
close(fd);
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index a3ffe58f..3364157e 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -699,7 +699,7 @@ static void setup_non_graphics_runtime_pm(void)
static void setup_environment(void)
{
- drm_fd = drm_open_any_master();
+ drm_fd = drm_open_driver_master(DRIVER_INTEL);
init_mode_set_data(&ms_data);
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index ccc67185..74f08f47 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -606,7 +606,7 @@ static void blocking(void)
int pre_freqs[NUMFREQ];
int post_freqs[NUMFREQ];
- int fd = drm_open_any();
+ int fd = drm_open_driver(DRIVER_INTEL);
igt_assert_lte(0, fd);
/*
@@ -661,8 +661,8 @@ igt_main
struct junk *junk = stuff;
int ret;
- /* Use drm_open_any to verify device existence */
- drm_fd = drm_open_any();
+ /* Use drm_open_driver to verify device existence */
+ drm_fd = drm_open_driver(DRIVER_INTEL);
do {
int val = -1;
diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c
index ca8bda3f..6956e2af 100644
--- a/tests/pm_sseu.c
+++ b/tests/pm_sseu.c
@@ -251,7 +251,7 @@ gem_get_target_spins(double dt)
static void
gem_init(void)
{
- gem.drm_fd = drm_open_any();
+ gem.drm_fd = drm_open_driver(DRIVER_INTEL);
gem.init = 1;
gem.devid = intel_get_drm_devid(gem.drm_fd);
diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c
index 27dddf22..6c09cb0d 100644
--- a/tests/prime_self_import.c
+++ b/tests/prime_self_import.c
@@ -88,8 +88,8 @@ static void test_with_fd_dup(void)
counter = 0;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_driver(DRIVER_INTEL);
+ fd2 = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd1, BO_SIZE);
@@ -116,8 +116,8 @@ static void test_with_two_bos(void)
counter = 0;
- fd1 = drm_open_any();
- fd2 = drm_open_any();
+ fd1 = drm_open_driver(DRIVER_INTEL);
+ fd2 = drm_open_driver(DRIVER_INTEL);
handle1 = gem_create(fd1, BO_SIZE);
handle2 = gem_create(fd1, BO_SIZE);
@@ -147,8 +147,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_driver(DRIVER_INTEL);
+ fd2 = drm_open_driver(DRIVER_INTEL);
handle_orig = gem_create(fd1, BO_SIZE);
dma_buf_fd1 = prime_handle_to_fd(fd1, handle_orig);
@@ -174,8 +174,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_driver(DRIVER_INTEL);
+ fd2 = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd1, BO_SIZE);
@@ -258,7 +258,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_driver(DRIVER_INTEL);
gem_quiescent_gpu(fake);
obj_count = get_object_count();
@@ -267,7 +267,7 @@ static void test_reimport_close_race(void)
threads = calloc(num_threads, sizeof(pthread_t));
- fds[0] = drm_open_any();
+ fds[0] = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fds[0], BO_SIZE);
@@ -350,12 +350,12 @@ 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_driver(DRIVER_INTEL);
gem_quiescent_gpu(fake);
obj_count = get_object_count();
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
for (i = 0; i < num_threads; i++) {
r = pthread_create(&threads[i], NULL,
@@ -393,7 +393,7 @@ static void test_llseek_size(void)
counter = 0;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
for (i = 0; i < 10; i++) {
@@ -420,7 +420,7 @@ static void test_llseek_bad(void)
counter = 0;
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
handle = gem_create(fd, BO_SIZE);
diff --git a/tests/template.c b/tests/template.c
index 9d7ea18d..5fbd3104 100644
--- a/tests/template.c
+++ b/tests/template.c
@@ -61,7 +61,7 @@ int drm_fd;
igt_main
{
igt_fixture {
- drm_fd = drm_open_any();
+ drm_fd = drm_open_driver(DRIVER_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 0994d510..ddc575de 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -724,7 +724,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_driver(DRIVER_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 a6ae8d46..56dcd447 100644
--- a/tools/intel_display_poller.c
+++ b/tools/intel_display_poller.c
@@ -1045,7 +1045,7 @@ int main(int argc, char *argv[])
}
}
- fd = drm_open_any();
+ fd = drm_open_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
close(fd);
diff --git a/tools/intel_gpu_frequency.c b/tools/intel_gpu_frequency.c
index c5359c08..5ae47e77 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_driver(DRIVER_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 a4b7d738..4810f7a9 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_driver(DRIVER_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 739f926d..04a6aba9 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_driver(DRIVER_INTEL);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);