[PATCH i-g-t 2/9] lib/i915/gem_create: Add gem_create_ext

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrzej Turko <andrzej.turko@xxxxxxxxxxxxxxx>

Add a wrapper for gem_create_ext ioctl (a version of gem_create that
accepts extensions). In preparation for the driver change implementing it,
a local definition of its id and necessary structs have been added,
which are to be erased as soon as those definitions
appear in the i915_drm.h file.

The new ioctl wrapper is added to a separate file.
For consistency the wrapper of the old ioctl, gem_create
is moved from ioctl_wrappers to gem_create.

Signed-off-by: Andrzej Turko <andrzej.turko@xxxxxxxxxxxxxxx>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@xxxxxxxxx>
Cc: Dominik Grzegorzek <dominik.grzegorzek@xxxxxxxxx>
Cc: Petri Latvala <petri.latvala@xxxxxxxxx>
Cc: Chris P Wilson <chris.p.wilson@xxxxxxxxx>
Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
---
 benchmarks/gem_blt.c                    |  2 +-
 benchmarks/gem_busy.c                   |  2 +-
 benchmarks/gem_create.c                 |  2 +-
 benchmarks/gem_exec_ctx.c               |  2 +-
 benchmarks/gem_exec_fault.c             |  2 +-
 benchmarks/gem_exec_nop.c               |  2 +-
 benchmarks/gem_exec_reloc.c             |  2 +-
 benchmarks/gem_exec_trace.c             |  2 +-
 benchmarks/gem_latency.c                |  2 +-
 benchmarks/gem_prw.c                    |  2 +-
 benchmarks/gem_set_domain.c             |  2 +-
 benchmarks/gem_syslatency.c             |  2 +-
 benchmarks/gem_wsim.c                   |  2 +-
 benchmarks/prime_lookup.c               |  2 +-
 lib/i915/gem.h                          |  3 --
 lib/i915/gem_create.c                   | 43 ++++++++++++++++++++++++-
 lib/i915/gem_create.h                   | 19 +++++++++++
 lib/i915/gem_mman.c                     |  2 +-
 lib/i915/gem_ring.c                     |  1 +
 lib/i915/gem_submission.c               |  1 +
 lib/igt_draw.c                          |  2 +-
 lib/igt_dummyload.c                     |  2 +-
 lib/igt_fb.c                            |  2 +-
 lib/intel_batchbuffer.c                 |  2 +-
 lib/intel_bufops.c                      |  2 +-
 lib/ioctl_wrappers.c                    |  2 +-
 tests/amdgpu/amd_prime.c                |  1 +
 tests/core_hotunplug.c                  |  1 +
 tests/i915/api_intel_allocator.c        |  1 +
 tests/i915/api_intel_bb.c               |  1 +
 tests/i915/gem_bad_reloc.c              |  1 +
 tests/i915/gem_basic.c                  |  2 +-
 tests/i915/gem_blits.c                  |  1 +
 tests/i915/gem_busy.c                   |  1 +
 tests/i915/gem_close.c                  |  1 +
 tests/i915/gem_close_race.c             |  1 +
 tests/i915/gem_concurrent_all.c         |  1 +
 tests/i915/gem_create.c                 |  1 +
 tests/i915/gem_cs_tlb.c                 |  1 +
 tests/i915/gem_ctx_clone.c              |  1 +
 tests/i915/gem_ctx_create.c             |  1 +
 tests/i915/gem_ctx_engines.c            |  1 +
 tests/i915/gem_ctx_exec.c               |  1 +
 tests/i915/gem_ctx_isolation.c          |  1 +
 tests/i915/gem_ctx_param.c              |  1 +
 tests/i915/gem_ctx_shared.c             |  1 +
 tests/i915/gem_ctx_sseu.c               |  1 +
 tests/i915/gem_ctx_switch.c             |  1 +
 tests/i915/gem_eio.c                    |  1 +
 tests/i915/gem_evict_alignment.c        |  1 +
 tests/i915/gem_evict_everything.c       |  1 +
 tests/i915/gem_exec_alignment.c         |  1 +
 tests/i915/gem_exec_async.c             |  1 +
 tests/i915/gem_exec_await.c             |  1 +
 tests/i915/gem_exec_balancer.c          |  1 +
 tests/i915/gem_exec_basic.c             |  2 +-
 tests/i915/gem_exec_big.c               |  1 +
 tests/i915/gem_exec_capture.c           |  1 +
 tests/i915/gem_exec_create.c            |  1 +
 tests/i915/gem_exec_endless.c           |  1 +
 tests/i915/gem_exec_fair.c              |  1 +
 tests/i915/gem_exec_fence.c             |  1 +
 tests/i915/gem_exec_flush.c             |  1 +
 tests/i915/gem_exec_gttfill.c           |  1 +
 tests/i915/gem_exec_latency.c           |  1 +
 tests/i915/gem_exec_lut_handle.c        |  1 +
 tests/i915/gem_exec_nop.c               |  1 +
 tests/i915/gem_exec_parallel.c          |  1 +
 tests/i915/gem_exec_params.c            |  1 +
 tests/i915/gem_exec_reloc.c             |  1 +
 tests/i915/gem_exec_schedule.c          |  1 +
 tests/i915/gem_exec_store.c             |  1 +
 tests/i915/gem_exec_suspend.c           |  1 +
 tests/i915/gem_exec_whisper.c           |  1 +
 tests/i915/gem_fd_exhaustion.c          |  2 +-
 tests/i915/gem_fence_thrash.c           |  2 +-
 tests/i915/gem_fence_upload.c           |  2 +-
 tests/i915/gem_fenced_exec_thrash.c     |  1 +
 tests/i915/gem_flink_race.c             |  2 +-
 tests/i915/gem_gtt_cpu_tlb.c            |  2 +-
 tests/i915/gem_gtt_hog.c                |  1 +
 tests/i915/gem_gtt_speed.c              |  2 +-
 tests/i915/gem_huc_copy.c               |  1 +
 tests/i915/gem_linear_blits.c           |  1 +
 tests/i915/gem_lut_handle.c             |  2 +-
 tests/i915/gem_madvise.c                |  2 +-
 tests/i915/gem_mmap.c                   |  2 +-
 tests/i915/gem_mmap_gtt.c               |  1 +
 tests/i915/gem_mmap_offset.c            |  1 +
 tests/i915/gem_mmap_wc.c                |  2 +-
 tests/i915/gem_ppgtt.c                  |  1 +
 tests/i915/gem_pread.c                  |  2 +-
 tests/i915/gem_pwrite.c                 |  2 +-
 tests/i915/gem_readwrite.c              |  2 +-
 tests/i915/gem_reset_stats.c            |  1 +
 tests/i915/gem_ringfill.c               |  1 +
 tests/i915/gem_set_tiling_vs_gtt.c      |  2 +-
 tests/i915/gem_set_tiling_vs_pwrite.c   |  2 +-
 tests/i915/gem_shrink.c                 |  1 +
 tests/i915/gem_softpin.c                |  1 +
 tests/i915/gem_streaming_writes.c       |  1 +
 tests/i915/gem_sync.c                   |  1 +
 tests/i915/gem_tiled_fence_blits.c      |  1 +
 tests/i915/gem_tiled_pread_basic.c      |  2 +-
 tests/i915/gem_tiled_pread_pwrite.c     |  2 +-
 tests/i915/gem_tiled_swapping.c         |  2 +-
 tests/i915/gem_tiled_wb.c               |  2 +-
 tests/i915/gem_tiled_wc.c               |  2 +-
 tests/i915/gem_tiling_max_stride.c      |  2 +-
 tests/i915/gem_unfence_active_buffers.c |  1 +
 tests/i915/gem_unref_active_buffers.c   |  1 +
 tests/i915/gem_userptr_blits.c          |  1 +
 tests/i915/gem_vm_create.c              |  1 +
 tests/i915/gem_wait.c                   |  1 +
 tests/i915/gem_watchdog.c               |  1 +
 tests/i915/gem_workarounds.c            |  1 +
 tests/i915/gen3_mixed_blits.c           |  1 +
 tests/i915/gen3_render_linear_blits.c   |  1 +
 tests/i915/gen3_render_mixed_blits.c    |  1 +
 tests/i915/gen3_render_tiledx_blits.c   |  1 +
 tests/i915/gen3_render_tiledy_blits.c   |  1 +
 tests/i915/gen7_exec_parse.c            |  1 +
 tests/i915/gen9_exec_parse.c            |  1 +
 tests/i915/i915_hangman.c               |  1 +
 tests/i915/i915_module_load.c           |  2 +-
 tests/i915/i915_pm_rc6_residency.c      |  1 +
 tests/i915/i915_pm_rpm.c                |  1 +
 tests/i915/i915_suspend.c               |  1 +
 tests/i915/perf_pmu.c                   |  1 +
 tests/i915/sysfs_clients.c              |  1 +
 tests/i915/sysfs_timeslice_duration.c   |  1 +
 tests/kms_big_fb.c                      |  2 +-
 tests/kms_ccs.c                         |  2 +-
 tests/kms_flip.c                        |  2 +-
 tests/kms_frontbuffer_tracking.c        |  1 +
 tests/kms_getfb.c                       |  2 +-
 tests/prime_busy.c                      |  1 +
 tests/prime_mmap.c                      |  2 +-
 tests/prime_mmap_kms.c                  |  2 +-
 tests/prime_self_import.c               |  2 +-
 tests/prime_vgem.c                      |  1 +
 tools/intel_reg.c                       |  2 +-
 142 files changed, 200 insertions(+), 57 deletions(-)
 create mode 100644 lib/i915/gem_create.h

