@@ -39,7 +39,7 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/poll.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Call drmGetMagic() and drmAuthMagic() and see if it behaves.");
@@ -44,7 +44,7 @@
# include <pthread.h>
#endif
-#include "drm.h"
+#include <drm.h>
/* Checks whether the thread id is the current thread */
static bool
@@ -25,12 +25,13 @@
*
*/
-#include "igt.h"
#include <limits.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <errno.h>
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Tests the DRM_IOCTL_GET_CLIENT ioctl.");
@@ -25,22 +25,21 @@
*/
#define _GNU_SOURCE
-#include "igt.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <libdrm/drm.h>
-#include <libdrm/i915_drm.h>
#include <xf86drm.h>
-#include <intel_bufmgr.h>
#include <errno.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/syscall.h>
+#include "igt.h"
+#include "intel_drm_stubs.h"
+
int fd;
drm_intel_bufmgr *bufmgr;
@@ -29,7 +29,6 @@
* Testcase: boundary testing of read(drm_fd)
*/
-#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -43,7 +42,9 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/poll.h>
-#include "drm.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Call read(drm) and see if it behaves.");
@@ -24,7 +24,6 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,8 +32,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -24,7 +24,6 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,8 +32,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -24,7 +24,6 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,8 +32,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -24,7 +24,6 @@
* Daniel Vetter <daniel.vetter@ffwll.ch>
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -33,8 +32,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -25,12 +25,12 @@
*
*/
-#include "igt.h"
#include <unistd.h>
#include <errno.h>
#include <xf86drm.h>
-#include <i915_drm.h>
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Tests the export of parameters via DRM_IOCTL_I915_GETPARAM\n");
@@ -1,11 +1,11 @@
-#include "igt.h"
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
-#include <i915_drm.h>
+#include "igt.h"
+#include "intel_drm_stubs.h"
int main(void)
{
@@ -26,7 +26,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,8 +34,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -26,7 +26,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,8 +34,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -41,7 +41,6 @@
* resulted.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -50,8 +49,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Test minimal bo_create and batchbuffer exec.");
@@ -37,7 +37,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Simulates SNA behaviour using negative self-relocations"
" for STATE_BASE_ADDRESS command packets.");
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
static void
test_bad_close(int fd)
@@ -26,7 +26,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,10 +34,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test snoop consistency when touching partial"
" cachelines.");
@@ -40,7 +40,7 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/syscall.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE (256 * 1024)
@@ -35,7 +35,6 @@
* Based on gem_gtt_concurrent_blt.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -46,10 +45,10 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test of pread/pwrite/mmap behavior when writing to active"
" buffers.");
@@ -45,7 +45,6 @@
* GPU will hang.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -57,7 +56,8 @@
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test the relocations through the CPU domain.");
@@ -47,15 +47,15 @@
#include <drm.h>
+
+#include "igt.h"
#include "ioctl_wrappers.h"
-#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
+#include "intel_drm_stubs.h"
#include "intel_io.h"
#include "intel_chipset.h"
#include "igt_aux.h"
#include "drmtest.h"
-#include "drm.h"
-#include "i915_drm.h"
+
IGT_TEST_DESCRIPTION("This is a test for the extended & old gem_create ioctl,"
" that includes allocation of object from stolen memory"
@@ -42,7 +42,8 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+
+#include <drm.h>
IGT_TEST_DESCRIPTION("Test that context cannot be submitted to unsupported"
" rings.");
@@ -29,7 +29,6 @@
* This test is useful for finding memory and refcount leaks.
*/
-#include "igt.h"
#include <pthread.h>
#include <stdlib.h>
#include <sys/ioctl.h>
@@ -40,8 +39,11 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
+
IGT_TEST_DESCRIPTION("Basic test for memory and refcount leaks.");
@@ -25,7 +25,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,8 +33,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
#include "i830_reg.h"
static drm_intel_bufmgr *bufmgr;
@@ -42,7 +42,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#include "eviction_common.c"
@@ -25,7 +25,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,8 +33,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
/* Testcase: Test whether the kernel rejects relocations with non-gpu domains
*
@@ -44,7 +44,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Run a large nop batch to stress test the error capture"
" code.");
@@ -37,7 +37,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 16384
@@ -37,7 +37,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
/* Testcase: Submit patches with relocations in memory that will fault
*
@@ -36,7 +36,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
" interface.");
@@ -38,7 +38,7 @@
#include <sys/ioctl.h>
#include <sys/time.h>
#include <time.h>
-#include "drm.h"
+#include <drm.h>
#define LOCAL_I915_EXEC_NO_RELOC (1<<11)
#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12)
@@ -37,7 +37,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#define LOCAL_I915_EXEC_VEBOX (4<<0)
@@ -41,7 +41,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <pthread.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE (128*1024) /* restricted to 1MiB alignment on i915 fences */
@@ -29,7 +29,6 @@
#include "config.h"
#endif
-#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -39,8 +38,10 @@
#include <errno.h>
#include <sys/time.h>
#include <pthread.h>
-#include "drm.h"
-#include "i915_drm.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define OBJECT_SIZE (1024*1024) /* restricted to 1MiB alignment on i915 fences */
@@ -34,7 +34,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
static void
test_flink(int fd)
@@ -25,7 +25,6 @@
*/
#define _GNU_SOURCE
-#include "igt.h"
#include <sys/ioctl.h>
#include <stdlib.h>
#include <string.h>
@@ -34,7 +33,8 @@
#include <pthread.h>
#include <errno.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Check for flink/open vs. gem close races.");
@@ -30,7 +30,6 @@
* workload for the GPGPU pipeline.
*/
-#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -42,8 +41,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define WIDTH 64
#define HEIGHT 64
@@ -40,7 +40,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Check whether gtt tlbs for cpu access are correctly"
" invalidated.");
@@ -38,7 +38,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 16384
@@ -26,7 +26,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,8 +34,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -25,7 +25,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -34,8 +33,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Provoke the hangcheck timer on an otherwise idle"
" system.");
@@ -34,7 +34,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
/* Should take 64 pages to store the page pointers on 64 bit */
#define OBJ_SIZE (128 * 1024 * 1024)
@@ -36,7 +36,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
" interface.");
@@ -35,8 +35,7 @@
#include <errno.h>
#include <setjmp.h>
#include <signal.h>
-
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use"
" purged bo.");
@@ -30,7 +30,6 @@
* workload for the Media pipeline.
*/
-#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -42,8 +41,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Basic test for the media_fill() function, a very simple"
" workload for the Media pipeline.");
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 16384
#define PAGE_SIZE 4096
@@ -37,7 +37,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Checks whether the kernel handles mmap offset exhaustion"
" correctly.");
@@ -37,7 +37,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
struct local_i915_gem_mmap_v2 {
uint32_t handle;
@@ -34,9 +34,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+
#include "i830_reg.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Basic check of non-secure batches.");
@@ -34,7 +34,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
@@ -37,7 +37,6 @@
#include <sys/time.h>
#include <signal.h>
#include <sys/wait.h>
-
#include <drm.h>
@@ -36,7 +36,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
@@ -31,7 +31,6 @@
* 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,8 +39,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test (TLB-)Coherency of pipe_control QW writes.");
@@ -21,7 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -33,11 +32,12 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
#include "igt_debugfs.h"
+#include "intel_drm_stubs.h"
+
#define WIDTH 512
#define STRIDE (WIDTH*4)
@@ -37,7 +37,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 16384
#define LARGE_OBJECT_SIZE 1024 * 1024
@@ -43,7 +43,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
@@ -37,7 +37,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 16384
@@ -25,7 +25,6 @@
*
*/
-#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -37,8 +36,10 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define OBJECT_SIZE 16384
@@ -34,7 +34,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION(
"pwrite to a snooped bo then make it uncached and check that the GPU sees the data.");
@@ -26,7 +26,6 @@
* 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>
@@ -37,10 +36,10 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test speed of concurrent reads between engines.");
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 16384
@@ -43,7 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Check that kernel relocation overflows are caught.");
@@ -37,7 +37,6 @@
#include <sys/time.h>
#include <signal.h>
#include <sys/wait.h>
-
#include <drm.h>
@@ -29,7 +29,6 @@
* workload for the 3D engine.
*/
-#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <cairo.h>
@@ -42,10 +41,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Basic test for the render_copy() function.");
@@ -32,7 +32,6 @@
* the execbuffer interface with a simple render workload.
*/
-#include "igt.h"
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
@@ -44,10 +43,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Advanced test for the render_copy() function.");
@@ -111,7 +110,7 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
static void scratch_buf_fini(data_t *data, struct igt_buf *buf)
{
- dri_bo_unreference(buf->bo);
+ drm_intel_bo_unreference(buf->bo);
memset(buf, 0, sizeof(*buf));
}
@@ -37,7 +37,6 @@
#include "config.h"
#endif
-#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -47,10 +46,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
@@ -33,7 +33,6 @@
* The goal is to simply ensure the basics work.
*/
-#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -43,10 +42,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define WIDTH 512
#define STRIDE (WIDTH*4)
@@ -30,7 +30,6 @@
* Collection of tests targeting request retirement code paths.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -43,11 +42,10 @@
#include <signal.h>
#include <pthread.h>
#include <time.h>
+#include <drm.h>
-#include "drm.h"
-#include "i915_drm.h"
-
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Collection of tests targeting request retirement code"
" paths.");
@@ -30,7 +30,6 @@
* boundary.
*/
-#include "igt.h"
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -42,7 +41,8 @@
#include <signal.h>
#include <errno.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Runs blitcopy -> rendercopy with multiple buffers over"
" wrap boundary.");
@@ -44,7 +44,6 @@
* transitions (i.e. changing stride).
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -54,8 +53,10 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <stdbool.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Check for proper synchronization of tiling changes vs."
" tiled gpu access.");
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Check set_tiling vs gtt mmap coherency.");
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Check set_tiling vs pwrite coherency.");
@@ -44,18 +44,16 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <getopt.h>
-
#include <drm.h>
-#include "ioctl_wrappers.h"
-#include "intel_bufmgr.h"
-#include "intel_batchbuffer.h"
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_aux.h"
+#include "intel_drm_stubs.h"
#include "intel_io.h"
#include "intel_chipset.h"
-#include "igt_aux.h"
-#include "drmtest.h"
-#include "drm.h"
-#include "i915_drm.h"
+#include "ioctl_wrappers.h"
+
IGT_TEST_DESCRIPTION("This test verifies the exetended gem_create ioctl,"
" that includes allocation of obj from stolen region");
@@ -26,7 +26,6 @@
*
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -35,8 +34,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
static drm_intel_bo *target_bo;
@@ -35,7 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Basic CS check using MI_STORE_DATA_IMM.");
@@ -37,7 +37,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#define OBJECT_SIZE 1024*1024
#define CHUNK_SIZE 32
@@ -49,7 +49,6 @@
* In short: designed for maximum evilness.
*/
-#include "igt.h"
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
@@ -60,9 +59,8 @@
#include <sys/stat.h>
#include <sys/time.h>
-#include <drm.h>
-
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("General gem coherency test.");
@@ -24,14 +24,14 @@
* 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 "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Check parallel access to tiled memory.");
@@ -50,7 +50,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
@@ -41,7 +41,6 @@
* resulted.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -50,10 +49,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
static drm_intel_bufmgr *bufmgr;
struct intel_batchbuffer *batch;
@@ -34,7 +34,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
@@ -45,7 +45,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Test pread behavior on tiled objects with respect to the"
@@ -54,7 +54,6 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-
#include <drm.h>
@@ -55,7 +55,6 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include <pthread.h>
-
#include <drm.h>
@@ -42,7 +42,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("This is a test of write-combining mmap's behavior on"
" tiled objects with respect to the reported swizzling"
@@ -42,7 +42,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#define WIDTH 512
#define HEIGHT 512
@@ -36,7 +36,7 @@
#include <limits.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Check that max fence stride works.");
@@ -38,7 +38,6 @@
* problem - the race window is too small.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -48,8 +47,10 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <stdbool.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Check for use-after-free in the fence stealing code.");
@@ -32,7 +32,6 @@
* 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,8 +40,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
+#include <drm.h>
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test unreferencing of active buffers.");
@@ -36,7 +36,6 @@
* The goal is to simply ensure the basics work.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -49,11 +48,10 @@
#include <signal.h>
#include <pthread.h>
#include <time.h>
+#include <drm.h>
-#include "drm.h"
-#include "i915_drm.h"
-
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#include "eviction_common.c"
@@ -25,7 +25,6 @@
*
*/
-#include "igt.h"
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
@@ -37,10 +36,10 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define MSEC_PER_SEC 1000L
#define USEC_PER_MSEC 1000L
@@ -34,7 +34,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-
#include <drm.h>
#include "i830_reg.h"
@@ -43,7 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#include "i915_reg.h"
@@ -42,7 +42,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include "drm.h"
+#include <drm.h>
#include "i915_reg.h"
@@ -43,7 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#include "i915_reg.h"
@@ -43,7 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#include "i915_reg.h"
@@ -43,7 +43,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
#include "i915_reg.h"
@@ -34,8 +34,7 @@
#include <sys/types.h>
#include <pthread.h>
#include <string.h>
-
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Exercise a suspect workaround required for"
" FORCEWAKE_MT.");
@@ -35,7 +35,8 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "drm.h"
+#include <drm.h>
+
#include "drm_fourcc.h"
uint32_t gem_bo;
@@ -39,11 +39,12 @@
#include <errno.h>
#include <xf86drmMode.h>
#include <cairo.h>
-#include "drm.h"
-#include "ioctl_wrappers.h"
+#include <drm.h>
+
#include "drmtest.h"
#include "igt.h"
#include "igt_aux.h"
+#include "ioctl_wrappers.h"
#ifndef DRM_CLIENT_CAP_ATOMIC
#define DRM_CLIENT_CAP_ATOMIC 3
@@ -31,11 +31,11 @@
#include <string.h>
#include "drmtest.h"
+#include "igt_aux.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 mmap write to an already uncached future scanout buffer.");
@@ -22,13 +22,13 @@
*
*/
-#include "igt.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
bool running_with_psr_disabled;
@@ -24,14 +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 "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
drmModeRes *resources;
int drm_fd;
@@ -24,7 +24,6 @@
#include "config.h"
#endif
-#include "igt.h"
#include <cairo.h>
#include <errno.h>
#include <stdint.h>
@@ -32,7 +31,8 @@
#include <string.h>
#include <sys/time.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#define MAX_CONNECTORS 10
#define MAX_CRTCS 3
@@ -26,7 +26,6 @@
* This is a test of performance of drmWaitVblank.
*/
-#include "igt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -37,10 +36,10 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
-
#include <drm.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Test speed of WaitVblank.");
@@ -40,7 +40,6 @@
#include <sys/stat.h>
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
-
#include <drm.h>
@@ -27,7 +27,6 @@
*/
#define _GNU_SOURCE
-#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -38,7 +37,8 @@
#include <time.h>
#include <sys/wait.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
static int drm_fd;
@@ -24,14 +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 "i915_drm.h"
-#include "intel_bufmgr.h"
+
+#include "igt.h"
+#include "intel_drm_stubs.h"
IGT_TEST_DESCRIPTION("Tests slice/subslice/EU power gating functionality.\n");
@@ -40,11 +40,12 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <pthread.h>
+#include <drm.h>
-#include "drm.h"
-#include "i915_drm.h"
#include "drmtest.h"
+#include "igt.h"
#include "igt_debugfs.h"
+#include "intel_drm_stubs.h"
#include "ioctl_wrappers.h"
#define BO_SIZE (16*1024)
@@ -8,14 +8,14 @@
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>
#include <fcntl.h>
#include <sys/stat.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#include "nouveau.h"
#define BO_SIZE (256*1024)
@@ -14,7 +14,6 @@
*/
-#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -24,7 +23,8 @@
#include <sys/ioctl.h>
#include <errno.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#include "nouveau.h"
static int intel_fd = -1, nouveau_fd = -1;
@@ -14,7 +14,6 @@
*/
-#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -23,7 +22,8 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
#include "nouveau.h"
int intel_fd = -1, nouveau_fd = -1;
@@ -43,8 +43,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <pthread.h>
-
-#include "drm.h"
+#include <drm.h>
IGT_TEST_DESCRIPTION("Check whether prime import/export works on the same"
" device... but with different fds.");
@@ -14,7 +14,6 @@
*/
-#include "igt.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -23,11 +22,11 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <errno.h>
-
-#include "xf86drm.h"
+#include <xf86drm.h>
#include <xf86drmMode.h>
-#include "intel_bufmgr.h"
+#include "igt.h"
+#include "intel_drm_stubs.h"
int intel_fd = -1, udl_fd = -1;
drm_intel_bufmgr *bufmgr;
@@ -21,8 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "igt.h"
-#include "igt_vc4.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -32,6 +30,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+
+#include "igt.h"
+#include "igt_vc4.h"
#include "vc4_drm.h"
igt_main
@@ -21,8 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "igt.h"
-#include "igt_vc4.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -32,6 +30,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+
+#include "igt.h"
+#include "igt_vc4.h"
#include "vc4_drm.h"
static void
@@ -21,7 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -31,6 +30,8 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+
+#include "igt.h"
#include "vc4_drm.h"
igt_main