@@ -53,8 +53,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.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"
@@ -28,16 +28,13 @@
#ifndef DRMTEST_H
#define DRMTEST_H
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#include <errno.h>
#include <stdbool.h>
+#include <stdint.h>
#include <sys/mman.h>
-#include "xf86drm.h"
-#include "xf86drmMode.h"
-#include "intel_batchbuffer.h"
+#include <xf86drm.h>
+#include <intel_batchbuffer.h>
#ifdef ANDROID
#ifndef HAVE_MMAP64
@@ -48,9 +48,9 @@
#include <sys/syscall.h>
#include <sys/utsname.h>
#include <termios.h>
+#include <errno.h>
#include "drmtest.h"
-#include "i915_drm.h"
#include "intel_chipset.h"
#include "intel_gpu_tools.h"
#include "igt_debugfs.h"
@@ -32,8 +32,10 @@
#include <setjmp.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <stdarg.h>
bool __igt_fixture(void);
void __igt_fixture_complete(void);
@@ -27,6 +27,7 @@
#include <sys/mount.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
@@ -23,14 +23,18 @@
*/
#define _GNU_SOURCE
+#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
+#include <stdlib.h>
#include <math.h>
#include <linux/kd.h>
-#include "drm_fourcc.h"
+#include <errno.h>
+
+#include <drm_fourcc.h>
#include "drmtest.h"
#include "igt_kms.h"
@@ -29,6 +29,8 @@
#include <stdint.h>
#include <cairo.h>
+#include <xf86drmMode.h>
+
#include "igt_display.h"
struct kmstest_connector_config {
@@ -47,6 +47,7 @@
#include <sys/syscall.h>
#include <sys/utsname.h>
#include <termios.h>
+#include <errno.h>
#include "drmtest.h"
#include "i915_drm.h"
@@ -27,6 +27,9 @@
#include <limits.h>
#include <sys/ioctl.h>
+#include <stdlib.h>
+#include <errno.h>
+
#include "drmtest.h"
/**
@@ -27,6 +27,11 @@
#include <limits.h>
#include <sys/ioctl.h>
+#include <sys/types.h>
+
+#include <drm.h>
+
+#include "igt_core.h"
#include "drmtest.h"
/**
@@ -31,6 +31,8 @@
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
@@ -27,6 +27,8 @@
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
@@ -33,9 +33,11 @@
#include <string.h>
#include <fcntl.h>
#include <inttypes.h>
+#include <errno.h>
+
#include <drm.h>
-#include "ioctl_wrappers.h"
+#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_chipset.h"
#include "intel_gpu_tools.h"
@@ -31,6 +31,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
+#include <errno.h>
#include "drmtest.h"
#include "ioctl_wrappers.h"
@@ -27,6 +27,8 @@
#include <stdio.h>
#include <string.h>
+#include <errno.h>
+
#include "ioctl_wrappers.h"
#include "drmtest.h"
@@ -41,6 +41,7 @@
#include <wordexp.h>
#include <getopt.h>
#include <signal.h>
+#include <errno.h>
#include "ioctl_wrappers.h"
#include "drmtest.h"
@@ -43,6 +43,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
+
#include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
@@ -29,6 +29,7 @@
#include <sys/wait.h>
#include <sys/types.h>
#include <assert.h>
+#include <errno.h>
#include "drmtest.h"
#include "igt_core.h"
@@ -29,6 +29,8 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
+
#include "drmtest.h"
#define SLEEP_DURATION 5000 // in milliseconds
@@ -30,6 +30,8 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
+
#include "drmtest.h"
#define SLEEP_DURATION 3000 // in milliseconds
@@ -34,6 +34,7 @@
#include <getopt.h>
#include <fcntl.h>
#include <signal.h>
+#include <errno.h>
#include "drmtest.h"
#include "intel_gpu_tools.h"
@@ -24,7 +24,8 @@
#include <errno.h>
#include "xf86drm.h"
-#include "xf86drmMode.h"
+#include <xf86drmMode.h>
+
#include "ioctl_wrappers.h"
#include "intel_bufmgr.h"
#include "intel_gpu_tools.h"
I've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- benchmarks/intel_upload_blit_large.c | 6 ++++-- lib/drmtest.h | 9 +++------ lib/igt_core.c | 2 +- lib/igt_core.h | 2 ++ lib/igt_debugfs.c | 1 + lib/igt_kms.c | 6 +++++- lib/igt_kms.h | 2 ++ lib/ioctl_wrappers.c | 1 + tests/core_getclient.c | 3 +++ tests/core_getstats.c | 5 +++++ tests/gem_ctx_bad_destroy.c | 2 ++ tests/gem_ctx_create.c | 2 ++ tests/gem_fenced_exec_thrash.c | 4 +++- tests/gem_flink_race.c | 1 + tests/gem_reg_read.c | 2 ++ tests/gem_seqno_wrap.c | 1 + tests/gem_vmap_blits.c | 1 + tests/igt_simulation.c | 1 + tests/pm_psr.c | 2 ++ tests/pm_rc6_residency.c | 2 ++ tests/pm_rps.c | 1 + tests/prime_udl.c | 3 ++- 22 files changed, 47 insertions(+), 12 deletions(-)