diff --git a/benchmarks/gem_blt.c b/benchmarks/gem_blt.c
index 34b82a87..424ce8e7 100644
--- a/benchmarks/gem_blt.c
+++ b/benchmarks/gem_blt.c
@@ -41,7 +41,7 @@
 #include <time.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define COPY_BLT_CMD		(2<<29|0x53<<22|0x6)
 #define BLT_WRITE_ALPHA		(1<<21)
diff --git a/benchmarks/gem_busy.c b/benchmarks/gem_busy.c
index 69be8c17..70885e25 100644
--- a/benchmarks/gem_busy.c
+++ b/benchmarks/gem_busy.c
@@ -45,7 +45,7 @@
 #include "intel_chipset.h"
 #include "intel_reg.h"
 #include "igt_stats.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_mman.h"
 
 #define ENGINE_FLAGS  (I915_EXEC_RING_MASK | I915_EXEC_BSD_MASK)
diff --git a/benchmarks/gem_create.c b/benchmarks/gem_create.c
index d4e297ed..7808f43a 100644
--- a/benchmarks/gem_create.c
+++ b/benchmarks/gem_create.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_aux.h"
 #include "igt_stats.h"
 #include "intel_reg.h"
diff --git a/benchmarks/gem_exec_ctx.c b/benchmarks/gem_exec_ctx.c
index b6f403fb..b0c62e4c 100644
--- a/benchmarks/gem_exec_ctx.c
+++ b/benchmarks/gem_exec_ctx.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "intel_io.h"
 #include "intel_reg.h"
 #include "igt_stats.h"
diff --git a/benchmarks/gem_exec_fault.c b/benchmarks/gem_exec_fault.c
index a3a0992c..d53fab96 100644
--- a/benchmarks/gem_exec_fault.c
+++ b/benchmarks/gem_exec_fault.c
@@ -42,7 +42,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_stats.h"
 #include "intel_io.h"
 #include "intel_reg.h"
diff --git a/benchmarks/gem_exec_nop.c b/benchmarks/gem_exec_nop.c
index c44d3454..9f8634a7 100644
--- a/benchmarks/gem_exec_nop.c
+++ b/benchmarks/gem_exec_nop.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_stats.h"
 #include "intel_io.h"
 #include "intel_reg.h"
diff --git a/benchmarks/gem_exec_reloc.c b/benchmarks/gem_exec_reloc.c
index abaf9345..dadc064f 100644
--- a/benchmarks/gem_exec_reloc.c
+++ b/benchmarks/gem_exec_reloc.c
@@ -38,7 +38,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_mman.h"
 #include "igt_debugfs.h"
 #include "intel_reg.h"
diff --git a/benchmarks/gem_exec_trace.c b/benchmarks/gem_exec_trace.c
index e37f6fb7..4263ccb0 100644
--- a/benchmarks/gem_exec_trace.c
+++ b/benchmarks/gem_exec_trace.c
@@ -41,7 +41,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_stats.h"
 #include "intel_io.h"
 #include "ioctl_wrappers.h"
diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c
index 9b3d22b7..cc8b3de5 100644
--- a/benchmarks/gem_latency.c
+++ b/benchmarks/gem_latency.c
@@ -43,7 +43,7 @@
 #include <sys/resource.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 
diff --git a/benchmarks/gem_prw.c b/benchmarks/gem_prw.c
index 5d3fda9a..c6f3e066 100644
--- a/benchmarks/gem_prw.c
+++ b/benchmarks/gem_prw.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_aux.h"
 #include "igt_stats.h"
 #include "ioctl_wrappers.h"
diff --git a/benchmarks/gem_set_domain.c b/benchmarks/gem_set_domain.c
index 1c9d797c..c92beea4 100644
--- a/benchmarks/gem_set_domain.c
+++ b/benchmarks/gem_set_domain.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_aux.h"
 #include "ioctl_wrappers.h"
 
diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c
index c10d4f50..035ee934 100644
--- a/benchmarks/gem_syslatency.c
+++ b/benchmarks/gem_syslatency.c
@@ -44,7 +44,7 @@
 
 #include <linux/unistd.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 
 #define sigev_notify_thread_id _sigev_un._tid
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index 1b66e63e..d1435222 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -56,7 +56,7 @@
 #include "igt_perf.h"
 #include "sw_sync.h"
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "i915/gem_mman.h"
 
diff --git a/benchmarks/prime_lookup.c b/benchmarks/prime_lookup.c
index b1891756..9c885367 100644
--- a/benchmarks/prime_lookup.c
+++ b/benchmarks/prime_lookup.c
@@ -38,7 +38,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_rand.h"
 #include "intel_io.h"
 #include "ioctl_wrappers.h"
diff --git a/lib/i915/gem.h b/lib/i915/gem.h
index bd23a277..feabac8d 100644
--- a/lib/i915/gem.h
+++ b/lib/i915/gem.h
@@ -32,7 +32,4 @@ void gem_quiescent_gpu(int i915);
 
 int gem_reopen_driver(int i915);
 
-int __gem_create(int fd, uint64_t *size, uint32_t *handle);
-uint32_t gem_create(int fd, uint64_t size);
-
 #endif /* I915_GEM_H */
diff --git a/lib/i915/gem_create.c b/lib/i915/gem_create.c
index a8c1a581..b2e8d559 100644
--- a/lib/i915/gem_create.c
+++ b/lib/i915/gem_create.c
@@ -5,7 +5,7 @@
 
 #include <errno.h>
 
-#include "gem.h"
+#include "gem_create.h"
 #include "i915_drm.h"
 #include "igt_core.h"
 #include "ioctl_wrappers.h"
@@ -47,3 +47,44 @@ uint32_t gem_create(int fd, uint64_t size)
 
 	return handle;
 }
+
+int __gem_create_ext(int fd, uint64_t *size, uint32_t *handle,
+		     struct i915_user_extension *ext)
+{
+	struct drm_i915_gem_create_ext create = {
+		.size = *size,
+		.extensions = to_user_pointer(ext),
+	};
+	int err = 0;
+
+	if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create) == 0) {
+		*handle = create.handle;
+		*size = create.size;
+	} else {
+		err = -errno;
+		igt_assume(err != 0);
+	}
+
+	errno = 0;
+	return err;
+}
+
+/**
+ * gem_create_ext:
+ * @fd: open i915 drm file descriptor
+ * @size: desired size of the buffer
+ * @ext: optional extensions chain
+ *
+ * This wraps the GEM_CREATE_EXT ioctl, which allocates a new gem buffer object
+ * of @size.
+ *
+ * Returns: The file-private handle of the created buffer object
+ */
+uint32_t gem_create_ext(int fd, uint64_t size, struct i915_user_extension *ext)
+{
+	uint32_t handle;
+
+	igt_assert_eq(__gem_create_ext(fd, &size, &handle, ext), 0);
+
+	return handle;
+}
diff --git a/lib/i915/gem_create.h b/lib/i915/gem_create.h
new file mode 100644
index 00000000..c2b531b4
--- /dev/null
+++ b/lib/i915/gem_create.h
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#ifndef GEM_CREATE_H
+#define GEM_CREATE_H
+
+#include <stdint.h>
+
+#include "i915_drm.h"
+
+int __gem_create(int fd, uint64_t *size, uint32_t *handle);
+uint32_t gem_create(int fd, uint64_t size);
+int __gem_create_ext(int fd, uint64_t *size, uint32_t *handle,
+                     struct i915_user_extension *ext);
+uint32_t gem_create_ext(int fd, uint64_t size, struct i915_user_extension *ext);
+
+#endif /* GEM_CREATE_H */
diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c
index ab04cbec..300ca13d 100644
--- a/lib/i915/gem_mman.c
+++ b/lib/i915/gem_mman.c
@@ -31,7 +31,7 @@
 #include "ioctl_wrappers.h"
 #include "intel_chipset.h"
 
-#include "gem.h"
+#include "gem_create.h"
 #include "gem_mman.h"
 
 #ifdef HAVE_VALGRIND
diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
index f224e822..6d28b5d9 100644
--- a/lib/i915/gem_ring.c
+++ b/lib/i915/gem_ring.c
@@ -27,6 +27,7 @@
 #include <sys/time.h>
 
 #include "gem.h"
+#include "gem_create.h"
 #include "gem_ring.h"
 #include "gem_submission.h"
 
diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index 051f9d04..bd4bbb3e 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -31,6 +31,7 @@
 #include <i915_drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "i915/gem_submission.h"
 
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 949c0d77..a3144b50 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -34,7 +34,7 @@
 #include "igt_fb.h"
 #include "ioctl_wrappers.h"
 #include "i830_reg.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_mman.h"
 
 #ifndef PAGE_ALIGN
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 34ad9221..1a3abb5d 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -31,7 +31,7 @@
 #include <i915_drm.h>
 
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "i915/gem_mman.h"
 #include "i915/gem_submission.h"
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index f8f02766..3e6841fd 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -33,7 +33,7 @@
 #include <pixman.h>
 
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_mman.h"
 #include "igt_aux.h"
 #include "igt_color_encoding.h"
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 0b2c5b21..cc976a62 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -35,7 +35,7 @@
 
 #include "drm.h"
 #include "drmtest.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "intel_batchbuffer.h"
 #include "intel_bufmgr.h"
 #include "intel_bufops.h"
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 5dece576..3ce68663 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -25,7 +25,7 @@
 #include <sys/ioctl.h>
 #include <cairo.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_x86.h"
 #include "intel_bufops.h"
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 4440004c..0c1b5e32 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -49,7 +49,7 @@
 
 #include "drmtest.h"
 #include "i915_drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "intel_batchbuffer.h"
 #include "intel_chipset.h"
 #include "intel_io.h"
diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
index 537b0bcd..3e5cc1a7 100644
--- a/tests/amdgpu/amd_prime.c
+++ b/tests/amdgpu/amd_prime.c
@@ -27,6 +27,7 @@
 #include <sys/poll.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_vgem.h"
 
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index e6079fa3..a639cfb4 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -31,6 +31,7 @@
 #include <unistd.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/perf.h"
 #include "igt.h"
 #include "igt_device_scan.h"
diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c
index 182d9ba7..ea4ba8bb 100644
--- a/tests/i915/api_intel_allocator.c
+++ b/tests/i915/api_intel_allocator.c
@@ -5,6 +5,7 @@
 
 #include <stdatomic.h>
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_aux.h"
 #include "intel_allocator.h"
diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
index eafa856d..7ffe64fc 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -23,6 +23,7 @@
 
 #include "igt.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/tests/i915/gem_bad_reloc.c b/tests/i915/gem_bad_reloc.c
