mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 12:52:55 +00:00
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:
+4
-1
@@ -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)
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "drmtest.h"
|
||||
#include "igt_aux.h"
|
||||
|
||||
struct igt_eviction_test_ops
|
||||
{
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "drmtest.h"
|
||||
#include "igt_aux.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user