37 Commits

Author SHA1 Message Date
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following
semantic patch:

// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)

@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
804e11f40d 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: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Chris Wilson
e8457edba6 igt/gem_exec_blt: Prevent assertion failure when running as a test load
gem_exec_blt is used by other scripts to provide a background load, for
example by drv_missed_irq. This mode doesn't act like a normal test and
igt complains bitterly about it.

Let's just ignore igt here.

References: https://bugs.freedesktop.org/show_bug.cgi?id=88041
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 20:17:16 +01:00
Thomas Wood
ea453dbb4a gem_exec_blt: fix subtest enumeration
Wrap the sysfs_read and sysfs_write calls in an igt_fixture block so
they are not executed during subtest enumeration.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-30 17:09:22 +01:00
Chris Wilson
11291fd52f igt/gem_exec_(blt|nop): IGT magic
$ ./gem_exec_nop --list-subtests
render
bsd
blt
vebox
gem_exec_nop: igt_core.c:946: igt_skip: Assertion `in_fixture' failed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 20:53:06 +00:00
Chris Wilson
2659cbbf64 igt/gem_exec_(nop|blt): Repeat measurements at min/max GPU frequencies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 14:04:56 +00:00
Chris Wilson
c666a19e0c igt/gem_exec_blt: Repeat measurement and average
Through away the unstable outliers for a more consistent measurement.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:19 +00:00
Chris Wilson
4f78f9ffa2 igt/gem_exec_blt: Do a warmup run first
Sometimes it takes a pass for the GPU to come up to full speed, so do a
"cold" pass first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:19 +00:00
Chris Wilson
6259d0a36b igt/gem_exec_blt: Repeat measurements for stablity
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:18 +00:00
Matt Roper
07be8fec15 igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible
The integer comparison macros give us better error output by including
the actual values that failed the comparison.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-06 18:06:10 +01:00
Daniel Vetter
739790d7ed tests/gem_exec_blt: Add subtest that uses dumb buffers
Just to make sure this keeps working since a patch to WARN_ON using
dumb buffers in execbuf was accidentally merged.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-12-17 09:05:10 +01:00
Daniel Vetter
4306538d1d tests: Sprinkle missing igt_exit() where needed.
Yay for breaking piles of tests.

This regression has been introduced with

commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce
Author: Tim Gore <tim.gore@intel.com>
Date:   Wed Oct 1 13:25:20 2014 +0100

    lib/igt_core.c: disable lowmemorykiller during tests

Cc: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-02 11:34:55 +02:00
Daniel Vetter
5a98fe9d4a lib: Add argc/argv to igt_simple_init
There's a pile of ideas around to add generally useful options like
--debug to all igt tests. Or unify the runtime behaviour between
simple and subtest tests a bit more.

The first step to get there is to add argc/argv to igt_simple_init so
that we can get at the argument list.

Cc: Tim Gore <tim.gore@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14 15:03:59 +02:00
Daniel Vetter
e624fa8a2e tests: sprinkle igt logging
All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.

Some information output removed when it's redundant with the subtest
status.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 00:36:04 +02:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
e49ceb8690 lib: unnecessary header removal for drmtest.h, part 1
Brought a few missing headers to light in ioctl_wrappers.h, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:07:37 +01:00
Daniel Vetter
c3f2b6a339 tests/gem_exec_blt: More reasonable runtime
Doing (1 << 18) - 1 repeats isn't really. With the reduced time the
test is also useful in some shell scripted tests which need some real
load (but not too much), like drv_missed_irq_hang.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 15:44:28 +01:00
Ben Widawsky
72fe2b6414 gem_exec_blit: gen8 updates for blit
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-24 13:12:31 -08:00
Daniel Vetter
dda85fb108 tests: roll out igt_simple_init/igt_simple_main
Also use igt_skip a bit more to simplify some of the tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 10:18:32 +01:00
Ben Widawsky
eb89ce7a7e tests/bdw: gem_exec_blt
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
a7934e26ae gem_exec_blt: Use iterator for blit batch setup
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-09 12:52:09 -07:00
Daniel Vetter
225a91bc54 lib/drmtest: include sys/mman.h from drmtest.h
We need it for mmapping to get at PROT_READ|WRITE anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:38:29 +02:00
Daniel Vetter
9cc16e8afd lib/drmtest: extract gem_execbuf helper
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:37:14 +02:00
Daniel Vetter
5e25fcc285 tests: use igt_fail instead of exit(param != 0)
Mostly a sed job with too manual fixups:
- one case of using _exit instead of exit
- and one case which under some conditions use 77, so convert that
  check to an igt_skip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:15:17 +02:00
Daniel Vetter
83440953e5 tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
1caaf0a6b6 s/drmtest_/igt_/
Requested-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12 12:20:22 +02:00
Damien Lespiau
5fa15f79d0 tests: Black list tests we don't want to run on simulation
Let's start by a small set of tests, to eventually consider running
more.

The current list should then be:

gem_mmap
gem_pread_after_blit
gem_ring_sync_loop
gem_ctx_basic
gem_pipe_control_store_loop
gem_storedw_loop_render
gem_storedw_loop_blt
gem_storedw_loop_bsd
gem_render_linear_blits
gem_tiled_blits
gem_cpu_reloc

gem_exec_nop
gem_mmap_gtt

v2 add (Daniel Vetter)
gem_exec_bad_domains
gem_exec_faulting_reloc
gem_flink
gem_reg_read
gem_reloc_overflow
gem_tiling_max_stride
prime_*

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:49:02 +01:00
Ben Widawsky
5a28ef8580 context: update for new execbuf2 element
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-14 10:15:42 -07:00
Daniel Vetter
7a6042e87e lib/drmtest: extract gem_create
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:30:39 +01:00
Daniel Vetter
673e6b220a lib/drmtest: extract gem_set_domain and gem_sync
gem_sync just does a gtt sync by using set_domain(GTT, GTT).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 16:05:34 +01:00
Daniel Vetter
319638ba6d lib/drmtest: extract gem_write
Astonishing how many different function signatures are possible for
something that simple.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:31:11 +01:00
Daniel Vetter
5dd17d3f4b lib/drmtest: extract gem_close
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:07:19 +01:00
Chris Wilson
f381a8b9f0 tests/gem_exec_blt: silence the compiler by failing on error
gem_exec_blt.c: In function ‘gem_exec’:
gem_exec_blt.c:174:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Propagate the failure and exit(1).
2011-12-14 17:43:04 +00:00
Eric Anholt
d73cdde45a Add Ivybridge support to intel_gpu_dump and the BLT tests. 2011-05-17 17:54:26 -07:00
Chris Wilson
a5bbd5ea71 tests/gem_exec_blt: Compile fix 2011-02-09 10:21:27 +00:00
Chris Wilson
0995b56334 Fix basic blt test for SNB
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-06 10:14:41 +00:00
Chris Wilson
5fc09c82d4 Time blt vs pwrite
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-29 16:13:38 +00:00