lib: extract igt_aux.[hc]

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>
This commit is contained in:
Daniel Vetter
2014-03-23 13:35:09 +01:00
parent 018f8c3c45
commit f5daeec724
43 changed files with 443 additions and 271 deletions
+4 -1
View File
@@ -34,10 +34,13 @@
#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)
+1
View File
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include "drmtest.h"
#include "igt_aux.h"
struct igt_eviction_test_ops
{
+4 -1
View File
@@ -34,13 +34,16 @@
#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
+4 -1
View File
@@ -44,13 +44,16 @@
#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)
+4 -1
View File
@@ -53,13 +53,16 @@
#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;
+4 -1
View File
@@ -43,13 +43,16 @@
#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;
+4 -1
View File
@@ -46,10 +46,13 @@
#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)
+5 -1
View File
@@ -40,9 +40,12 @@
#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;
@@ -56,6 +59,7 @@ static void context_destroy(int fd, uint32_t 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 */
+4 -1
View File
@@ -41,10 +41,13 @@
#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
+2
View File
@@ -31,8 +31,10 @@
#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
+1
View File
@@ -41,6 +41,7 @@
#include "drmtest.h"
#include "intel_chipset.h"
#include "intel_io.h"
#include "igt_aux.h"
#define WIDTH 1024
#define HEIGHT 1024
+4 -3
View File
@@ -41,13 +41,14 @@
#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
+4 -3
View File
@@ -33,13 +33,14 @@
#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
+4 -3
View File
@@ -36,14 +36,15 @@
#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
+4 -1
View File
@@ -35,11 +35,14 @@
#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)
+4 -3
View File
@@ -42,13 +42,14 @@
#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;
+4 -3
View File
@@ -36,14 +36,15 @@
#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
+4 -1
View File
@@ -42,13 +42,16 @@
#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)
+4 -1
View File
@@ -47,13 +47,16 @@
#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)
+4 -1
View File
@@ -43,13 +43,16 @@
#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)
+1 -2
View File
@@ -43,10 +43,9 @@
#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)
+3 -3
View File
@@ -41,13 +41,13 @@
#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;
+1
View File
@@ -46,6 +46,7 @@
#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"
+4 -1
View File
@@ -59,13 +59,16 @@
#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
+4 -3
View File
@@ -49,13 +49,14 @@
#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;
+4 -1
View File
@@ -49,13 +49,16 @@
#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;
+4 -3
View File
@@ -33,13 +33,14 @@
#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
+4 -1
View File
@@ -53,10 +53,13 @@
#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
+4 -1
View File
@@ -53,10 +53,13 @@
#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
+4 -1
View File
@@ -37,13 +37,16 @@
#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
+4 -3
View File
@@ -33,14 +33,15 @@
#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)
+1
View File
@@ -26,6 +26,7 @@
*/
#include "drmtest.h"
#include "igt_aux.h"
int main(int argc, char **argv)
{
+1
View File
@@ -43,6 +43,7 @@
#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)