index 6acc1724..34c4c82b 100644
--- a/tests/i915/gem_bad_reloc.c
+++ b/tests/i915/gem_bad_reloc.c
@@ -39,6 +39,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Simulates SNA behaviour using negative self-relocations"
diff --git a/tests/i915/gem_basic.c b/tests/i915/gem_basic.c
index 984bdf60..13ecce52 100644
--- a/tests/i915/gem_basic.c
+++ b/tests/i915/gem_basic.c
@@ -37,7 +37,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 static void
 test_bad_close(int fd)
diff --git a/tests/i915/gem_blits.c b/tests/i915/gem_blits.c
index 6ed9b60e..21dcee68 100644
--- a/tests/i915/gem_blits.c
+++ b/tests/i915/gem_blits.c
@@ -23,6 +23,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_x86.h"
 
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
index 77a55101..dc481f3c 100644
--- a/tests/i915/gem_busy.c
+++ b/tests/i915/gem_busy.c
@@ -26,6 +26,7 @@
 #include <sys/ioctl.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 #include "igt_vgem.h"
diff --git a/tests/i915/gem_close.c b/tests/i915/gem_close.c
index 58f2d4b3..ee2d690b 100644
--- a/tests/i915/gem_close.c
+++ b/tests/i915/gem_close.c
@@ -22,6 +22,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 static int batch_create(int fd)
diff --git a/tests/i915/gem_close_race.c b/tests/i915/gem_close_race.c
index 06b80100..ab444945 100644
--- a/tests/i915/gem_close_race.c
+++ b/tests/i915/gem_close_race.c
@@ -42,6 +42,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 #define OBJECT_SIZE (256 * 1024)
diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
index a422a449..d0f9b62e 100644
--- a/tests/i915/gem_concurrent_all.c
+++ b/tests/i915/gem_concurrent_all.c
@@ -49,6 +49,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_vgem.h"
 
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
index ce985053..8acc2f52 100644
--- a/tests/i915/gem_create.c
+++ b/tests/i915/gem_create.c
@@ -54,6 +54,7 @@
 #include "igt_dummyload.h"
 #include "igt_x86.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "i915/gem_mman.h"
 #include "i915_drm.h"
diff --git a/tests/i915/gem_cs_tlb.c b/tests/i915/gem_cs_tlb.c
index f72879c3..dec9c107 100644
--- a/tests/i915/gem_cs_tlb.c
+++ b/tests/i915/gem_cs_tlb.c
@@ -50,6 +50,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Check whether we correctly invalidate the cs tlb.");
diff --git a/tests/i915/gem_ctx_clone.c b/tests/i915/gem_ctx_clone.c
index b72269bc..225e801b 100644
--- a/tests/i915/gem_ctx_clone.c
+++ b/tests/i915/gem_ctx_clone.c
@@ -22,6 +22,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_vm.h"
 #include "i915_drm.h"
 #include "igt.h"
diff --git a/tests/i915/gem_ctx_create.c b/tests/i915/gem_ctx_create.c
index 9a512a03..5b14f7af 100644
--- a/tests/i915/gem_ctx_create.c
+++ b/tests/i915/gem_ctx_create.c
@@ -31,6 +31,7 @@
 #include <time.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 #include "sw_sync.h"
diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c
index 643a0b2f..02658c4f 100644
--- a/tests/i915/gem_ctx_engines.c
+++ b/tests/i915/gem_ctx_engines.c
@@ -39,6 +39,7 @@
 
 #include "i915/gem.h"
 #include "i915/gem_context.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "sw_sync.h"
 
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 89776185..2e72bf71 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -41,6 +41,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_dummyload.h"
 #include "igt_rand.h"
diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
index 4f174268..4277df34 100644
--- a/tests/i915/gem_ctx_isolation.c
+++ b/tests/i915/gem_ctx_isolation.c
@@ -22,6 +22,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_dummyload.h"
 
diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index ab0e3007..c024fe60 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -29,6 +29,7 @@
 
 #include "igt.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_vm.h"
 
 IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation.");
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index 6b21994d..c7e957c4 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -38,6 +38,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "igt.h"
 #include "igt_rand.h"
diff --git a/tests/i915/gem_ctx_sseu.c b/tests/i915/gem_ctx_sseu.c
index 749ce336..7685511f 100644
--- a/tests/i915/gem_ctx_sseu.c
+++ b/tests/i915/gem_ctx_sseu.c
@@ -37,6 +37,7 @@
 #include <sys/wait.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt.h"
 #include "igt_dummyload.h"
diff --git a/tests/i915/gem_ctx_switch.c b/tests/i915/gem_ctx_switch.c
index 6208dacd..44c659f0 100644
--- a/tests/i915/gem_ctx_switch.c
+++ b/tests/i915/gem_ctx_switch.c
@@ -41,6 +41,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index d86ccf2b..25d109d6 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -43,6 +43,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 #include "igt_device.h"
diff --git a/tests/i915/gem_evict_alignment.c b/tests/i915/gem_evict_alignment.c
index d4a5877a..e5176b9b 100644
--- a/tests/i915/gem_evict_alignment.c
+++ b/tests/i915/gem_evict_alignment.c
@@ -45,6 +45,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Run a couple of big batches to force the unbind on"
diff --git a/tests/i915/gem_evict_everything.c b/tests/i915/gem_evict_everything.c
index 5d4d15c4..37343b53 100644
--- a/tests/i915/gem_evict_everything.c
+++ b/tests/i915/gem_evict_everything.c
@@ -44,6 +44,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 #include "eviction_common.c"
diff --git a/tests/i915/gem_exec_alignment.c b/tests/i915/gem_exec_alignment.c
index 7bbd2a8f..c4611bd1 100644
--- a/tests/i915/gem_exec_alignment.c
+++ b/tests/i915/gem_exec_alignment.c
@@ -42,6 +42,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using object alignments");
diff --git a/tests/i915/gem_exec_async.c b/tests/i915/gem_exec_async.c
index 412ad737..bf8a856a 100644
--- a/tests/i915/gem_exec_async.c
+++ b/tests/i915/gem_exec_async.c
@@ -22,6 +22,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Check that we can issue concurrent writes across the engines.");
diff --git a/tests/i915/gem_exec_await.c b/tests/i915/gem_exec_await.c
index e64d2a94..6db30695 100644
--- a/tests/i915/gem_exec_await.c
+++ b/tests/i915/gem_exec_await.c
@@ -26,6 +26,7 @@
 #include <sys/signal.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 #include "igt_sysfs.h"
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 01db0e11..12cb55ab 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -27,6 +27,7 @@
 #include <sys/signal.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_gt.h"
 #include "igt_perf.h"
diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
index 31f6a234..5021852f 100644
--- a/tests/i915/gem_exec_basic.c
+++ b/tests/i915/gem_exec_basic.c
@@ -23,7 +23,7 @@
 
 #include "igt.h"
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Basic sanity check of execbuf-ioctl rings.");
 
diff --git a/tests/i915/gem_exec_big.c b/tests/i915/gem_exec_big.c
index 63de42d5..1f8c720b 100644
--- a/tests/i915/gem_exec_big.c
+++ b/tests/i915/gem_exec_big.c
@@ -46,6 +46,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Run a large nop batch to stress test the error capture"
diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index 3da78d63..a6b3d987 100644
--- a/tests/i915/gem_exec_capture.c
+++ b/tests/i915/gem_exec_capture.c
@@ -25,6 +25,7 @@
 #include <zlib.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 #include "igt_rand.h"
diff --git a/tests/i915/gem_exec_create.c b/tests/i915/gem_exec_create.c
index 6529da7e..8556cb21 100644
--- a/tests/i915/gem_exec_create.c
+++ b/tests/i915/gem_exec_create.c
@@ -40,6 +40,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 
diff --git a/tests/i915/gem_exec_endless.c b/tests/i915/gem_exec_endless.c
index 1b320d4c..e7d4b56c 100644
--- a/tests/i915/gem_exec_endless.c
+++ b/tests/i915/gem_exec_endless.c
@@ -24,6 +24,7 @@
 #include <sys/ioctl.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 #include "igt_sysfs.h"
diff --git a/tests/i915/gem_exec_fair.c b/tests/i915/gem_exec_fair.c
index c1a71f77..628f4df2 100644
--- a/tests/i915/gem_exec_fair.c
+++ b/tests/i915/gem_exec_fair.c
@@ -18,6 +18,7 @@
 #include "sync_file.h"
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 #include "igt_rapl.h"
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index b7b3f8e3..70bb0011 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -26,6 +26,7 @@
 #include <sys/signal.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_syncobj.h"
 #include "igt_sysfs.h"
diff --git a/tests/i915/gem_exec_flush.c b/tests/i915/gem_exec_flush.c
index a2cac71a..629fdd7a 100644
--- a/tests/i915/gem_exec_flush.c
+++ b/tests/i915/gem_exec_flush.c
@@ -24,6 +24,7 @@
 #include <time.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 #include "igt_x86.h"
diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index c0e27c9b..e711576f 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -22,6 +22,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 
diff --git a/tests/i915/gem_exec_latency.c b/tests/i915/gem_exec_latency.c
index 8ba924b8..158faee5 100644
--- a/tests/i915/gem_exec_latency.c
+++ b/tests/i915/gem_exec_latency.c
@@ -47,6 +47,7 @@
 #include "igt_stats.h"
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define ENGINE_FLAGS  (I915_EXEC_RING_MASK | I915_EXEC_BSD_MASK)
 
diff --git a/tests/i915/gem_exec_lut_handle.c b/tests/i915/gem_exec_lut_handle.c
index e642686d..3c5c81f1 100644
--- a/tests/i915/gem_exec_lut_handle.c
+++ b/tests/i915/gem_exec_lut_handle.c
@@ -38,6 +38,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c
index 62554ecb..acdf6bde 100644
--- a/tests/i915/gem_exec_nop.c
+++ b/tests/i915/gem_exec_nop.c
@@ -41,6 +41,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 #include "igt_rand.h"
diff --git a/tests/i915/gem_exec_parallel.c b/tests/i915/gem_exec_parallel.c
index c9cf9d7a..11cea5d7 100644
--- a/tests/i915/gem_exec_parallel.c
+++ b/tests/i915/gem_exec_parallel.c
@@ -30,6 +30,7 @@
 #include <pthread.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_gt.h"
 
diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
index 6840cf40..6ab1ab11 100644
--- a/tests/i915/gem_exec_params.c
+++ b/tests/i915/gem_exec_params.c
@@ -39,6 +39,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 #include "igt_device.h"
diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index 397c335e..c79400fb 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -25,6 +25,7 @@
 #include <sys/ioctl.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 #include "igt_dummyload.h"
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..6147ff96 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -35,6 +35,7 @@
 #include <unistd.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 #include "igt_rapl.h"
diff --git a/tests/i915/gem_exec_store.c b/tests/i915/gem_exec_store.c
index 771ee169..99ffc9ab 100644
--- a/tests/i915/gem_exec_store.c
+++ b/tests/i915/gem_exec_store.c
@@ -30,6 +30,7 @@
 #include <strings.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 #include "igt_gt.h"
diff --git a/tests/i915/gem_exec_suspend.c b/tests/i915/gem_exec_suspend.c
index b6558a14..d13c443e 100644
--- a/tests/i915/gem_exec_suspend.c
+++ b/tests/i915/gem_exec_suspend.c
@@ -31,6 +31,7 @@
 #include <unistd.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_dummyload.h"
 #include "igt_gt.h"
diff --git a/tests/i915/gem_exec_whisper.c b/tests/i915/gem_exec_whisper.c
index 71bd610c..a9d3fa05 100644
--- a/tests/i915/gem_exec_whisper.c
+++ b/tests/i915/gem_exec_whisper.c
@@ -28,6 +28,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_debugfs.h"
 #include "igt_rapl.h"
diff --git a/tests/i915/gem_fd_exhaustion.c b/tests/i915/gem_fd_exhaustion.c
index 13e8a23a..a6463685 100644
--- a/tests/i915/gem_fd_exhaustion.c
+++ b/tests/i915/gem_fd_exhaustion.c
@@ -33,7 +33,7 @@
 #include <fcntl.h>
 #include <limits.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 igt_simple_main
 {
diff --git a/tests/i915/gem_fence_thrash.c b/tests/i915/gem_fence_thrash.c
index 872dc554..89a5ae29 100644
--- a/tests/i915/gem_fence_thrash.c
+++ b/tests/i915/gem_fence_thrash.c
@@ -40,7 +40,7 @@
 #include <pthread.h>
 #include "drm.h"
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_x86.h"
 
diff --git a/tests/i915/gem_fence_upload.c b/tests/i915/gem_fence_upload.c
index 87ed1edf..67487d67 100644
--- a/tests/i915/gem_fence_upload.c
+++ b/tests/i915/gem_fence_upload.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "i915_drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define OBJECT_SIZE (1024*1024) /* restricted to 1MiB alignment on i915 fences */
 
diff --git a/tests/i915/gem_fenced_exec_thrash.c b/tests/i915/gem_fenced_exec_thrash.c
index b577a04f..13812bb7 100644
--- a/tests/i915/gem_fenced_exec_thrash.c
+++ b/tests/i915/gem_fenced_exec_thrash.c
@@ -31,6 +31,7 @@
 #include <errno.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Test execbuf fence accounting.");
diff --git a/tests/i915/gem_flink_race.c b/tests/i915/gem_flink_race.c
index 58431b36..70e133d7 100644
--- a/tests/i915/gem_flink_race.c
+++ b/tests/i915/gem_flink_race.c
@@ -32,7 +32,7 @@
 #include <pthread.h>
 #include <errno.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_stats.h"
 
diff --git a/tests/i915/gem_gtt_cpu_tlb.c b/tests/i915/gem_gtt_cpu_tlb.c
index 07f8f1a3..8000e58c 100644
--- a/tests/i915/gem_gtt_cpu_tlb.c
+++ b/tests/i915/gem_gtt_cpu_tlb.c
@@ -42,7 +42,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Check whether gtt tlbs for cpu access are correctly"
 		     " invalidated.");
