summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt.h49
-rw-r--r--tests/core_get_client_auth.c3
-rw-r--r--tests/core_getclient.c2
-rw-r--r--tests/core_getstats.c3
-rw-r--r--tests/core_getversion.c2
-rw-r--r--tests/drm_auth.c4
-rw-r--r--tests/drm_import_export.c3
-rw-r--r--tests/drm_read.c4
-rw-r--r--tests/drm_vma_limiter.c6
-rw-r--r--tests/drm_vma_limiter_cached.c6
-rw-r--r--tests/drm_vma_limiter_cpu.c6
-rw-r--r--tests/drm_vma_limiter_gtt.c6
-rw-r--r--tests/drv_getparams_basic.c3
-rw-r--r--tests/drv_hangman.c6
-rw-r--r--tests/drv_suspend.c5
-rw-r--r--tests/eviction_common.c3
-rw-r--r--tests/gem_alive.c2
-rw-r--r--tests/gem_bad_address.c6
-rw-r--r--tests/gem_bad_batch.c6
-rw-r--r--tests/gem_bad_blit.c6
-rw-r--r--tests/gem_bad_length.c3
-rw-r--r--tests/gem_bad_reloc.c5
-rw-r--r--tests/gem_basic.c3
-rw-r--r--tests/gem_caching.c7
-rw-r--r--tests/gem_close_race.c4
-rw-r--r--tests/gem_concurrent_all.c9
-rw-r--r--tests/gem_cpu_reloc.c7
-rw-r--r--tests/gem_cs_prefetch.c7
-rw-r--r--tests/gem_cs_tlb.c5
-rw-r--r--tests/gem_ctx_bad_destroy.c3
-rw-r--r--tests/gem_ctx_bad_exec.c3
-rw-r--r--tests/gem_ctx_basic.c6
-rw-r--r--tests/gem_ctx_create.c3
-rw-r--r--tests/gem_ctx_exec.c5
-rw-r--r--tests/gem_ctx_param_basic.c4
-rw-r--r--tests/gem_ctx_thrash.c5
-rw-r--r--tests/gem_double_irq_loop.c6
-rw-r--r--tests/gem_dummy_reloc_loop.c6
-rw-r--r--tests/gem_eio.c6
-rw-r--r--tests/gem_evict_alignment.c6
-rw-r--r--tests/gem_evict_everything.c5
-rw-r--r--tests/gem_exec_alignment.c4
-rw-r--r--tests/gem_exec_bad_domains.c6
-rw-r--r--tests/gem_exec_big.c5
-rw-r--r--tests/gem_exec_blt.c5
-rw-r--r--tests/gem_exec_faulting_reloc.c6
-rw-r--r--tests/gem_exec_lut_handle.c4
-rw-r--r--tests/gem_exec_nop.c5
-rw-r--r--tests/gem_exec_params.c6
-rw-r--r--tests/gem_exec_parse.c4
-rw-r--r--tests/gem_fd_exhaustion.c4
-rw-r--r--tests/gem_fence_thrash.c3
-rw-r--r--tests/gem_fence_upload.c3
-rw-r--r--tests/gem_fenced_exec_thrash.c6
-rw-r--r--tests/gem_flink_basic.c3
-rw-r--r--tests/gem_flink_race.c4
-rw-r--r--tests/gem_gpgpu_fill.c6
-rw-r--r--tests/gem_gtt_cpu_tlb.c4
-rw-r--r--tests/gem_gtt_hog.c4
-rw-r--r--tests/gem_gtt_speed.c3
-rw-r--r--tests/gem_hang.c6
-rw-r--r--tests/gem_hangcheck_forcewake.c6
-rw-r--r--tests/gem_largeobject.c3
-rw-r--r--tests/gem_linear_blits.c6
-rw-r--r--tests/gem_lut_handle.c3
-rw-r--r--tests/gem_madvise.c3
-rw-r--r--tests/gem_media_fill.c6
-rw-r--r--tests/gem_mmap.c4
-rw-r--r--tests/gem_mmap_gtt.c5
-rw-r--r--tests/gem_mmap_offset_exhaustion.c3
-rw-r--r--tests/gem_mmap_wc.c4
-rw-r--r--tests/gem_multi_bsd_sync_loop.c6
-rw-r--r--tests/gem_non_secure_batch.c6
-rw-r--r--tests/gem_partial_pwrite_pread.c6
-rw-r--r--tests/gem_persistent_relocs.c7
-rw-r--r--tests/gem_pin.c6
-rw-r--r--tests/gem_pipe_control_store_loop.c6
-rw-r--r--tests/gem_ppgtt.c7
-rw-r--r--tests/gem_pread.c3
-rw-r--r--tests/gem_pread_after_blit.c7
-rw-r--r--tests/gem_pwrite.c4
-rw-r--r--tests/gem_pwrite_pread.c6
-rw-r--r--tests/gem_pwrite_snooped.c5
-rw-r--r--tests/gem_read_read_speed.c9
-rw-r--r--tests/gem_readwrite.c3
-rw-r--r--tests/gem_reg_read.c3
-rw-r--r--tests/gem_reloc_overflow.c5
-rw-r--r--tests/gem_reloc_vs_gpu.c8
-rw-r--r--tests/gem_render_copy.c7
-rw-r--r--tests/gem_render_copy_redux.c7
-rw-r--r--tests/gem_render_linear_blits.c7
-rw-r--r--tests/gem_render_tiled_blits.c7
-rw-r--r--tests/gem_reset_stats.c7
-rw-r--r--tests/gem_ring_sync_copy.c5
-rw-r--r--tests/gem_ring_sync_loop.c6
-rw-r--r--tests/gem_ringfill.c6
-rw-r--r--tests/gem_seqno_wrap.c9
-rw-r--r--tests/gem_set_tiling_vs_blt.c6
-rw-r--r--tests/gem_set_tiling_vs_gtt.c5
-rw-r--r--tests/gem_set_tiling_vs_pwrite.c4
-rw-r--r--tests/gem_storedw_batches_loop.c6
-rw-r--r--tests/gem_storedw_loop.c6
-rw-r--r--tests/gem_storedw_loop_blt.c6
-rw-r--r--tests/gem_storedw_loop_bsd.c6
-rw-r--r--tests/gem_storedw_loop_render.c6
-rw-r--r--tests/gem_storedw_loop_vebox.c6
-rw-r--r--tests/gem_streaming_writes.c6
-rw-r--r--tests/gem_stress.c7
-rw-r--r--tests/gem_threaded_access_tiled.c3
-rw-r--r--tests/gem_tiled_blits.c6
-rw-r--r--tests/gem_tiled_fence_blits.c7
-rw-r--r--tests/gem_tiled_partial_pwrite_pread.c6
-rw-r--r--tests/gem_tiled_pread_basic.c5
-rw-r--r--tests/gem_tiled_pread_pwrite.c5
-rw-r--r--tests/gem_tiled_swapping.c6
-rw-r--r--tests/gem_tiled_wb.c5
-rw-r--r--tests/gem_tiled_wc.c5
-rw-r--r--tests/gem_tiling_max_stride.c5
-rw-r--r--tests/gem_unfence_active_buffers.c6
-rw-r--r--tests/gem_unref_active_buffers.c6
-rw-r--r--tests/gem_userptr_blits.c5
-rw-r--r--tests/gem_wait.c7
-rw-r--r--tests/gem_workarounds.c7
-rw-r--r--tests/gem_write_read_ring_switch.c6
-rw-r--r--tests/gen3_mixed_blits.c6
-rw-r--r--tests/gen3_render_linear_blits.c6
-rw-r--r--tests/gen3_render_mixed_blits.c6
-rw-r--r--tests/gen3_render_tiledx_blits.c6
-rw-r--r--tests/gen3_render_tiledy_blits.c6
-rw-r--r--tests/gen7_forcewake_mt.c6
-rw-r--r--tests/kms_3d.c4
-rw-r--r--tests/kms_addfb_basic.c4
-rw-r--r--tests/kms_crtc_background_color.c5
-rw-r--r--tests/kms_cursor_crc.c6
-rw-r--r--tests/kms_draw_crc.c7
-rw-r--r--tests/kms_fbc_crc.c8
-rw-r--r--tests/kms_fbcon_fbt.c6
-rw-r--r--tests/kms_fence_pin_leak.c7
-rw-r--r--tests/kms_flip.c8
-rw-r--r--tests/kms_flip_event_leak.c7
-rw-r--r--tests/kms_flip_tiling.c6
-rw-r--r--tests/kms_force_connector.c4
-rw-r--r--tests/kms_frontbuffer_tracking.c8
-rw-r--r--tests/kms_legacy_colorkey.c4
-rw-r--r--tests/kms_mmio_vs_cs_flip.c6
-rw-r--r--tests/kms_panel_fitting.c7
-rw-r--r--tests/kms_pipe_b_c_ivb.c4
-rw-r--r--tests/kms_pipe_crc_basic.c6
-rw-r--r--tests/kms_plane.c5
-rw-r--r--tests/kms_plane_scaling.c7
-rw-r--r--tests/kms_psr_sink_crc.c8
-rw-r--r--tests/kms_pwrite_crc.c7
-rw-r--r--tests/kms_render.c7
-rw-r--r--tests/kms_rotation_crc.c6
-rw-r--r--tests/kms_setmode.c5
-rw-r--r--tests/kms_sink_crc_basic.c4
-rw-r--r--tests/kms_universal_plane.c5
-rw-r--r--tests/kms_vblank.c9
-rw-r--r--tests/pm_backlight.c2
-rw-r--r--tests/pm_lpsp.c5
-rw-r--r--tests/pm_rc6_residency.c3
-rw-r--r--tests/pm_rpm.c9
-rw-r--r--tests/pm_rps.c7
-rw-r--r--tests/pm_sseu.c8
-rw-r--r--tests/prime_nv_api.c5
-rw-r--r--tests/prime_nv_pcopy.c6
-rw-r--r--tests/prime_nv_test.c6
-rw-r--r--tests/prime_self_import.c4
-rw-r--r--tests/prime_udl.c6
-rw-r--r--tests/template.c2
-rw-r--r--tests/testdisplay.c5
-rw-r--r--tests/testdisplay_hotplug.c2
172 files changed, 220 insertions, 741 deletions
diff --git a/lib/igt.h b/lib/igt.h
new file mode 100644
index 00000000..9cac4178
--- /dev/null
+++ b/lib/igt.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright © 2015 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef IGT_H
+#define IGT_H
+
+#include "drmtest.h"
+#include "i915_3d.h"
+#include "i915_pciids.h"
+#include "igt_aux.h"
+#include "igt_core.h"
+#include "igt_core.h"
+#include "igt_debugfs.h"
+#include "igt_draw.h"
+#include "igt_fb.h"
+#include "igt_gt.h"
+#include "igt_kms.h"
+#include "igt_stats.h"
+#include "instdone.h"
+#include "intel_batchbuffer.h"
+#include "intel_chipset.h"
+#include "intel_io.h"
+#include "ioctl_wrappers.h"
+#include "media_fill.h"
+#include "media_spin.h"
+#include "rendercopy.h"
+#include "version.h"
+
+#endif /* IGT_H */
diff --git a/tests/core_get_client_auth.c b/tests/core_get_client_auth.c
index bbfdddf4..7301ca0c 100644
--- a/tests/core_get_client_auth.c
+++ b/tests/core_get_client_auth.c
@@ -33,6 +33,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -44,8 +45,6 @@
#endif
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
/* Checks whether the thread id is the current thread */
static bool
diff --git a/tests/core_getclient.c b/tests/core_getclient.c
index 7598e0ff..aae00ea2 100644
--- a/tests/core_getclient.c
+++ b/tests/core_getclient.c
@@ -25,12 +25,12 @@
*
*/
+#include "igt.h"
#include <limits.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <errno.h>
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_CLIENT ioctl.");
diff --git a/tests/core_getstats.c b/tests/core_getstats.c
index 52a2d204..3db6b09d 100644
--- a/tests/core_getstats.c
+++ b/tests/core_getstats.c
@@ -25,14 +25,13 @@
*
*/
+#include "igt.h"
#include <limits.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <drm.h>
-#include "igt_core.h"
-#include "drmtest.h"
/**
* Checks DRM_IOCTL_GET_STATS.
diff --git a/tests/core_getversion.c b/tests/core_getversion.c
index 30132e44..1c0f824a 100644
--- a/tests/core_getversion.c
+++ b/tests/core_getversion.c
@@ -25,9 +25,9 @@
*
*/
+#include "igt.h"
#include <string.h>
#include <sys/ioctl.h>
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_VERSION ioctl and libdrm's "
"drmGetVersion() interface to it.");
diff --git a/tests/drm_auth.c b/tests/drm_auth.c
index 3a97d68c..e936666b 100644
--- a/tests/drm_auth.c
+++ b/tests/drm_auth.c
@@ -25,6 +25,7 @@
* Testcase: drmGetMagic() and drmAuthMagic()
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -39,9 +40,6 @@
#include <sys/time.h>
#include <sys/poll.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Call drmGetMagic() and drmAuthMagic() and see if it behaves.");
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index e24e0dff..41c47467 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -25,6 +25,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -40,8 +41,6 @@
#include <unistd.h>
#include <sys/syscall.h>
-#include "igt_core.h"
-#include "drmtest.h"
int fd;
drm_intel_bufmgr *bufmgr;
diff --git a/tests/drm_read.c b/tests/drm_read.c
index 334f26a7..b808bed6 100644
--- a/tests/drm_read.c
+++ b/tests/drm_read.c
@@ -29,6 +29,7 @@
* Testcase: boundary testing of read(drm_fd)
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -43,9 +44,6 @@
#include <sys/time.h>
#include <sys/poll.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Call read(drm) and see if it behaves.");
diff --git a/tests/drm_vma_limiter.c b/tests/drm_vma_limiter.c
index bb7102f1..ce3d3642 100644
--- a/tests/drm_vma_limiter.c
+++ b/tests/drm_vma_limiter.c
@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,12 +34,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/drm_vma_limiter_cached.c b/tests/drm_vma_limiter_cached.c
index 74d0c1a0..d4608726 100644
--- a/tests/drm_vma_limiter_cached.c
+++ b/tests/drm_vma_limiter_cached.c
@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,12 +34,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/drm_vma_limiter_cpu.c b/tests/drm_vma_limiter_cpu.c
index e17a679d..f2a78437 100644
--- a/tests/drm_vma_limiter_cpu.c
+++ b/tests/drm_vma_limiter_cpu.c
@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,12 +34,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/drm_vma_limiter_gtt.c b/tests/drm_vma_limiter_gtt.c
index 303e86da..d7e86194 100644
--- a/tests/drm_vma_limiter_gtt.c
+++ b/tests/drm_vma_limiter_gtt.c
@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,12 +34,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/drv_getparams_basic.c b/tests/drv_getparams_basic.c
index 5a5c8bbc..39120dde 100644
--- a/tests/drv_getparams_basic.c
+++ b/tests/drv_getparams_basic.c
@@ -25,12 +25,11 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <errno.h>
#include <xf86drm.h>
#include <i915_drm.h>
-#include "drmtest.h"
-#include "intel_chipset.h"
#include "intel_bufmgr.h"
IGT_TEST_DESCRIPTION("Tests the export of parameters via DRM_IOCTL_I915_GETPARAM\n");
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index 070c7cff..4f4e76c5 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -26,16 +26,12 @@
*
*/
+#include "igt.h"
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "intel_chipset.h"
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
-#include "ioctl_wrappers.h"
#ifndef I915_PARAM_CMD_PARSER_VERSION
#define I915_PARAM_CMD_PARSER_VERSION 28
diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c
index d67a7945..795fed14 100644
--- a/tests/drv_suspend.c
+++ b/tests/drv_suspend.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -38,10 +39,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_gt.h"
-#include "igt_aux.h"
#define OBJECT_SIZE (16*1024*1024)
diff --git a/tests/eviction_common.c b/tests/eviction_common.c
index 91c5acf7..5b36fb86 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -27,10 +27,9 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
-#include "drmtest.h"
-#include "igt_aux.h"
struct igt_eviction_test_ops
{
diff --git a/tests/gem_alive.c b/tests/gem_alive.c
index 390a54fa..c94e3dce 100644
--- a/tests/gem_alive.c
+++ b/tests/gem_alive.c
@@ -1,3 +1,4 @@
+#include "igt.h"
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
@@ -5,7 +6,6 @@
#include <signal.h>
#include <i915_drm.h>
-#include "drmtest.h"
int main(void)
{
diff --git a/tests/gem_bad_address.c b/tests/gem_bad_address.c
index 4a4a5703..b777fa9b 100644
--- a/tests/gem_bad_address.c
+++ b/tests/gem_bad_address.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/gem_bad_batch.c b/tests/gem_bad_batch.c
index e3de3b6d..d93ccad2 100644
--- a/tests/gem_bad_batch.c
+++ b/tests/gem_bad_batch.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/gem_bad_blit.c b/tests/gem_bad_blit.c
index f981d356..b9521558 100644
--- a/tests/gem_bad_blit.c
+++ b/tests/gem_bad_blit.c
@@ -41,6 +41,7 @@
* resulted.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -50,12 +51,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/gem_bad_length.c b/tests/gem_bad_length.c
index 29b39253..c85b349f 100644
--- a/tests/gem_bad_length.c
+++ b/tests/gem_bad_length.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,8 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Test minimal bo_create and batchbuffer exec.");
diff --git a/tests/gem_bad_reloc.c b/tests/gem_bad_reloc.c
index 36d8c09a..563571e1 100644
--- a/tests/gem_bad_reloc.c
+++ b/tests/gem_bad_reloc.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,10 +38,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Simulates SNA behaviour using negative self-relocations"
" for STATE_BASE_ADDRESS command packets.");
diff --git a/tests/gem_basic.c b/tests/gem_basic.c
index f79b0669..553088d3 100644
--- a/tests/gem_basic.c
+++ b/tests/gem_basic.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,8 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
static void
test_bad_close(int fd)
diff --git a/tests/gem_caching.c b/tests/gem_caching.c
index 2fad0ec9..2f1efece 100644
--- a/tests/gem_caching.c
+++ b/tests/gem_caching.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -37,13 +38,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test snoop consistency when touching partial"
" cachelines.");
diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c
index f89b3b69..4d2b3966 100644
--- a/tests/gem_close_race.c
+++ b/tests/gem_close_race.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
@@ -38,9 +39,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
#define OBJECT_SIZE (256 * 1024)
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c
index 3a7ab7f0..dc0761ea 100644
--- a/tests/gem_concurrent_all.c
+++ b/tests/gem_concurrent_all.c
@@ -35,6 +35,7 @@
* Based on gem_gtt_concurrent_blt.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -47,15 +48,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_core.h"
-#include "igt_gt.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Test of pread/pwrite/mmap behavior when writing to active"
" buffers.");
diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c
index 45449ffa..9dcd5080 100644
--- a/tests/gem_cpu_reloc.c
+++ b/tests/gem_cpu_reloc.c
@@ -45,6 +45,7 @@
* GPU will hang.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -56,13 +57,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test the relocations through the CPU domain.");
diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index ac3da6d5..ea7882a3 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -35,6 +35,7 @@
* This test for a bug where we've failed to plug a scratch pte entry into the
* very last gtt pte.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -46,13 +47,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test the CS prefetch behaviour on batches.");
diff --git a/tests/gem_cs_tlb.c b/tests/gem_cs_tlb.c
index 62f446cc..e436dd40 100644
--- a/tests/gem_cs_tlb.c
+++ b/tests/gem_cs_tlb.c
@@ -35,6 +35,7 @@
* https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1063252
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -49,10 +50,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Check whether we correctly invalidate the cs tlb.");
diff --git a/tests/gem_ctx_bad_destroy.c b/tests/gem_ctx_bad_destroy.c
index ee897638..c1f6bd85 100644
--- a/tests/gem_ctx_bad_destroy.c
+++ b/tests/gem_ctx_bad_destroy.c
@@ -29,12 +29,11 @@
* Negative test cases for destroy contexts
*/
+#include "igt.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Negative test cases for destroy contexts.");
diff --git a/tests/gem_ctx_bad_exec.c b/tests/gem_ctx_bad_exec.c
index 36afd7d8..2dd601da 100644
--- a/tests/gem_ctx_bad_exec.c
+++ b/tests/gem_ctx_bad_exec.c
@@ -30,6 +30,7 @@
* test we can't submit contexts to unsupported rings
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -42,8 +43,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Test that context cannot be submitted to unsupported"
" rings.");
diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c
index 9aad7f84..967a3a7a 100644
--- a/tests/gem_ctx_basic.c
+++ b/tests/gem_ctx_basic.c
@@ -29,6 +29,7 @@
* This test is useful for finding memory and refcount leaks.
*/
+#include "igt.h"
#include <pthread.h>
#include <stdlib.h>
#include <sys/ioctl.h>
@@ -40,12 +41,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic test for memory and refcount leaks.");
diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c
index 046c974d..4b60450c 100644
--- a/tests/gem_ctx_create.c
+++ b/tests/gem_ctx_create.c
@@ -25,12 +25,11 @@
*
*/
+#include "igt.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
int ret, fd;
struct drm_i915_gem_context_create create;
diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index 3df939cc..1277095b 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -29,6 +29,7 @@
* This test covers basic context switch functionality
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -43,10 +44,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
IGT_TEST_DESCRIPTION("Test basic context switch functionality.");
diff --git a/tests/gem_ctx_param_basic.c b/tests/gem_ctx_param_basic.c
index 430a53b2..ac5f0385 100644
--- a/tests/gem_ctx_param_basic.c
+++ b/tests/gem_ctx_param_basic.c
@@ -24,12 +24,10 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
+#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation.");
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c
index b4818f4e..8e742edc 100644
--- a/tests/gem_ctx_thrash.c
+++ b/tests/gem_ctx_thrash.c
@@ -22,6 +22,7 @@
*
*/
+#include "igt.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -30,10 +31,6 @@
#include <sys/stat.h>
#include <sys/resource.h>
-#include "ioctl_wrappers.h"
-#include "igt_aux.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Fill the Gobal GTT with context objects and VMs\n");
diff --git a/tests/gem_double_irq_loop.c b/tests/gem_double_irq_loop.c
index a43fd1a9..fa4a9aab 100644
--- a/tests/gem_double_irq_loop.c
+++ b/tests/gem_double_irq_loop.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,13 +35,8 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
#include "i830_reg.h"
-#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c
index 5e0a10a5..21bf4bf5 100644
--- a/tests/gem_dummy_reloc_loop.c
+++ b/tests/gem_dummy_reloc_loop.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,13 +35,8 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
#include "i830_reg.h"
-#include "intel_chipset.h"
#define LOCAL_I915_EXEC_VEBOX (4<<0)
#define LOCAL_I915_EXEC_BSD_RING1 (1<<13)
diff --git a/tests/gem_eio.c b/tests/gem_eio.c
index 998766c1..7b7815e6 100644
--- a/tests/gem_eio.c
+++ b/tests/gem_eio.c
@@ -27,6 +27,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -38,11 +39,6 @@
#include <drm.h>
-#include "drmtest.h"
-#include "ioctl_wrappers.h"
-#include "igt_core.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
IGT_TEST_DESCRIPTION("Test that specific ioctls report a wedged GPU (EIO).");
diff --git a/tests/gem_evict_alignment.c b/tests/gem_evict_alignment.c
index 02cbb3a4..10f79025 100644
--- a/tests/gem_evict_alignment.c
+++ b/tests/gem_evict_alignment.c
@@ -30,6 +30,7 @@
* Testcase: run a couple of big batches to force the unbind on misalignment code.
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -44,11 +45,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
IGT_TEST_DESCRIPTION("Run a couple of big batches to force the unbind on"
" misalignment code.");
diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c
index 54acc2b6..a7c3bf45 100644
--- a/tests/gem_evict_everything.c
+++ b/tests/gem_evict_everything.c
@@ -30,6 +30,7 @@
* Testcase: run a couple of big batches to force the eviction code.
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -42,10 +43,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "igt_gt.h"
#include "eviction_common.c"
diff --git a/tests/gem_exec_alignment.c b/tests/gem_exec_alignment.c
index e5b8b736..21c32193 100644
--- a/tests/gem_exec_alignment.c
+++ b/tests/gem_exec_alignment.c
@@ -27,6 +27,7 @@
/* Exercises the basic execbuffer using object alignments */
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,9 +37,6 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "igt_debugfs.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using object alignments");
diff --git a/tests/gem_exec_bad_domains.c b/tests/gem_exec_bad_domains.c
index 69e9189c..2fa205fe 100644
--- a/tests/gem_exec_bad_domains.c
+++ b/tests/gem_exec_bad_domains.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,12 +35,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
/* Testcase: Test whether the kernel rejects relocations with non-gpu domains
*
diff --git a/tests/gem_exec_big.c b/tests/gem_exec_big.c
index 171fd818..a7280aa3 100644
--- a/tests/gem_exec_big.c
+++ b/tests/gem_exec_big.c
@@ -32,6 +32,7 @@
* Mostly useful to stress-test the error-capture code
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -44,10 +45,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Run a large nop batch to stress test the error capture"
" code.");
diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c
index 151e4483..765282b1 100644
--- a/tests/gem_exec_blt.c
+++ b/tests/gem_exec_blt.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,10 +38,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
#define OBJECT_SIZE 16384
diff --git a/tests/gem_exec_faulting_reloc.c b/tests/gem_exec_faulting_reloc.c
index 8b780a6e..d538a2b7 100644
--- a/tests/gem_exec_faulting_reloc.c
+++ b/tests/gem_exec_faulting_reloc.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,11 +38,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_debugfs.h"
/* Testcase: Submit patches with relocations in memory that will fault
*
diff --git a/tests/gem_exec_lut_handle.c b/tests/gem_exec_lut_handle.c
index 65224430..52cc3924 100644
--- a/tests/gem_exec_lut_handle.c
+++ b/tests/gem_exec_lut_handle.c
@@ -27,6 +27,7 @@
/* Exercises the basic execbuffer using the handle LUT interface */
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,9 +37,6 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "igt_debugfs.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
" interface.");
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index c8fff2be..2eacd128 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -38,10 +39,6 @@
#include <sys/time.h>
#include <time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "igt_stats.h"
#define LOCAL_I915_EXEC_NO_RELOC (1<<11)
#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12)
diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index b33a7408..8dee3627 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -38,11 +39,6 @@
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
#define LOCAL_I915_EXEC_VEBOX (4<<0)
#define LOCAL_I915_EXEC_BSD_MASK (3<<13)
diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c
index 6105f496..0871fc94 100644
--- a/tests/gem_exec_parse.c
+++ b/tests/gem_exec_parse.c
@@ -22,6 +22,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
@@ -29,9 +30,6 @@
#include <drm.h>
-#include "drmtest.h"
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
#ifndef I915_PARAM_CMD_PARSER_VERSION
#define I915_PARAM_CMD_PARSER_VERSION 28
diff --git a/tests/gem_fd_exhaustion.c b/tests/gem_fd_exhaustion.c
index 8ba631f6..b768c726 100644
--- a/tests/gem_fd_exhaustion.c
+++ b/tests/gem_fd_exhaustion.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
@@ -32,9 +33,6 @@
#include <fcntl.h>
#include <limits.h>
-#include "drmtest.h"
-#include "ioctl_wrappers.h"
-#include "igt_aux.h"
#define FD_ARR_SZ 100
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index f9ec91e4..46613b53 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -30,6 +30,7 @@
#include "config.h"
#endif
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -41,8 +42,6 @@
#include <sys/ioctl.h>
#include <pthread.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#define OBJECT_SIZE (128*1024) /* restricted to 1MiB alignment on i915 fences */
diff --git a/tests/gem_fence_upload.c b/tests/gem_fence_upload.c
index 9595bc82..9735b235 100644
--- a/tests/gem_fence_upload.c
+++ b/tests/gem_fence_upload.c
@@ -29,6 +29,7 @@
#include "config.h"
#endif
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -40,8 +41,6 @@
#include <pthread.h>
#include "drm.h"
#include "i915_drm.h"
-#include "drmtest.h"
-#include "ioctl_wrappers.h"
#define OBJECT_SIZE (1024*1024) /* restricted to 1MiB alignment on i915 fences */
diff --git a/tests/gem_fenced_exec_thrash.c b/tests/gem_fenced_exec_thrash.c
index 81cdff82..786e856c 100644
--- a/tests/gem_fenced_exec_thrash.c
+++ b/tests/gem_fenced_exec_thrash.c
@@ -27,6 +27,7 @@
#define _GNU_SOURCE
+#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -37,11 +38,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test execbuf fence accounting.");
diff --git a/tests/gem_flink_basic.c b/tests/gem_flink_basic.c
index 91444e8d..84d3101a 100644
--- a/tests/gem_flink_basic.c
+++ b/tests/gem_flink_basic.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,8 +35,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
static void
test_flink(int fd)
diff --git a/tests/gem_flink_race.c b/tests/gem_flink_race.c
index 889cb1be..766c24ad 100644
--- a/tests/gem_flink_race.c
+++ b/tests/gem_flink_race.c
@@ -25,6 +25,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h>
@@ -33,10 +34,7 @@
#include <pthread.h>
#include <errno.h>
-#include "drmtest.h"
-#include "ioctl_wrappers.h"
#include "intel_bufmgr.h"
-#include "igt_debugfs.h"
IGT_TEST_DESCRIPTION("Check for flink/open vs. gem close races.");
diff --git a/tests/gem_gpgpu_fill.c b/tests/gem_gpgpu_fill.c
index df0d7c8b..9a84f284 100644
--- a/tests/gem_gpgpu_fill.c
+++ b/tests/gem_gpgpu_fill.c
@@ -30,6 +30,7 @@
* workload for the GPGPU pipeline.
*/
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -42,12 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#define WIDTH 64
#define HEIGHT 64
diff --git a/tests/gem_gtt_cpu_tlb.c b/tests/gem_gtt_cpu_tlb.c
index a019061c..0808f6c0 100644
--- a/tests/gem_gtt_cpu_tlb.c
+++ b/tests/gem_gtt_cpu_tlb.c
@@ -30,6 +30,7 @@
* This test checks whether gtt tlbs for cpu access are correctly invalidated.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -40,9 +41,6 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
IGT_TEST_DESCRIPTION("Check whether gtt tlbs for cpu access are correctly"
" invalidated.");
diff --git a/tests/gem_gtt_hog.c b/tests/gem_gtt_hog.c
index 39dfa482..6be6f243 100644
--- a/tests/gem_gtt_hog.c
+++ b/tests/gem_gtt_hog.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -39,9 +40,6 @@
#include <sys/wait.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
static const uint32_t canary = 0xdeadbeef;
diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c
index d5e745ed..5eb639f8 100644
--- a/tests/gem_gtt_speed.c
+++ b/tests/gem_gtt_speed.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -38,8 +39,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#define OBJECT_SIZE 16384
diff --git a/tests/gem_hang.c b/tests/gem_hang.c
index 8767615c..d406709f 100644
--- a/tests/gem_hang.c
+++ b/tests/gem_hang.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/gem_hangcheck_forcewake.c b/tests/gem_hangcheck_forcewake.c
index f274fabb..70d3f99d 100644
--- a/tests/gem_hangcheck_forcewake.c
+++ b/tests/gem_hangcheck_forcewake.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,12 +35,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Provoke the hangcheck timer on an otherwise idle"
" system.");
diff --git a/tests/gem_largeobject.c b/tests/gem_largeobject.c
index 0f929f8f..19603075 100644
--- a/tests/gem_largeobject.c
+++ b/tests/gem_largeobject.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,8 +35,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
/* Should take 64 pages to store the page pointers on 64 bit */
#define OBJ_SIZE (128 * 1024 * 1024)
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index e5d21413..06be78a1 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -44,11 +45,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test doing many blits with a working set larger than the"
" aperture size.");
diff --git a/tests/gem_lut_handle.c b/tests/gem_lut_handle.c
index 7fc72f1a..9aa6f595 100644
--- a/tests/gem_lut_handle.c
+++ b/tests/gem_lut_handle.c
@@ -27,6 +27,7 @@
/* Exercises the basic execbuffer using the handle LUT interface */
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,8 +37,6 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
" interface.");
diff --git a/tests/gem_madvise.c b/tests/gem_madvise.c
index 58ab629f..1b03b275 100644
--- a/tests/gem_madvise.c
+++ b/tests/gem_madvise.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -36,8 +37,6 @@
#include <signal.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use"
" purged bo.");
diff --git a/tests/gem_media_fill.c b/tests/gem_media_fill.c
index ade56f25..d187bdbf 100644
--- a/tests/gem_media_fill.c
+++ b/tests/gem_media_fill.c
@@ -30,6 +30,7 @@
* workload for the Media pipeline.
*/
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -42,12 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic test for the media_fill() function, a very simple"
" workload for the Media pipeline.");
diff --git a/tests/gem_mmap.c b/tests/gem_mmap.c
index 5952983b..c06a80b1 100644
--- a/tests/gem_mmap.c
+++ b/tests/gem_mmap.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,9 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "igt_aux.h"
-#include "drmtest.h"
#define OBJECT_SIZE 16384
#define PAGE_SIZE 4096
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c
index 644b30cb..b5f9d12e 100644
--- a/tests/gem_mmap_gtt.c
+++ b/tests/gem_mmap_gtt.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -37,10 +38,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_aux.h"
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
diff --git a/tests/gem_mmap_offset_exhaustion.c b/tests/gem_mmap_offset_exhaustion.c
index b0310501..eae77d87 100644
--- a/tests/gem_mmap_offset_exhaustion.c
+++ b/tests/gem_mmap_offset_exhaustion.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,8 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
IGT_TEST_DESCRIPTION("Checks whether the kernel handles mmap offset exhaustion"
" correctly.");
diff --git a/tests/gem_mmap_wc.c b/tests/gem_mmap_wc.c
index 0a5326e9..f46c0459 100644
--- a/tests/gem_mmap_wc.c
+++ b/tests/gem_mmap_wc.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -37,9 +38,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_debugfs.h"
struct local_i915_gem_mmap_v2 {
uint32_t handle;
diff --git a/tests/gem_multi_bsd_sync_loop.c b/tests/gem_multi_bsd_sync_loop.c
index 0766eb61..1d36bef0 100644
--- a/tests/gem_multi_bsd_sync_loop.c
+++ b/tests/gem_multi_bsd_sync_loop.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,13 +36,8 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
#include "i830_reg.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic check of ring<->ring sync using a dummy reloc.");
diff --git a/tests/gem_non_secure_batch.c b/tests/gem_non_secure_batch.c
index d00ce456..afa8ce05 100644
--- a/tests/gem_non_secure_batch.c
+++ b/tests/gem_non_secure_batch.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,12 +35,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
#include "i830_reg.h"
IGT_TEST_DESCRIPTION("Basic check of non-secure batches.");
diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c
index 0be749c1..5722a0b8 100644
--- a/tests/gem_partial_pwrite_pread.c
+++ b/tests/gem_partial_pwrite_pread.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,11 +37,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test pwrite/pread consistency when touching partial"
" cachelines.");
diff --git a/tests/gem_persistent_relocs.c b/tests/gem_persistent_relocs.c
index d57e1722..547fd82b 100644
--- a/tests/gem_persistent_relocs.c
+++ b/tests/gem_persistent_relocs.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -39,12 +40,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_debugfs.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test persistent relocations as used by uxa/libva.");
diff --git a/tests/gem_pin.c b/tests/gem_pin.c
index b35496e7..743e2995 100644
--- a/tests/gem_pin.c
+++ b/tests/gem_pin.c
@@ -27,6 +27,7 @@
/* Exercises pinning of small bo */
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -38,11 +39,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Exercises pinning of small buffer objects.");
diff --git a/tests/gem_pipe_control_store_loop.c b/tests/gem_pipe_control_store_loop.c
index 86ee4050..83e3779c 100644
--- a/tests/gem_pipe_control_store_loop.c
+++ b/tests/gem_pipe_control_store_loop.c
@@ -31,6 +31,7 @@
* Writes a counter-value into an always newly allocated target bo (by disabling
* buffer reuse). Decently trashes on tlb inconsistencies, too.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -40,12 +41,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
IGT_TEST_DESCRIPTION("Test (TLB-)Coherency of pipe_control QW writes.");
diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c
index d1e484ae..4f6df063 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
*/
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -35,13 +36,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
diff --git a/tests/gem_pread.c b/tests/gem_pread.c
index 3ec5fb1b..2675362d 100644
--- a/tests/gem_pread.c
+++ b/tests/gem_pread.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,8 +38,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#define OBJECT_SIZE 16384
diff --git a/tests/gem_pread_after_blit.c b/tests/gem_pread_after_blit.c
index 8ed43100..c5422dd0 100644
--- a/tests/gem_pread_after_blit.c
+++ b/tests/gem_pread_after_blit.c
@@ -34,6 +34,7 @@
* ranged-buffer-flush paths in the kernel.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -45,12 +46,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
IGT_TEST_DESCRIPTION("Test pread behavior when getting values out of"
" just-drawn-to buffers.");
diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c
index 1d867e79..5c11f994 100644
--- a/tests/gem_pwrite.c
+++ b/tests/gem_pwrite.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,9 +38,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
#define OBJECT_SIZE 16384
diff --git a/tests/gem_pwrite_pread.c b/tests/gem_pwrite_pread.c
index 88c2070e..ae119057 100644
--- a/tests/gem_pwrite_pread.c
+++ b/tests/gem_pwrite_pread.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,12 +38,7 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
#define OBJECT_SIZE 16384
diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c
index 890c61d0..d3f6223e 100644
--- a/tests/gem_pwrite_snooped.c
+++ b/tests/gem_pwrite_snooped.c
@@ -22,6 +22,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -34,10 +35,6 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION(
"pwrite to a snooped bo then make it uncached and check that the GPU sees the data.");
diff --git a/tests/gem_read_read_speed.c b/tests/gem_read_read_speed.c
index e60f1937..18b3cad6 100644
--- a/tests/gem_read_read_speed.c
+++ b/tests/gem_read_read_speed.c
@@ -26,6 +26,7 @@
* This is a test of performance with multiple readers from the same source.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -39,15 +40,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_core.h"
-#include "igt_gt.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Test speed of concurrent reads between engines.");
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c
index a8a7105e..eaae0473 100644
--- a/tests/gem_readwrite.c
+++ b/tests/gem_readwrite.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,8 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#define OBJECT_SIZE 16384
diff --git a/tests/gem_reg_read.c b/tests/gem_reg_read.c
index 28ecdf56..03617d31 100644
--- a/tests/gem_reg_read.c
+++ b/tests/gem_reg_read.c
@@ -25,14 +25,13 @@
*
*/
+#include "igt.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/utsname.h>
#include <time.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
static bool is_x86_64;
static bool has_proper_timestamp;
diff --git a/tests/gem_reloc_overflow.c b/tests/gem_reloc_overflow.c
index ea591711..71e3cefa 100644
--- a/tests/gem_reloc_overflow.c
+++ b/tests/gem_reloc_overflow.c
@@ -28,6 +28,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -43,10 +44,6 @@
#include <sys/time.h>
#include <sys/types.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
-#include "intel_io.h"
IGT_TEST_DESCRIPTION("Check that kernel relocation overflows are caught.");
diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c
index 47fbe755..65f46c36 100644
--- a/tests/gem_reloc_vs_gpu.c
+++ b/tests/gem_reloc_vs_gpu.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -39,13 +40,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_debugfs.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
IGT_TEST_DESCRIPTION("Test kernel relocations vs. gpu races.");
diff --git a/tests/gem_render_copy.c b/tests/gem_render_copy.c
index ee37f8ad..a031b055 100644
--- a/tests/gem_render_copy.c
+++ b/tests/gem_render_copy.c
@@ -29,6 +29,7 @@
* workload for the 3D engine.
*/
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <cairo.h>
@@ -44,13 +45,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Basic test for the render_copy() function.");
diff --git a/tests/gem_render_copy_redux.c b/tests/gem_render_copy_redux.c
index 43d4c5af..966270fa 100644
--- a/tests/gem_render_copy_redux.c
+++ b/tests/gem_render_copy_redux.c
@@ -32,6 +32,7 @@
* the execbuffer interface with a simple render workload.
*/
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -46,13 +47,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Advanced test for the render_copy() function.");
diff --git a/tests/gem_render_linear_blits.c b/tests/gem_render_linear_blits.c
index f83c6d4c..64367963 100644
--- a/tests/gem_render_linear_blits.c
+++ b/tests/gem_render_linear_blits.c
@@ -37,6 +37,7 @@
#include "config.h"
#endif
+#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -49,13 +50,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c
index f6692703..c820a690 100644
--- a/tests/gem_render_tiled_blits.c
+++ b/tests/gem_render_tiled_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -45,13 +46,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index 2bb4291b..c2992c94 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -40,12 +41,6 @@
#include <time.h>
#include <signal.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_gt.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
#define RS_NO_ERROR 0
#define RS_BATCH_ACTIVE (1 << 0)
diff --git a/tests/gem_ring_sync_copy.c b/tests/gem_ring_sync_copy.c
index 13af1989..e1e7c69a 100644
--- a/tests/gem_ring_sync_copy.c
+++ b/tests/gem_ring_sync_copy.c
@@ -47,13 +47,10 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdbool.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Ensure inter-ring dependencies are respected.");
diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 4b88530b..45800606 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,13 +35,8 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
#include "i830_reg.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic check of ring<->ring sync using a dummy reloc.");
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index ee4720d0..cb46e7a8 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -31,6 +31,7 @@
* catching failure to manage the ring properly near full.
*/
+#include "igt.h"
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
@@ -43,11 +44,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
struct bo {
const char *ring;
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index d7d56ed1..0cf3d583 100644
--- a/tests/gem_seqno_wrap.c
+++ b/tests/gem_seqno_wrap.c
@@ -30,6 +30,7 @@
* boundary.
*/
+#include "igt.h"
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -41,15 +42,7 @@
#include <signal.h>
#include <errno.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_core.h"
-#include "igt_aux.h"
-#include "igt_debugfs.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Runs blitcopy -> rendercopy with multiple buffers over"
" wrap boundary.");
diff --git a/tests/gem_set_tiling_vs_blt.c b/tests/gem_set_tiling_vs_blt.c
index 956308a7..6ce5a142 100644
--- a/tests/gem_set_tiling_vs_blt.c
+++ b/tests/gem_set_tiling_vs_blt.c
@@ -44,6 +44,7 @@
* transitions (i.e. changing stride).
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -54,12 +55,7 @@
#include <sys/time.h>
#include <stdbool.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
IGT_TEST_DESCRIPTION("Check for proper synchronization of tiling changes vs."
" tiled gpu access.");
diff --git a/tests/gem_set_tiling_vs_gtt.c b/tests/gem_set_tiling_vs_gtt.c
index 006f50a0..4a3cba63 100644
--- a/tests/gem_set_tiling_vs_gtt.c
+++ b/tests/gem_set_tiling_vs_gtt.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,10 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Check set_tiling vs gtt mmap coherency.");
diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c
index a4bdc64f..4d208353 100644
--- a/tests/gem_set_tiling_vs_pwrite.c
+++ b/tests/gem_set_tiling_vs_pwrite.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,9 +36,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
IGT_TEST_DESCRIPTION("Check set_tiling vs pwrite coherency.");
diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c
index de553598..52335412 100644
--- a/tests/gem_storedw_batches_loop.c
+++ b/tests/gem_storedw_batches_loop.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
static drm_intel_bufmgr *bufmgr;
static drm_intel_bo *target_bo;
diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c
index e4ed35dd..ee2f518b 100644
--- a/tests/gem_storedw_loop.c
+++ b/tests/gem_storedw_loop.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic CS check using MI_STORE_DATA_IMM.");
diff --git a/tests/gem_storedw_loop_blt.c b/tests/gem_storedw_loop_blt.c
index 44e46a84..e463a27c 100644
--- a/tests/gem_storedw_loop_blt.c
+++ b/tests/gem_storedw_loop_blt.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic blitter MI check using MI_STORE_DATA_IMM.");
diff --git a/tests/gem_storedw_loop_bsd.c b/tests/gem_storedw_loop_bsd.c
index e534c16f..c9deb81b 100644
--- a/tests/gem_storedw_loop_bsd.c
+++ b/tests/gem_storedw_loop_bsd.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic bsd MI check using MI_STORE_DATA_IMM.");
diff --git a/tests/gem_storedw_loop_render.c b/tests/gem_storedw_loop_render.c
index 48fb6d4e..6d7a1fbb 100644
--- a/tests/gem_storedw_loop_render.c
+++ b/tests/gem_storedw_loop_render.c
@@ -26,6 +26,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic render MI check using MI_STORE_DATA_IMM.");
diff --git a/tests/gem_storedw_loop_vebox.c b/tests/gem_storedw_loop_vebox.c
index 8643dd39..3fec02ce 100644
--- a/tests/gem_storedw_loop_vebox.c
+++ b/tests/gem_storedw_loop_vebox.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,12 +35,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Basic vebox MI check using MI_STORE_DATA_IMM.");
diff --git a/tests/gem_streaming_writes.c b/tests/gem_streaming_writes.c
index 5d49e6f4..119f8b2e 100644
--- a/tests/gem_streaming_writes.c
+++ b/tests/gem_streaming_writes.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -37,11 +38,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_aux.h"
-#include "intel_chipset.h"
#define OBJECT_SIZE 1024*1024
#define CHUNK_SIZE 32
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index 472263d4..becb991f 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -49,6 +49,7 @@
* In short: designed for maximum evilness.
*/
+#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -61,13 +62,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("General gem coherency test.");
diff --git a/tests/gem_threaded_access_tiled.c b/tests/gem_threaded_access_tiled.c
index 16a50adb..d6a4840a 100644
--- a/tests/gem_threaded_access_tiled.c
+++ b/tests/gem_threaded_access_tiled.c
@@ -24,14 +24,13 @@
* Mika Kuoppala <mika.kuoppala@intel.com>
*/
+#include "igt.h"
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
-#include "drmtest.h"
-#include "ioctl_wrappers.h"
#include "intel_bufmgr.h"
IGT_TEST_DESCRIPTION("Check parallel access to tiled memory.");
diff --git a/tests/gem_tiled_blits.c b/tests/gem_tiled_blits.c
index 3fceb811..eb93f8dd 100644
--- a/tests/gem_tiled_blits.c
+++ b/tests/gem_tiled_blits.c
@@ -41,6 +41,7 @@
* resulted.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -52,11 +53,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test doing many tiled blits, with a working set larger"
" than the aperture size.");
diff --git a/tests/gem_tiled_fence_blits.c b/tests/gem_tiled_fence_blits.c
index 5dd5bbef..b35a960b 100644
--- a/tests/gem_tiled_fence_blits.c
+++ b/tests/gem_tiled_fence_blits.c
@@ -41,6 +41,7 @@
* resulted.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -52,13 +53,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
diff --git a/tests/gem_tiled_partial_pwrite_pread.c b/tests/gem_tiled_partial_pwrite_pread.c
index 8dea82e4..16d16c8c 100644
--- a/tests/gem_tiled_partial_pwrite_pread.c
+++ b/tests/gem_tiled_partial_pwrite_pread.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,11 +37,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test pwrite/pread consistency when touching partial"
" cachelines.");
diff --git a/tests/gem_tiled_pread_basic.c b/tests/gem_tiled_pread_basic.c
index fdc51733..4292e114 100644
--- a/tests/gem_tiled_pread_basic.c
+++ b/tests/gem_tiled_pread_basic.c
@@ -35,6 +35,7 @@
* other systems.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -45,10 +46,6 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Test pread behavior on tiled objects with respect to the"
diff --git a/tests/gem_tiled_pread_pwrite.c b/tests/gem_tiled_pread_pwrite.c
index 3d8fdc9f..66a87b22 100644
--- a/tests/gem_tiled_pread_pwrite.c
+++ b/tests/gem_tiled_pread_pwrite.c
@@ -44,6 +44,7 @@
* Note that this test will use swap in an effort to test all of ram.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -56,10 +57,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test swizzling by testing pwrite does the inverse of"
" pread.");
diff --git a/tests/gem_tiled_swapping.c b/tests/gem_tiled_swapping.c
index 072bf9a5..22593ed8 100644
--- a/tests/gem_tiled_swapping.c
+++ b/tests/gem_tiled_swapping.c
@@ -44,6 +44,7 @@
* This test obviously needs swap present (and exits if none is detected).
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -57,11 +58,6 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "igt_aux.h"
-#include "igt_debugfs.h"
IGT_TEST_DESCRIPTION("Exercise swizzle code for swapping.");
diff --git a/tests/gem_tiled_wb.c b/tests/gem_tiled_wb.c
index b6efd6ee..ea1e7a17 100644
--- a/tests/gem_tiled_wb.c
+++ b/tests/gem_tiled_wb.c
@@ -32,6 +32,7 @@
* to userspace, and that userspace has to respect the swizzle.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -42,10 +43,6 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.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/gem_tiled_wc.c b/tests/gem_tiled_wc.c
index b0f7a655..8c1e9bec 100644
--- a/tests/gem_tiled_wc.c
+++ b/tests/gem_tiled_wc.c
@@ -32,6 +32,7 @@
* to userspace, and that userspace has to respect the swizzle.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -42,10 +43,6 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#define WIDTH 512
#define HEIGHT 512
diff --git a/tests/gem_tiling_max_stride.c b/tests/gem_tiling_max_stride.c
index fce1ac7d..9ab5341d 100644
--- a/tests/gem_tiling_max_stride.c
+++ b/tests/gem_tiling_max_stride.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -36,10 +37,6 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Check that max fence stride works.");
diff --git a/tests/gem_unfence_active_buffers.c b/tests/gem_unfence_active_buffers.c
index 125568ed..d1692531 100644
--- a/tests/gem_unfence_active_buffers.c
+++ b/tests/gem_unfence_active_buffers.c
@@ -38,6 +38,7 @@
* problem - the race window is too small.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -48,12 +49,7 @@
#include <sys/time.h>
#include <stdbool.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Check for use-after-free in the fence stealing code.");
diff --git a/tests/gem_unref_active_buffers.c b/tests/gem_unref_active_buffers.c
index 8c8efaad..6478257c 100644
--- a/tests/gem_unref_active_buffers.c
+++ b/tests/gem_unref_active_buffers.c
@@ -32,6 +32,7 @@
* will be the last one to hold a reference on them. Usually libdrm bo caching
* prevents that by keeping another reference.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -41,12 +42,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Test unreferencing of active buffers.");
diff --git a/tests/gem_userptr_blits.c b/tests/gem_userptr_blits.c
index 1f2cc963..448a0ea2 100644
--- a/tests/gem_userptr_blits.c
+++ b/tests/gem_userptr_blits.c
@@ -36,6 +36,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -52,11 +53,7 @@
#include "drm.h"
#include "i915_drm.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "ioctl_wrappers.h"
#include "eviction_common.c"
diff --git a/tests/gem_wait.c b/tests/gem_wait.c
index a785b16e..32d05f8e 100644
--- a/tests/gem_wait.c
+++ b/tests/gem_wait.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
@@ -39,13 +40,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
#define MSEC_PER_SEC 1000L
#define USEC_PER_MSEC 1000L
diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
index f1da3ef6..3759c23a 100644
--- a/tests/gem_workarounds.c
+++ b/tests/gem_workarounds.c
@@ -26,6 +26,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -40,12 +41,6 @@
#include <time.h>
#include <signal.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_gt.h"
-#include "igt_aux.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
enum operation {
GPU_RESET = 0x01,
diff --git a/tests/gem_write_read_ring_switch.c b/tests/gem_write_read_ring_switch.c
index da579dac..5bc3dac3 100644
--- a/tests/gem_write_read_ring_switch.c
+++ b/tests/gem_write_read_ring_switch.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -36,12 +37,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_io.h"
#include "i830_reg.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Check read/write syncpoints when switching rings.");
diff --git a/tests/gen3_mixed_blits.c b/tests/gen3_mixed_blits.c
index 62039820..309a643a 100644
--- a/tests/gen3_mixed_blits.c
+++ b/tests/gen3_mixed_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -43,13 +44,8 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#include "i915_reg.h"
-#include "i915_3d.h"
#define WIDTH (512)
#define HEIGHT (512)
diff --git a/tests/gen3_render_linear_blits.c b/tests/gen3_render_linear_blits.c
index 5ed4c82a..4d864c20 100644
--- a/tests/gen3_render_linear_blits.c
+++ b/tests/gen3_render_linear_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -42,13 +43,8 @@
#include <sys/stat.h>
#include <sys/time.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#include "i915_reg.h"
-#include "i915_3d.h"
#define WIDTH 512
#define HEIGHT 512
diff --git a/tests/gen3_render_mixed_blits.c b/tests/gen3_render_mixed_blits.c
index 5e5e417d..1fcea1ad 100644
--- a/tests/gen3_render_mixed_blits.c
+++ b/tests/gen3_render_mixed_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -43,13 +44,8 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#include "i915_reg.h"
-#include "i915_3d.h"
#define WIDTH 512
#define HEIGHT 512
diff --git a/tests/gen3_render_tiledx_blits.c b/tests/gen3_render_tiledx_blits.c
index 4f309f7b..e72149b0 100644
--- a/tests/gen3_render_tiledx_blits.c
+++ b/tests/gen3_render_tiledx_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -43,13 +44,8 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#include "i915_reg.h"
-#include "i915_3d.h"
#define WIDTH 512
#define HEIGHT 512
diff --git a/tests/gen3_render_tiledy_blits.c b/tests/gen3_render_tiledy_blits.c
index 57ed9840..f0a07f4f 100644
--- a/tests/gen3_render_tiledy_blits.c
+++ b/tests/gen3_render_tiledy_blits.c
@@ -33,6 +33,7 @@
* The goal is to simply ensure the basics work.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -43,13 +44,8 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
#include "i915_reg.h"
-#include "i915_3d.h"
#define WIDTH 512
#define HEIGHT 512
diff --git a/tests/gen7_forcewake_mt.c b/tests/gen7_forcewake_mt.c
index 78730787..754c8435 100644
--- a/tests/gen7_forcewake_mt.c
+++ b/tests/gen7_forcewake_mt.c
@@ -30,16 +30,12 @@
*
*/
+#include "igt.h"
#include <sys/types.h>
#include <pthread.h>
#include <string.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "i915_pciids.h"
-#include "drmtest.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Exercise a suspect workaround required for"
" FORCEWAKE_MT.");
diff --git a/tests/kms_3d.c b/tests/kms_3d.c
index 76f0b25e..73b1f3eb 100644
--- a/tests/kms_3d.c
+++ b/tests/kms_3d.c
@@ -22,9 +22,7 @@
*
*/
-#include "igt_core.h"
-#include "igt_kms.h"
-#include "drmtest.h"
+#include "igt.h"
IGT_TEST_DESCRIPTION("Tests 3D mode setting.");
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index f10e12bc..38af334c 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,10 +36,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "drm_fourcc.h"
-#include "intel_chipset.h"
uint32_t gem_bo;
uint32_t gem_bo_small;
diff --git a/tests/kms_crtc_background_color.c b/tests/kms_crtc_background_color.c
index ec66e786..b09f55cc 100644
--- a/tests/kms_crtc_background_color.c
+++ b/tests/kms_crtc_background_color.c
@@ -22,12 +22,9 @@
*
*/
+#include "igt.h"
#include <math.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "igt_core.h"
IGT_TEST_DESCRIPTION("Test crtc background color feature");
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 98a91d94..1317fcca 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -22,17 +22,13 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION(
"Use the display CRC support to validate cursor plane functionality. "
diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c
index 9c730771..ba67c591 100644
--- a/tests/kms_draw_crc.c
+++ b/tests/kms_draw_crc.c
@@ -24,12 +24,7 @@
/* This program tests whether the igt_draw library actually works. */
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_draw.h"
-#include "igt_debugfs.h"
-#include "igt_fb.h"
-#include "igt_kms.h"
+#include "igt.h"
#define MAX_CONNECTORS 32
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 73b5170a..7b4a667a 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -22,18 +22,12 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
-#include "ioctl_wrappers.h"
IGT_TEST_DESCRIPTION(
"Performs various write operations to the scanout buffer while FBC is "
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index 7a494708..4970c895 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -24,15 +24,11 @@
*
*/
+#include "igt.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_debugfs.h"
-#include "igt_draw.h"
-#include "igt_kms.h"
IGT_TEST_DESCRIPTION("Test the relationship between fbcon and the frontbuffer "
"tracking infrastructure.");
diff --git a/tests/kms_fence_pin_leak.c b/tests/kms_fence_pin_leak.c
index 4d3d37a2..b9d600ec 100644
--- a/tests/kms_fence_pin_leak.c
+++ b/tests/kms_fence_pin_leak.c
@@ -22,18 +22,13 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Exercises full ppgtt fence pin_count leak in the "
"kernel.");
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 9a6e2d8a..93c4fbde 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -25,6 +25,7 @@
#include "config.h"
#endif
+#include "igt.h"
#include <cairo.h>
#include <errno.h>
#include <fcntl.h>
@@ -42,13 +43,6 @@
#include <time.h>
#include <pthread.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
-#include "igt_kms.h"
-#include "igt_aux.h"
-#include "igt_gt.h"
#define TEST_DPMS (1 << 0)
#define TEST_WITH_DUMMY_BCS (1 << 1)
diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
index 4e9f58a0..6b619f01 100644
--- a/tests/kms_flip_event_leak.c
+++ b/tests/kms_flip_event_leak.c
@@ -22,17 +22,12 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
-#include "ioctl_wrappers.h"
typedef struct {
int drm_fd;
diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
index c7fd4de2..2e277947 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -24,16 +24,12 @@
* Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "ioctl_wrappers.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Test page flips and tiling scenarios");
diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index 42aaa7f6..86d2d7f5 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -22,9 +22,7 @@
*
*/
-#include "igt_core.h"
-#include "igt_kms.h"
-#include "drmtest.h"
+#include "igt.h"
IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work"
" correctly.");
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 137ff40f..8f2fdbb7 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -24,19 +24,13 @@
*
*/
+#include "igt.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <poll.h>
#include <pthread.h>
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_draw.h"
-#include "igt_kms.h"
-#include "igt_debugfs.h"
-#include "intel_chipset.h"
-#include "ioctl_wrappers.h"
IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and "
"its related features: FBC and PSR");
diff --git a/tests/kms_legacy_colorkey.c b/tests/kms_legacy_colorkey.c
index a2fd85c2..0c24cfcc 100644
--- a/tests/kms_legacy_colorkey.c
+++ b/tests/kms_legacy_colorkey.c
@@ -21,11 +21,9 @@
* IN THE SOFTWARE.
*/
+#include "igt.h"
#include <errno.h>
-#include "drmtest.h"
-#include "igt_kms.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Check that the legacy set colorkey ioctl only works on sprite planes.");
diff --git a/tests/kms_mmio_vs_cs_flip.c b/tests/kms_mmio_vs_cs_flip.c
index 9e81dc15..dcaaa151 100644
--- a/tests/kms_mmio_vs_cs_flip.c
+++ b/tests/kms_mmio_vs_cs_flip.c
@@ -21,17 +21,13 @@
* IN THE SOFTWARE.
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
-#include "ioctl_wrappers.h"
typedef struct {
int drm_fd;
diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
index 2d079b46..a42a897c 100644
--- a/tests/kms_panel_fitting.c
+++ b/tests/kms_panel_fitting.c
@@ -22,14 +22,9 @@
*
*/
+#include "igt.h"
#include <math.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "igt_core.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test display panel fitting");
diff --git a/tests/kms_pipe_b_c_ivb.c b/tests/kms_pipe_b_c_ivb.c
index b6e234c1..f66e9c43 100644
--- a/tests/kms_pipe_b_c_ivb.c
+++ b/tests/kms_pipe_b_c_ivb.c
@@ -24,9 +24,7 @@
* Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
*/
-#include "drmtest.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
+#include "igt.h"
IGT_TEST_DESCRIPTION(
"Exercise the FDI lane bifurcation code for IVB in the kernel by setting"
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 2b69f688..33c83f03 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -22,16 +22,12 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_gt.h"
-#include "igt_kms.h"
-#include "igt_aux.h"
-#include "ioctl_wrappers.h"
typedef struct {
int drm_fd;
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 741d0b41..a6f40209 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -24,15 +24,12 @@
* Damien Lespiau <damien.lespiau@intel.com>
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "igt_aux.h"
typedef struct {
float red;
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 00db5cbf..61e2dbb2 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -22,14 +22,9 @@
*
*/
+#include "igt.h"
#include <math.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "igt_core.h"
-#include "intel_chipset.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION("Test display plane scaling");
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 1823a684..676dae17 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -22,19 +22,13 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "igt_aux.h"
bool running_with_psr_disabled;
diff --git a/tests/kms_pwrite_crc.c b/tests/kms_pwrite_crc.c
index 990866fb..a4fd5798 100644
--- a/tests/kms_pwrite_crc.c
+++ b/tests/kms_pwrite_crc.c
@@ -22,18 +22,13 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
-#include "ioctl_wrappers.h"
-#include "igt_aux.h"
IGT_TEST_DESCRIPTION(
"Use the display CRC support to validate pwrite to an already uncached future scanout buffer.");
diff --git a/tests/kms_render.c b/tests/kms_render.c
index 1759eaa3..8fefcf2e 100644
--- a/tests/kms_render.c
+++ b/tests/kms_render.c
@@ -24,19 +24,14 @@
#include "config.h"
#endif
+#include "igt.h"
#include <cairo.h>
#include <errno.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/time.h>
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "igt_kms.h"
-#include "ioctl_wrappers.h"
drmModeRes *resources;
int drm_fd;
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 3fd77c42..00a65c17 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -22,13 +22,9 @@
*
*/
+#include "igt.h"
#include <math.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "igt_core.h"
-#include "intel_chipset.h"
typedef struct {
int gfx_fd;
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 2c0fe456..feafc068 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "igt.h"
#include <cairo.h>
#include <errno.h>
#include <stdint.h>
@@ -31,11 +32,7 @@
#include <string.h>
#include <sys/time.h>
-#include "drmtest.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "igt_kms.h"
#define MAX_CONNECTORS 10
#define MAX_CRTCS 3
diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
index e4604040..b480a994 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -22,6 +22,7 @@
*
*/
+#include "igt.h"
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
@@ -30,9 +31,6 @@
#include "drm_fourcc.h"
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
#define CRC_BLACK "000000000000"
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 635cc792..481c6011 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -21,15 +21,12 @@
* IN THE SOFTWARE.
*/
+#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "drmtest.h"
-#include "igt_debugfs.h"
-#include "igt_kms.h"
-#include "intel_chipset.h"
typedef struct {
int drm_fd;
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 69461771..853cbdf7 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -26,6 +26,7 @@
* This is a test of performance of drmWaitVblank.
*/
+#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -39,15 +40,7 @@
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_aux.h"
-#include "igt_core.h"
-#include "igt_gt.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
IGT_TEST_DESCRIPTION("Test speed of WaitVblank.");
diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
index cff26947..bc1d417d 100644
--- a/tests/pm_backlight.c
+++ b/tests/pm_backlight.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -34,7 +35,6 @@
#include <unistd.h>
#include <time.h>
-#include "igt_core.h"
#define TOLERANCE 5 /* percent */
#define BACKLIGHT_PATH "/sys/class/backlight/intel_backlight"
diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c
index 3ed4c788..43444d80 100644
--- a/tests/pm_lpsp.c
+++ b/tests/pm_lpsp.c
@@ -24,15 +24,12 @@
*
*/
+#include "igt.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include "drmtest.h"
-#include "igt_kms.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
/* We know that if we don't enable audio runtime PM, snd_hda_intel will never
* release its power well refcount, and we'll never reach the LPSP sate. OTOH
diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index 9203d2fa..79091620 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -26,14 +26,13 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
-#include "drmtest.h"
-#include "intel_chipset.h"
#define SLEEP_DURATION 3000 // in milliseconds
#define CODE_TIME 50 // in microseconfs
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 7ae5806d..a3ffe58f 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -25,6 +25,7 @@
*
*/
+#include "igt.h"
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
@@ -42,14 +43,6 @@
#include <drm.h>
-#include "drmtest.h"
-#include "intel_batchbuffer.h"
-#include "intel_io.h"
-#include "intel_chipset.h"
-#include "ioctl_wrappers.h"
-#include "igt_aux.h"
-#include "igt_kms.h"
-#include "igt_gt.h"
#define MSR_PC8_RES 0x630
#define MSR_PC9_RES 0x631
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 697a154f..ccc67185 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -27,6 +27,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -37,13 +38,7 @@
#include <time.h>
#include <sys/wait.h>
-#include "drmtest.h"
-#include "intel_io.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "igt_gt.h"
-#include "ioctl_wrappers.h"
static int drm_fd;
diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c
index 320371f1..ca8bda3f 100644
--- a/tests/pm_sseu.c
+++ b/tests/pm_sseu.c
@@ -24,20 +24,14 @@
* Jeff McGee <jeff.mcgee@intel.com>
*/
+#include "igt.h"
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <time.h>
-#include "drmtest.h"
#include "i915_drm.h"
-#include "intel_io.h"
#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "ioctl_wrappers.h"
-#include "igt_debugfs.h"
-#include "media_spin.h"
IGT_TEST_DESCRIPTION("Tests slice/subslice/EU power gating functionality.\n");
diff --git a/tests/prime_nv_api.c b/tests/prime_nv_api.c
index 27760913..054a1ec6 100644
--- a/tests/prime_nv_api.c
+++ b/tests/prime_nv_api.c
@@ -8,6 +8,7 @@
test4 - export handle twice from intel, import into nouveau twice, check handle is the same
*/
+#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -16,10 +17,6 @@
#include "intel_bufmgr.h"
#include "nouveau.h"
-#include "intel_io.h"
-#include "intel_batchbuffer.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
#define BO_SIZE (256*1024)
diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c
index e02835ee..b5ceabf1 100644
--- a/tests/prime_nv_pcopy.c
+++ b/tests/prime_nv_pcopy.c
@@ -14,6 +14,7 @@
*/
+#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -23,13 +24,8 @@
#include <sys/ioctl.h>
#include <errno.h>
-#include "ioctl_wrappers.h"
#include "intel_bufmgr.h"
#include "nouveau.h"
-#include "intel_io.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
static int intel_fd = -1, nouveau_fd = -1;
static drm_intel_bufmgr *bufmgr;
diff --git a/tests/prime_nv_test.c b/tests/prime_nv_test.c
index dc9287ca..b4714dcb 100644
--- a/tests/prime_nv_test.c
+++ b/tests/prime_nv_test.c
@@ -14,6 +14,7 @@
*/
+#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -22,13 +23,8 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "ioctl_wrappers.h"
#include "intel_bufmgr.h"
#include "nouveau.h"
-#include "intel_io.h"
-#include "intel_batchbuffer.h"
-#include "intel_chipset.h"
-#include "drmtest.h"
int intel_fd = -1, nouveau_fd = -1;
drm_intel_bufmgr *bufmgr;
diff --git a/tests/prime_self_import.c b/tests/prime_self_import.c
index f114ad09..27dddf22 100644
--- a/tests/prime_self_import.c
+++ b/tests/prime_self_import.c
@@ -32,6 +32,7 @@
*/
#define _GNU_SOURCE
+#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -44,9 +45,6 @@
#include <pthread.h>
#include "drm.h"
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
-#include "igt_debugfs.h"
IGT_TEST_DESCRIPTION("Check whether prime import/export works on the same"
" device.");
diff --git a/tests/prime_udl.c b/tests/prime_udl.c
index b742f1cd..59f478f7 100644
--- a/tests/prime_udl.c
+++ b/tests/prime_udl.c
@@ -14,6 +14,7 @@
*/
+#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -26,12 +27,7 @@
#include "xf86drm.h"
#include <xf86drmMode.h>
-#include "ioctl_wrappers.h"
#include "intel_bufmgr.h"
-#include "intel_io.h"
-#include "intel_batchbuffer.h"
-#include "drmtest.h"
-#include "intel_chipset.h"
int intel_fd = -1, udl_fd = -1;
drm_intel_bufmgr *bufmgr;
diff --git a/tests/template.c b/tests/template.c
index 4b5794ba..9d7ea18d 100644
--- a/tests/template.c
+++ b/tests/template.c
@@ -24,7 +24,7 @@
*
*/
-#include "drmtest.h"
+#include "igt.h"
IGT_TEST_DESCRIPTION("Template test.");
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 9068a958..0994d510 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -49,6 +49,7 @@
#include "config.h"
#endif
+#include "igt.h"
#include <cairo.h>
#include <errno.h>
#include <getopt.h>
@@ -64,11 +65,7 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include "ioctl_wrappers.h"
-#include "drmtest.h"
#include "testdisplay.h"
-#include "igt_kms.h"
-#include "igt_core.h"
#include <stdlib.h>
#include <signal.h>
diff --git a/tests/testdisplay_hotplug.c b/tests/testdisplay_hotplug.c
index 0010a437..9d113999 100644
--- a/tests/testdisplay_hotplug.c
+++ b/tests/testdisplay_hotplug.c
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
*/
+#include "igt.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -32,7 +33,6 @@
#include "config.h"
#endif
-#include "igt_core.h"
#if HAVE_UDEV
#include <libudev.h>