Commit 804e11f4 authored by Thomas Wood's avatar Thomas Wood

lib: add a single include header

Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: default avatarThomas Wood <thomas.wood@intel.com>
parent a11879a4
/*
* 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 */
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -44,8 +45,6 @@ ...@@ -44,8 +45,6 @@
#endif #endif
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
/* Checks whether the thread id is the current thread */ /* Checks whether the thread id is the current thread */
static bool static bool
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
* *
*/ */
#include "igt.h"
#include <limits.h> #include <limits.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "drmtest.h"
IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_CLIENT ioctl."); IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_CLIENT ioctl.");
......
...@@ -25,14 +25,13 @@ ...@@ -25,14 +25,13 @@
* *
*/ */
#include "igt.h"
#include <limits.h> #include <limits.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/types.h> #include <sys/types.h>
#include <drm.h> #include <drm.h>
#include "igt_core.h"
#include "drmtest.h"
/** /**
* Checks DRM_IOCTL_GET_STATS. * Checks DRM_IOCTL_GET_STATS.
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
* *
*/ */
#include "igt.h"
#include <string.h> #include <string.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include "drmtest.h"
IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_VERSION ioctl and libdrm's " IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_VERSION ioctl and libdrm's "
"drmGetVersion() interface to it."); "drmGetVersion() interface to it.");
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* Testcase: drmGetMagic() and drmAuthMagic() * Testcase: drmGetMagic() and drmAuthMagic()
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
...@@ -39,9 +40,6 @@ ...@@ -39,9 +40,6 @@
#include <sys/time.h> #include <sys/time.h>
#include <sys/poll.h> #include <sys/poll.h>
#include "drm.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."); IGT_TEST_DESCRIPTION("Call drmGetMagic() and drmAuthMagic() and see if it behaves.");
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include "igt.h"
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
...@@ -40,8 +41,6 @@ ...@@ -40,8 +41,6 @@
#include <unistd.h> #include <unistd.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include "igt_core.h"
#include "drmtest.h"
int fd; int fd;
drm_intel_bufmgr *bufmgr; drm_intel_bufmgr *bufmgr;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
* Testcase: boundary testing of read(drm_fd) * Testcase: boundary testing of read(drm_fd)
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
...@@ -43,9 +44,6 @@ ...@@ -43,9 +44,6 @@
#include <sys/time.h> #include <sys/time.h>
#include <sys/poll.h> #include <sys/poll.h>
#include "drm.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."); IGT_TEST_DESCRIPTION("Call read(drm) and see if it behaves.");
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch> * Daniel Vetter <daniel.vetter@ffwll.ch>
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -33,12 +34,7 @@ ...@@ -33,12 +34,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_io.h"
#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr; static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch> * Daniel Vetter <daniel.vetter@ffwll.ch>
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -33,12 +34,7 @@ ...@@ -33,12 +34,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_io.h"
#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr; static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch> * Daniel Vetter <daniel.vetter@ffwll.ch>
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -33,12 +34,7 @@ ...@@ -33,12 +34,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_io.h"
#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr; static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Daniel Vetter <daniel.vetter@ffwll.ch> * Daniel Vetter <daniel.vetter@ffwll.ch>
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -33,12 +34,7 @@ ...@@ -33,12 +34,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_io.h"
#include "intel_chipset.h"
static drm_intel_bufmgr *bufmgr; static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -25,12 +25,11 @@ ...@@ -25,12 +25,11 @@
* *
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <xf86drm.h> #include <xf86drm.h>
#include <i915_drm.h> #include <i915_drm.h>
#include "drmtest.h"
#include "intel_chipset.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
IGT_TEST_DESCRIPTION("Tests the export of parameters via DRM_IOCTL_I915_GETPARAM\n"); IGT_TEST_DESCRIPTION("Tests the export of parameters via DRM_IOCTL_I915_GETPARAM\n");
......
...@@ -26,16 +26,12 @@ ...@@ -26,16 +26,12 @@
* *
*/ */
#include "igt.h"
#include <limits.h> #include <limits.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.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 #ifndef I915_PARAM_CMD_PARSER_VERSION
#define I915_PARAM_CMD_PARSER_VERSION 28 #define I915_PARAM_CMD_PARSER_VERSION 28
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* *
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -38,10 +39,6 @@ ...@@ -38,10 +39,6 @@
#include <drm.h> #include <drm.h>
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "igt_gt.h"
#include "igt_aux.h"
#define OBJECT_SIZE (16*1024*1024) #define OBJECT_SIZE (16*1024*1024)
......
...@@ -27,10 +27,9 @@ ...@@ -27,10 +27,9 @@
* *
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include "drmtest.h"
#include "igt_aux.h"
struct igt_eviction_test_ops struct igt_eviction_test_ops
{ {
......
#include "igt.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
...@@ -5,7 +6,6 @@ ...@@ -5,7 +6,6 @@
#include <signal.h> #include <signal.h>
#include <i915_drm.h> #include <i915_drm.h>
#include "drmtest.h"
int main(void) int main(void)
{ {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* *
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -35,12 +36,7 @@ ...@@ -35,12 +36,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.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_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* *
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -35,12 +36,7 @@ ...@@ -35,12 +36,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_chipset.h"
#include "intel_io.h"
static drm_intel_bufmgr *bufmgr; static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
* resulted. * resulted.
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -50,12 +51,7 @@ ...@@ -50,12 +51,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
#include "intel_bufmgr.h" #include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_chipset.h"
#include "intel_io.h"
static drm_intel_bufmgr *bufmgr; static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch; struct intel_batchbuffer *batch;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* *
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -35,8 +36,6 @@ ...@@ -35,8 +36,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
IGT_TEST_DESCRIPTION("Test minimal bo_create and batchbuffer exec."); IGT_TEST_DESCRIPTION("Test minimal bo_create and batchbuffer exec.");
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* *
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
...@@ -37,10 +38,6 @@ ...@@ -37,10 +38,6 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/time.h> #include <sys/time.h>
#include "drm.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" IGT_TEST_DESCRIPTION("Simulates SNA behaviour using negative self-relocations"
" for STATE_BASE_ADDRESS command packets."); " for STATE_BASE_ADDRESS command packets.");
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* *
*/ */
#include "igt.h"
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -35,8 +36,6 @@ ...@@ -35,8 +36,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include "drm.h" #include "drm.h"
#include "ioctl_wrappers.h"
#include "drmtest.h"
static void static void
test_bad_close(int fd) test_bad_close(int fd)
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* *
*/ */
#include "igt.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -37,13 +38,7 @@ ...@@ -37,13 +38,7 @@
#include <drm.h> #include <drm.h>