diff --git a/tests/i915/gem_gtt_hog.c b/tests/i915/gem_gtt_hog.c
index 1372245b..15a6139e 100644
--- a/tests/i915/gem_gtt_hog.c
+++ b/tests/i915/gem_gtt_hog.c
@@ -40,6 +40,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 static const uint32_t canary = 0xdeadbeef;
diff --git a/tests/i915/gem_gtt_speed.c b/tests/i915/gem_gtt_speed.c
index 644af3d3..272091fd 100644
--- a/tests/i915/gem_gtt_speed.c
+++ b/tests/i915/gem_gtt_speed.c
@@ -41,7 +41,7 @@
 #include <sys/time.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define OBJECT_SIZE 16384
 
diff --git a/tests/i915/gem_huc_copy.c b/tests/i915/gem_huc_copy.c
index 5954d34e..9a32893e 100644
--- a/tests/i915/gem_huc_copy.c
+++ b/tests/i915/gem_huc_copy.c
@@ -34,6 +34,7 @@
 #include <sys/time.h>
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("A very simple workload for the HuC.");
 
diff --git a/tests/i915/gem_linear_blits.c b/tests/i915/gem_linear_blits.c
index 7b7cf05a..6504c9f2 100644
--- a/tests/i915/gem_linear_blits.c
+++ b/tests/i915/gem_linear_blits.c
@@ -45,6 +45,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Test doing many blits with a working set larger than the"
diff --git a/tests/i915/gem_lut_handle.c b/tests/i915/gem_lut_handle.c
index f14a9bda..64dbb87c 100644
--- a/tests/i915/gem_lut_handle.c
+++ b/tests/i915/gem_lut_handle.c
@@ -38,7 +38,7 @@
 #include <sys/time.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
 		     " interface.");
diff --git a/tests/i915/gem_madvise.c b/tests/i915/gem_madvise.c
index d772d3ab..d88747a9 100644
--- a/tests/i915/gem_madvise.c
+++ b/tests/i915/gem_madvise.c
@@ -37,7 +37,7 @@
 #include <signal.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use"
 		     " purged bo.");
diff --git a/tests/i915/gem_mmap.c b/tests/i915/gem_mmap.c
index 7c36571c..d12a4c0b 100644
--- a/tests/i915/gem_mmap.c
+++ b/tests/i915/gem_mmap.c
@@ -37,7 +37,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define OBJECT_SIZE 16384
 #define PAGE_SIZE 4096
diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index 528a7c72..cbfa222a 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -42,6 +42,7 @@
 #include "drm.h"
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "igt_x86.h"
diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c
index 95c934db..f1ba67b7 100644
--- a/tests/i915/gem_mmap_offset.c
+++ b/tests/i915/gem_mmap_offset.c
@@ -32,6 +32,7 @@
 #include "drm.h"
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_x86.h"
 
diff --git a/tests/i915/gem_mmap_wc.c b/tests/i915/gem_mmap_wc.c
index 4a2192b3..7130a510 100644
--- a/tests/i915/gem_mmap_wc.c
+++ b/tests/i915/gem_mmap_wc.c
@@ -38,7 +38,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 struct local_i915_gem_mmap_v2 {
 	uint32_t handle;
diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index da83484a..4c9691e3 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -36,6 +36,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_debugfs.h"
 
diff --git a/tests/i915/gem_pread.c b/tests/i915/gem_pread.c
index ec9991ee..a8bf2b05 100644
--- a/tests/i915/gem_pread.c
+++ b/tests/i915/gem_pread.c
@@ -43,7 +43,7 @@
 #include <pthread.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_vgem.h"
 
 #define MiB(x) ((x) * 1024 * 1024)
diff --git a/tests/i915/gem_pwrite.c b/tests/i915/gem_pwrite.c
index 5fd15e6a..e8e8c7ad 100644
--- a/tests/i915/gem_pwrite.c
+++ b/tests/i915/gem_pwrite.c
@@ -42,7 +42,7 @@
 #include <sys/time.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_rand.h"
 #include "igt_vgem.h"
diff --git a/tests/i915/gem_readwrite.c b/tests/i915/gem_readwrite.c
index 8a958cc9..2d437dec 100644
--- a/tests/i915/gem_readwrite.c
+++ b/tests/i915/gem_readwrite.c
@@ -37,7 +37,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define OBJECT_SIZE 16384
 
diff --git a/tests/i915/gem_reset_stats.c b/tests/i915/gem_reset_stats.c
index e1feecb6..627a10ab 100644
--- a/tests/i915/gem_reset_stats.c
+++ b/tests/i915/gem_reset_stats.c
@@ -41,6 +41,7 @@
 #include <signal.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 #include "igt_sysfs.h"
diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
index 78903707..9ad97532 100644
--- a/tests/i915/gem_ringfill.c
+++ b/tests/i915/gem_ringfill.c
@@ -32,6 +32,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt.h"
 #include "igt_device.h"
diff --git a/tests/i915/gem_set_tiling_vs_gtt.c b/tests/i915/gem_set_tiling_vs_gtt.c
index f09022c6..2f890e83 100644
--- a/tests/i915/gem_set_tiling_vs_gtt.c
+++ b/tests/i915/gem_set_tiling_vs_gtt.c
@@ -37,7 +37,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Check set_tiling vs gtt mmap coherency.");
 
diff --git a/tests/i915/gem_set_tiling_vs_pwrite.c b/tests/i915/gem_set_tiling_vs_pwrite.c
index 87909d3c..6bec7f27 100644
--- a/tests/i915/gem_set_tiling_vs_pwrite.c
+++ b/tests/i915/gem_set_tiling_vs_pwrite.c
@@ -37,7 +37,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Check set_tiling vs pwrite coherency.");
 
diff --git a/tests/i915/gem_shrink.c b/tests/i915/gem_shrink.c
index 2269da49..b6450a6f 100644
--- a/tests/i915/gem_shrink.c
+++ b/tests/i915/gem_shrink.c
@@ -28,6 +28,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_gt.h"
 #include "igt_debugfs.h"
diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c
index c3bfd10a..bdb04821 100644
--- a/tests/i915/gem_softpin.c
+++ b/tests/i915/gem_softpin.c
@@ -27,6 +27,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "intel_allocator.h"
 
diff --git a/tests/i915/gem_streaming_writes.c b/tests/i915/gem_streaming_writes.c
index b18ff848..c104792b 100644
--- a/tests/i915/gem_streaming_writes.c
+++ b/tests/i915/gem_streaming_writes.c
@@ -38,6 +38,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 #define OBJECT_SIZE 1024*1024
diff --git a/tests/i915/gem_sync.c b/tests/i915/gem_sync.c
index 6ad31517..e1b3ab7d 100644
--- a/tests/i915/gem_sync.c
+++ b/tests/i915/gem_sync.c
@@ -25,6 +25,7 @@
 #include <pthread.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_ring.h"
 #include "igt_debugfs.h"
 #include "igt_dummyload.h"
diff --git a/tests/i915/gem_tiled_fence_blits.c b/tests/i915/gem_tiled_fence_blits.c
index 28beea89..6ce3a38d 100644
--- a/tests/i915/gem_tiled_fence_blits.c
+++ b/tests/i915/gem_tiled_fence_blits.c
@@ -42,6 +42,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_x86.h"
 
diff --git a/tests/i915/gem_tiled_pread_basic.c b/tests/i915/gem_tiled_pread_basic.c
index 186f630f..2b4cec6e 100644
--- a/tests/i915/gem_tiled_pread_basic.c
+++ b/tests/i915/gem_tiled_pread_basic.c
@@ -47,7 +47,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Test pread behavior on tiled objects with respect to the"
 		     " reported swizzling value.");
diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index ef1e1b3c..f77cd3bd 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -57,7 +57,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Test swizzling by testing pwrite does the inverse of"
 		     " pread.");
diff --git a/tests/i915/gem_tiled_swapping.c b/tests/i915/gem_tiled_swapping.c
index 1bcf2fa4..d33b76db 100644
--- a/tests/i915/gem_tiled_swapping.c
+++ b/tests/i915/gem_tiled_swapping.c
@@ -57,7 +57,7 @@
 #include <pthread.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Exercise swizzle code for swapping.");
 
diff --git a/tests/i915/gem_tiled_wb.c b/tests/i915/gem_tiled_wb.c
index 2ba424e8..e9efbdf2 100644
--- a/tests/i915/gem_tiled_wb.c
+++ b/tests/i915/gem_tiled_wb.c
@@ -44,7 +44,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("This is a test of write-combining mmap's behavior on"
 		     " tiled objects with respect to the reported swizzling"
diff --git a/tests/i915/gem_tiled_wc.c b/tests/i915/gem_tiled_wc.c
index 898aad40..29ea700e 100644
--- a/tests/i915/gem_tiled_wc.c
+++ b/tests/i915/gem_tiled_wc.c
@@ -44,7 +44,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define WIDTH 512
 #define HEIGHT 512
diff --git a/tests/i915/gem_tiling_max_stride.c b/tests/i915/gem_tiling_max_stride.c
index 4a273441..513d579d 100644
--- a/tests/i915/gem_tiling_max_stride.c
+++ b/tests/i915/gem_tiling_max_stride.c
@@ -38,7 +38,7 @@
 #include <sys/ioctl.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Check that max fence stride works.");
 
diff --git a/tests/i915/gem_unfence_active_buffers.c b/tests/i915/gem_unfence_active_buffers.c
index 887d6177..2c9cebb6 100644
--- a/tests/i915/gem_unfence_active_buffers.c
+++ b/tests/i915/gem_unfence_active_buffers.c
@@ -50,6 +50,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Check for use-after-free in the fence stealing code.");
diff --git a/tests/i915/gem_unref_active_buffers.c b/tests/i915/gem_unref_active_buffers.c
index e4a82360..731190b3 100644
--- a/tests/i915/gem_unref_active_buffers.c
+++ b/tests/i915/gem_unref_active_buffers.c
@@ -40,6 +40,7 @@
 
 #include "igt.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Test unreferencing of active buffers.");
 
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c
index aad5f141..1d67b718 100644
--- a/tests/i915/gem_userptr_blits.c
+++ b/tests/i915/gem_userptr_blits.c
@@ -59,6 +59,7 @@
 #include "i915_drm.h"
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "sw_sync.h"
diff --git a/tests/i915/gem_vm_create.c b/tests/i915/gem_vm_create.c
index 6d93c98a..5f982d4d 100644
--- a/tests/i915/gem_vm_create.c
+++ b/tests/i915/gem_vm_create.c
@@ -22,6 +22,7 @@
  */
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_vm.h"
 #include "igt.h"
 #include "igt_rand.h"
diff --git a/tests/i915/gem_wait.c b/tests/i915/gem_wait.c
index 7b2b1c2b..81ac25b5 100644
--- a/tests/i915/gem_wait.c
+++ b/tests/i915/gem_wait.c
@@ -28,6 +28,7 @@
 #include <sys/poll.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_vgem.h"
 
diff --git a/tests/i915/gem_watchdog.c b/tests/i915/gem_watchdog.c
index 8f9fb177..286002bd 100644
--- a/tests/i915/gem_watchdog.c
+++ b/tests/i915/gem_watchdog.c
@@ -30,6 +30,7 @@
 #include <sched.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_params.h"
 #include "sw_sync.h"
diff --git a/tests/i915/gem_workarounds.c b/tests/i915/gem_workarounds.c
index 00b475c2..8312e20a 100644
--- a/tests/i915/gem_workarounds.c
+++ b/tests/i915/gem_workarounds.c
@@ -28,6 +28,7 @@
 #include <fcntl.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 
diff --git a/tests/i915/gen3_mixed_blits.c b/tests/i915/gen3_mixed_blits.c
index 10a8cd3e..184effec 100644
--- a/tests/i915/gen3_mixed_blits.c
+++ b/tests/i915/gen3_mixed_blits.c
@@ -45,6 +45,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915_reg.h"
 #include "igt.h"
 
diff --git a/tests/i915/gen3_render_linear_blits.c b/tests/i915/gen3_render_linear_blits.c
index d88a2c93..f01df69e 100644
--- a/tests/i915/gen3_render_linear_blits.c
+++ b/tests/i915/gen3_render_linear_blits.c
@@ -44,6 +44,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915_reg.h"
 #include "igt.h"
 
diff --git a/tests/i915/gen3_render_mixed_blits.c b/tests/i915/gen3_render_mixed_blits.c
index cda175bd..9ebb93be 100644
--- a/tests/i915/gen3_render_mixed_blits.c
+++ b/tests/i915/gen3_render_mixed_blits.c
@@ -45,6 +45,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915_reg.h"
 #include "igt.h"
 
diff --git a/tests/i915/gen3_render_tiledx_blits.c b/tests/i915/gen3_render_tiledx_blits.c
index 579205f3..b8aa0edc 100644
--- a/tests/i915/gen3_render_tiledx_blits.c
+++ b/tests/i915/gen3_render_tiledx_blits.c
@@ -45,6 +45,7 @@
 
 #include "drm.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915_reg.h"
 #include "igt.h"
 
diff --git a/tests/i915/gen3_render_tiledy_blits.c b/tests/i915/gen3_render_tiledy_blits.c
index 931e91a3..2d1b2d8e 100644
--- a/tests/i915/gen3_render_tiledy_blits.c
+++ b/tests/i915/gen3_render_tiledy_blits.c
@@ -45,6 +45,7 @@
 #include "drm.h"
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915_reg.h"
 #include "igt.h"
 
diff --git a/tests/i915/gen7_exec_parse.c b/tests/i915/gen7_exec_parse.c
index f7201bb9..8326fd5c 100644
--- a/tests/i915/gen7_exec_parse.c
+++ b/tests/i915/gen7_exec_parse.c
@@ -32,6 +32,7 @@
 #include "igt.h"
 #include "igt_device.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "sw_sync.h"
 
 #define DERRMR 0x44050
diff --git a/tests/i915/gen9_exec_parse.c b/tests/i915/gen9_exec_parse.c
index f9de90d2..e10c6ce9 100644
--- a/tests/i915/gen9_exec_parse.c
+++ b/tests/i915/gen9_exec_parse.c
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_submission.h"
 #include "igt.h"
 #include "sw_sync.h"
diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
index 72e4d8b8..f6fac283 100644
--- a/tests/i915/i915_hangman.c
+++ b/tests/i915/i915_hangman.c
@@ -33,6 +33,7 @@
 #include <fcntl.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "igt_debugfs.h"
diff --git a/tests/i915/i915_module_load.c b/tests/i915/i915_module_load.c
index 03dec60d..281454a5 100644
--- a/tests/i915/i915_module_load.c
+++ b/tests/i915/i915_module_load.c
@@ -30,7 +30,7 @@
 #include <sys/ioctl.h>
 #include <fcntl.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_debugfs.h"
 #include "igt_aux.h"
 #include "igt_kmod.h"
diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c
index d484121e..bfbe4ab0 100644
--- a/tests/i915/i915_pm_rc6_residency.c
+++ b/tests/i915/i915_pm_rc6_residency.c
@@ -34,6 +34,7 @@
 #include <time.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_perf.h"
 #include "igt_rapl.h"
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index d9ec0388..da498ad6 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -46,6 +46,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_kmod.h"
 #include "igt_sysfs.h"
diff --git a/tests/i915/i915_suspend.c b/tests/i915/i915_suspend.c
index 15340edc..da27ce09 100644
--- a/tests/i915/i915_suspend.c
+++ b/tests/i915/i915_suspend.c
@@ -39,6 +39,7 @@
 #include <drm.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_device.h"
 
diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c
index 50b5c82b..172dd161 100644
--- a/tests/i915/perf_pmu.c
+++ b/tests/i915/perf_pmu.c
@@ -39,6 +39,7 @@
 #include <sched.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_core.h"
 #include "igt_device.h"
diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c
index 0b7066c0..04636777 100644
--- a/tests/i915/sysfs_clients.c
+++ b/tests/i915/sysfs_clients.c
@@ -19,6 +19,7 @@
 #include "drmtest.h"
 #include "i915/gem.h"
 #include "i915/gem_context.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "i915/gem_mman.h"
 #include "igt_aux.h"
diff --git a/tests/i915/sysfs_timeslice_duration.c b/tests/i915/sysfs_timeslice_duration.c
index 754b7ca6..05ab7966 100644
--- a/tests/i915/sysfs_timeslice_duration.c
+++ b/tests/i915/sysfs_timeslice_duration.c
@@ -32,6 +32,7 @@
 #include "igt_params.h"
 #include "drmtest.h"
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_engine_topology.h"
 #include "i915/gem_mman.h"
 #include "igt_dummyload.h"
diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b..b35727a0 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -27,7 +27,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Test big framebuffers");
 
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index bba49fd8..01e3b979 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -24,7 +24,7 @@
 
 #include "igt.h"
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 #define SDR_PLANE_BASE	3
 
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 64907c2c..8f736652 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -42,7 +42,7 @@
 #include <time.h>
 #include <pthread.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_stats.h"
 
 #define TEST_DPMS		(1 << 0)
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 65c2ddb5..906caa4c 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -31,6 +31,7 @@
 #include <pthread.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_sysfs.h"
 #include "igt_psr.h"
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index 5f4758c6..917b57bb 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -40,7 +40,7 @@
 
 #include "drm.h"
 #include "drm_fourcc.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt_device.h"
 
 IGT_TEST_DESCRIPTION("Tests GETFB and GETFB2 ioctls.");
diff --git a/tests/prime_busy.c b/tests/prime_busy.c
index aec76393..8bf50eaf 100644
--- a/tests/prime_busy.c
+++ b/tests/prime_busy.c
@@ -24,6 +24,7 @@
 #include <sys/poll.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 
 IGT_TEST_DESCRIPTION("Basic check of polling for prime fences.");
diff --git a/tests/prime_mmap.c b/tests/prime_mmap.c
index cdf2d514..a4e4b4b6 100644
--- a/tests/prime_mmap.c
+++ b/tests/prime_mmap.c
@@ -43,7 +43,7 @@
 #include "drm.h"
 #include "drmtest.h"
 #include "i915_drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "i915/gem_mman.h"
 #include "igt_debugfs.h"
 #include "ioctl_wrappers.h"
diff --git a/tests/prime_mmap_kms.c b/tests/prime_mmap_kms.c
index 6cc1db87..1575eeb1 100644
--- a/tests/prime_mmap_kms.c
+++ b/tests/prime_mmap_kms.c
@@ -32,7 +32,7 @@
 
 #include "igt.h"
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION(
    "Efficiently sharing CPU and GPU buffers");
diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c
index 4a0a9803..38a55439 100644
--- a/tests/prime_self_import.c
+++ b/tests/prime_self_import.c
@@ -44,7 +44,7 @@
 #include <pthread.h>
 
 #include "drm.h"
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 
 IGT_TEST_DESCRIPTION("Check whether prime import/export works on the same"
 		     " device... but with different fds.");
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index 07ff69a2..aeff282b 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -26,6 +26,7 @@
 #include <time.h>
 
 #include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_vgem.h"
 #include "intel_batchbuffer.h"	/* igt_blitter_src_copy() */
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index da1832be..584a2ccd 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -32,7 +32,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "i915/gem.h"
+#include "i915/gem_create.h"
 #include "igt.h"
 #include "igt_gt.h"
 #include "intel_io.h"
-- 
2.26.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux