And shovel all the various helpers in there.
Also move igt_set_vt_graphics_mode to igt_kms.h since the function is
implemented in igt_kms.c. And it fits better. I kinda missed this in
the prep work.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
igt_debugfs.h \
igt_display.c \
igt_display.h \
+ igt_aux.c \
+ igt_aux.h \
instdone.c \
instdone.h \
intel_batchbuffer.c \
return fd;
}
-
-/* signal interrupt helpers */
-static struct igt_helper_process signal_helper;
-long long int sig_stat;
-static void __attribute__((noreturn)) signal_helper_process(pid_t pid)
-{
- /* Interrupt the parent process at 500Hz, just to be annoying */
- while (1) {
- usleep(1000 * 1000 / 500);
- if (kill(pid, SIGUSR1)) /* Parent has died, so must we. */
- exit(0);
- }
-}
-
-static void sig_handler(int i)
-{
- sig_stat++;
-}
-
-void igt_fork_signal_helper(void)
-{
- if (igt_only_list_subtests())
- return;
-
- signal(SIGUSR1, sig_handler);
-
- igt_fork_helper(&signal_helper) {
- signal_helper_process(getppid());
- }
-}
-
-void igt_stop_signal_helper(void)
-{
- if (igt_only_list_subtests())
- return;
-
- igt_stop_helper(&signal_helper);
-
- sig_stat = 0;
-}
-
-bool igt_env_set(const char *env_var, bool default_value)
-{
- char *val;
-
- val = getenv(env_var);
- if (!val)
- return default_value;
-
- return atoi(val) != 0;
-}
-
-bool igt_aub_dump_enabled(void)
-{
- static int dump_aub = -1;
-
- if (dump_aub == -1)
- dump_aub = igt_env_set("IGT_DUMP_AUB", false);
-
- return dump_aub;
-}
-
-/* other helpers */
-void igt_exchange_int(void *array, unsigned i, unsigned j)
-{
- int *int_arr, tmp;
- int_arr = array;
-
- tmp = int_arr[i];
- int_arr[i] = int_arr[j];
- int_arr[j] = tmp;
-}
-
-void igt_permute_array(void *array, unsigned size,
- void (*exchange_func)(void *array,
- unsigned i,
- unsigned j))
-{
- int i;
-
- for (i = size - 1; i > 1; i--) {
- /* yes, not perfectly uniform, who cares */
- long l = random() % (i +1);
- if (i != l)
- exchange_func(array, i, l);
- }
-}
-
-void igt_progress(const char *header, uint64_t i, uint64_t total)
-{
- int divider = 200;
-
- if (!isatty(fileno(stderr)))
- return;
-
- if (i+1 >= total) {
- fprintf(stderr, "\r%s100%%\n", header);
- return;
- }
-
- if (total / 200 == 0)
- divider = 1;
-
- /* only bother updating about every 0.5% */
- if (i % (total / divider) == 0 || i+1 >= total) {
- fprintf(stderr, "\r%s%3llu%%", header,
- (long long unsigned) i * 100 / total);
- }
-}
-
-/* mappable aperture trasher helper */
-drm_intel_bo **trash_bos;
-int num_trash_bos;
-
-void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr)
-{
- int i;
-
- num_trash_bos = gem_mappable_aperture_size() / (1024*1024);
-
- trash_bos = malloc(num_trash_bos * sizeof(drm_intel_bo *));
- igt_assert(trash_bos);
-
- for (i = 0; i < num_trash_bos; i++)
- trash_bos[i] = drm_intel_bo_alloc(bufmgr, "trash bo", 1024*1024, 4096);
-}
-
-void igt_trash_aperture(void)
-{
- int i;
- uint8_t *gtt_ptr;
-
- for (i = 0; i < num_trash_bos; i++) {
- drm_intel_gem_bo_map_gtt(trash_bos[i]);
- gtt_ptr = trash_bos[i]->virtual;
- *gtt_ptr = 0;
- drm_intel_gem_bo_unmap_gtt(trash_bos[i]);
- }
-}
-
-void igt_cleanup_aperture_trashers(void)
-{
- int i;
-
- for (i = 0; i < num_trash_bos; i++)
- drm_intel_bo_unreference(trash_bos[i]);
-
- free(trash_bos);
-}
-
-void igt_system_suspend_autoresume(void)
-{
- int ret;
-
- /* FIXME: Simulation doesn't like suspend/resume, and not even a lighter
- * approach using /sys/power/pm_test to just test our driver's callbacks
- * seems to fare better. We need to investigate what's going on. */
- igt_skip_on_simulation();
-
- ret = system("rtcwake -s 30 -m mem");
- igt_assert(ret == 0);
-}
-
-void igt_drop_root(void)
-{
- igt_assert(getuid() == 0);
-
- igt_assert(setgid(2) == 0);
- igt_assert(setuid(2) == 0);
-
- igt_assert(getgid() == 2);
- igt_assert(getuid() == 2);
-}
-
-void igt_wait_for_keypress(void)
-{
- struct termios oldt, newt;
-
- if (!isatty(STDIN_FILENO))
- return;
-
- tcgetattr ( STDIN_FILENO, &oldt );
- newt = oldt;
- newt.c_lflag &= ~( ICANON | ECHO );
- tcsetattr ( STDIN_FILENO, TCSANOW, &newt );
- getchar();
- tcsetattr ( STDIN_FILENO, TCSANOW, &oldt );
-}
#include <sys/mman.h>
#include <xf86drm.h>
-#include <intel_batchbuffer.h>
+
+#include "intel_batchbuffer.h"
#ifdef ANDROID
#ifndef HAVE_MMAP64
void gem_quiescent_gpu(int fd);
-/* generally useful helpers */
-void igt_fork_signal_helper(void);
-void igt_stop_signal_helper(void);
-void igt_exchange_int(void *array, unsigned i, unsigned j);
-void igt_permute_array(void *array, unsigned size,
- void (*exchange_func)(void *array,
- unsigned i,
- unsigned j));
-void igt_progress(const char *header, uint64_t i, uint64_t total);
-bool igt_env_set(const char *env_var, bool default_value);
-
-bool igt_aub_dump_enabled(void);
-
-/* helpers based upon the libdrm buffer manager */
-void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
-void igt_trash_aperture(void);
-void igt_cleanup_aperture_trashers(void);
-
#define do_or_die(x) igt_assert((x) == 0)
#define do_ioctl(fd, ptr, sz) igt_assert(drmIoctl((fd), (ptr), (sz)) == 0)
-/* set vt into graphics mode, required to prevent fbcon from interfering */
-void igt_set_vt_graphics_mode(void);
-
-/* suspend and auto-resume system */
-void igt_system_suspend_autoresume(void);
-
-/* dropping priviledges */
-void igt_drop_root(void);
-
-void igt_wait_for_keypress(void);
-
-/* sysinfo cross-arch wrappers from intel_os.c */
-uint64_t intel_get_total_ram_mb(void);
-uint64_t intel_get_total_swap_mb(void);
-
#endif /* DRMTEST_H */
--- /dev/null
+/*
+ * Copyright © 2007, 2011, 2013, 2014 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.
+ *
+ * Authors:
+ * Eric Anholt <eric@anholt.net>
+ * Daniel Vetter <daniel.vetter@ffwll.ch>
+ *
+ */
+
+#ifndef ANDROID
+#define _GNU_SOURCE
+#else
+#include <libgen.h>
+#endif
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <signal.h>
+#include <pciaccess.h>
+#include <getopt.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <sys/utsname.h>
+#include <termios.h>
+
+#include "drmtest.h"
+#include "i915_drm.h"
+#include "intel_chipset.h"
+#include "igt_aux.h"
+#include "igt_debugfs.h"
+#include "../version.h"
+#include "config.h"
+#include "intel_reg.h"
+#include "ioctl_wrappers.h"
+
+
+
+/* signal interrupt helpers */
+static struct igt_helper_process signal_helper;
+long long int sig_stat;
+static void __attribute__((noreturn)) signal_helper_process(pid_t pid)
+{
+ /* Interrupt the parent process at 500Hz, just to be annoying */
+ while (1) {
+ usleep(1000 * 1000 / 500);
+ if (kill(pid, SIGUSR1)) /* Parent has died, so must we. */
+ exit(0);
+ }
+}
+
+static void sig_handler(int i)
+{
+ sig_stat++;
+}
+
+void igt_fork_signal_helper(void)
+{
+ if (igt_only_list_subtests())
+ return;
+
+ signal(SIGUSR1, sig_handler);
+
+ igt_fork_helper(&signal_helper) {
+ signal_helper_process(getppid());
+ }
+}
+
+void igt_stop_signal_helper(void)
+{
+ if (igt_only_list_subtests())
+ return;
+
+ igt_stop_helper(&signal_helper);
+
+ sig_stat = 0;
+}
+
+bool igt_env_set(const char *env_var, bool default_value)
+{
+ char *val;
+
+ val = getenv(env_var);
+ if (!val)
+ return default_value;
+
+ return atoi(val) != 0;
+}
+
+bool igt_aub_dump_enabled(void)
+{
+ static int dump_aub = -1;
+
+ if (dump_aub == -1)
+ dump_aub = igt_env_set("IGT_DUMP_AUB", false);
+
+ return dump_aub;
+}
+
+/* other helpers */
+void igt_exchange_int(void *array, unsigned i, unsigned j)
+{
+ int *int_arr, tmp;
+ int_arr = array;
+
+ tmp = int_arr[i];
+ int_arr[i] = int_arr[j];
+ int_arr[j] = tmp;
+}
+
+void igt_permute_array(void *array, unsigned size,
+ void (*exchange_func)(void *array,
+ unsigned i,
+ unsigned j))
+{
+ int i;
+
+ for (i = size - 1; i > 1; i--) {
+ /* yes, not perfectly uniform, who cares */
+ long l = random() % (i +1);
+ if (i != l)
+ exchange_func(array, i, l);
+ }
+}
+
+void igt_progress(const char *header, uint64_t i, uint64_t total)
+{
+ int divider = 200;
+
+ if (!isatty(fileno(stderr)))
+ return;
+
+ if (i+1 >= total) {
+ fprintf(stderr, "\r%s100%%\n", header);
+ return;
+ }
+
+ if (total / 200 == 0)
+ divider = 1;
+
+ /* only bother updating about every 0.5% */
+ if (i % (total / divider) == 0 || i+1 >= total) {
+ fprintf(stderr, "\r%s%3llu%%", header,
+ (long long unsigned) i * 100 / total);
+ }
+}
+
+/* mappable aperture trasher helper */
+drm_intel_bo **trash_bos;
+int num_trash_bos;
+
+void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr)
+{
+ int i;
+
+ num_trash_bos = gem_mappable_aperture_size() / (1024*1024);
+
+ trash_bos = malloc(num_trash_bos * sizeof(drm_intel_bo *));
+ igt_assert(trash_bos);
+
+ for (i = 0; i < num_trash_bos; i++)
+ trash_bos[i] = drm_intel_bo_alloc(bufmgr, "trash bo", 1024*1024, 4096);
+}
+
+void igt_trash_aperture(void)
+{
+ int i;
+ uint8_t *gtt_ptr;
+
+ for (i = 0; i < num_trash_bos; i++) {
+ drm_intel_gem_bo_map_gtt(trash_bos[i]);
+ gtt_ptr = trash_bos[i]->virtual;
+ *gtt_ptr = 0;
+ drm_intel_gem_bo_unmap_gtt(trash_bos[i]);
+ }
+}
+
+void igt_cleanup_aperture_trashers(void)
+{
+ int i;
+
+ for (i = 0; i < num_trash_bos; i++)
+ drm_intel_bo_unreference(trash_bos[i]);
+
+ free(trash_bos);
+}
+
+void igt_system_suspend_autoresume(void)
+{
+ int ret;
+
+ /* FIXME: Simulation doesn't like suspend/resume, and not even a lighter
+ * approach using /sys/power/pm_test to just test our driver's callbacks
+ * seems to fare better. We need to investigate what's going on. */
+ igt_skip_on_simulation();
+
+ ret = system("rtcwake -s 30 -m mem");
+ igt_assert(ret == 0);
+}
+
+void igt_drop_root(void)
+{
+ igt_assert(getuid() == 0);
+
+ igt_assert(setgid(2) == 0);
+ igt_assert(setuid(2) == 0);
+
+ igt_assert(getgid() == 2);
+ igt_assert(getuid() == 2);
+}
+
+void igt_wait_for_keypress(void)
+{
+ struct termios oldt, newt;
+
+ if (!isatty(STDIN_FILENO))
+ return;
+
+ tcgetattr ( STDIN_FILENO, &oldt );
+ newt = oldt;
+ newt.c_lflag &= ~( ICANON | ECHO );
+ tcsetattr ( STDIN_FILENO, TCSANOW, &newt );
+ getchar();
+ tcsetattr ( STDIN_FILENO, TCSANOW, &oldt );
+}
--- /dev/null
+/*
+ * Copyright © 2014 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.
+ *
+ * Authors:
+ * Daniel Vetter <daniel.vetter@ffwll.ch>
+ *
+ */
+
+#ifndef IGT_AUX_H
+#define IGT_AUX_H
+
+#include <intel_bufmgr.h>
+
+/* auxialiary igt helpers from igt_aux.c */
+/* generally useful helpers */
+void igt_fork_signal_helper(void);
+void igt_stop_signal_helper(void);
+void igt_exchange_int(void *array, unsigned i, unsigned j);
+void igt_permute_array(void *array, unsigned size,
+ void (*exchange_func)(void *array,
+ unsigned i,
+ unsigned j));
+void igt_progress(const char *header, uint64_t i, uint64_t total);
+bool igt_env_set(const char *env_var, bool default_value);
+
+bool igt_aub_dump_enabled(void);
+
+/* helpers based upon the libdrm buffer manager */
+void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
+void igt_trash_aperture(void);
+void igt_cleanup_aperture_trashers(void);
+
+/* suspend and auto-resume system */
+void igt_system_suspend_autoresume(void);
+
+/* dropping priviledges */
+void igt_drop_root(void);
+
+void igt_wait_for_keypress(void);
+
+/* sysinfo cross-arch wrappers from intel_os.c */
+
+/* These are separate to allow easier testing when porting, see the comment at
+ * the bottom of intel_os.c. */
+uint64_t intel_get_total_ram_mb(void);
+uint64_t intel_get_total_swap_mb(void);
+
+#endif /* IGT_AUX_H */
#include "config.h"
#include "igt_core.h"
+#include "igt_aux.h"
/**
* SECTION:igt_core
#include "drmtest.h"
#include "igt_kms.h"
+#include "igt_aux.h"
#include "ioctl_wrappers.h"
/* helpers to create nice-looking framebuffers */
igt_pipe_t pipes[I915_MAX_PIPES];
};
+/* set vt into graphics mode, required to prevent fbcon from interfering */
+void igt_set_vt_graphics_mode(void);
+
void igt_display_init(igt_display_t *display, int drm_fd);
void igt_display_fini(igt_display_t *display);
int igt_display_commit(igt_display_t *display);
#endif
#include "intel_io.h"
-#include "i915_drm.h"
#include "drmtest.h"
+#include "igt_aux.h"
uint64_t
intel_get_total_ram_mb(void)
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-#include "drm.h"
-#include "i915_drm.h"
+
+#include <drm.h>
+#include <i915_drm.h>
+
#include "drmtest.h"
#include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "rendercopy.h"
#include "gen8_render.h"
#include "intel_reg.h"
+#include "igt_aux.h"
#include <intel_aub.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "igt_debugfs.h"
+#include "igt_aux.h"
#define OBJECT_SIZE (16*1024*1024)
#include <stdlib.h>
#include "drmtest.h"
+#include "igt_aux.h"
struct igt_eviction_test_ops
{
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
/*
* Testcase: snoop consistency when touching partial cachelines
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
-#include "drm.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"
+#include "igt_aux.h"
static void
prw_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height)
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
static uint32_t use_blt;
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define LOCAL_I915_EXEC_VEBOX (4<<0)
#define BATCH_SIZE (1024*1024)
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
+#include "igt_aux.h"
struct local_drm_i915_gem_context_destroy {
__u32 ctx_id;
struct local_drm_i915_gem_context_destroy destroy;
destroy.ctx_id = ctx_id;
do_ioctl(fd, CONTEXT_DESTROY_IOCTL, &destroy);
+#include "igt_aux.h"
}
/* Copied from gem_exec_nop.c */
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_chipset.h"
+#include "igt_aux.h"
#define HEIGHT 256
#define WIDTH 1024
#include <sys/time.h>
#include <fcntl.h>
#include <limits.h>
+
#include "drmtest.h"
#include "ioctl_wrappers.h"
+#include "igt_aux.h"
#define FD_ARR_SZ 100
#include "drmtest.h"
#include "intel_chipset.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define WIDTH 1024
#define HEIGHT 1024
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "intel_chipset.h"
#include "drmtest.h"
-#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define WIDTH 512
#define HEIGHT 512
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
/*
* Testcase: pwrite/pread consistency when touching partial cachelines
#include <sys/time.h>
#include <signal.h>
#include <sys/wait.h>
-#include "drm.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"
#include "igt_debugfs.h"
+#include "igt_aux.h"
/*
* Testcase: Persistent relocations as used by uxa/libva
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_chipset.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define COPY_BLT_CMD (2<<29|0x53<<22|0x6)
#define BLT_WRITE_ALPHA (1<<21)
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
#include <sys/time.h>
#include <signal.h>
#include <sys/wait.h>
-#include "drm.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 "igt_debugfs.h"
+#include "igt_aux.h"
/*
* Testcase: Kernel relocations vs. gpu races
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-#include "drm.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"
+#include "igt_aux.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-#include "drm.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"
+#include "igt_aux.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-#include "drm.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"
+#include "igt_aux.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "igt_debugfs.h"
-#include "intel_bufmgr.h"
#include "intel_chipset.h"
-#include "intel_batchbuffer.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define RS_NO_ERROR 0
#define RS_BATCH_ACTIVE (1 << 0)
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
struct bo {
const char *ring;
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "igt_core.h"
+#include "igt_aux.h"
#include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_io.h"
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-#include "drm.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"
+#include "igt_aux.h"
#define CMD_POLY_STIPPLE_OFFSET 0x7906
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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 "igt_aux.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
/*
* Testcase: pwrite/pread consistency when touching partial cachelines
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define WIDTH 512
#define HEIGHT 512
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+
+#include <drm.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_io.h"
+#include "igt_aux.h"
#define WIDTH 512
#define HEIGHT 512
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-#include "drm.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"
+#include "igt_aux.h"
#define MSEC_PER_SEC 1000L
#define USEC_PER_MSEC 1000L
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.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"
+#include "igt_aux.h"
#define LOCAL_I915_EXEC_VEBOX (4<<0)
*/
#include "drmtest.h"
+#include "igt_aux.h"
int main(int argc, char **argv)
{
#include "intel_chipset.h"
#include "intel_batchbuffer.h"
#include "igt_kms.h"
+#include "igt_aux.h"
#define TEST_DPMS (1 << 0)
#define TEST_WITH_DUMMY_BCS (1 << 1)