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: 's 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 @@
*/
#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
......
......@@ -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.");
......
......@@ -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.
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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;
......
......@@ -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.");
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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");
......
......@@ -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
......
......@@ -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)
......
......@@ -27,10 +27,9 @@
*
*/
#include "igt.h"
#include <stdlib.h>
#include "drmtest.h"
#include "igt_aux.h"
struct igt_eviction_test_ops
{
......
#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)
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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)
......
......@@ -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.");
......
......@@ -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)
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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;
......
......@@ -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.");
......
......@@ -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.");
......
......@@ -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");
......
......@@ -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;
......
......@@ -25,6 +25,7 @@
*
*/
#include "igt.h"
#include <stdlib.h>