31 Commits

Author SHA1 Message Date
Chris Wilson
89f81e0396 igt: More MI_STORE_DWORD fixes for gen5
A few other tests I have updated recently to use MI_STORE_DWORD also need
the magic bit for gen4/5.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28 16:22:43 +00:00
Chris Wilson
5dea5deffc igt/gem_cs_prefetch: Check each ring
Since each engine has its own ring, each is subject to CS prefetching
and has its own layout that needs probing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27 18:34:05 +00:00
Chris Wilson
fbb0f636bd igt: Fix use MI_STORE_DATA_IMM on gen3
For the older gen, MI_STORE_DATA_IMM is a privileged command so we need
to set the "secure" batch flag, and we also need to instruct the command
to use the GTT virtual address.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-22 17:26:33 +00:00
Chris Wilson
38790b77d5 igt/gem_cs_prefetch: Replace explicit sync with implicit sync
We can trade off the explicit sync (presumably to avoid some resource
starvation issue?) with the implicit sync of having to perform a
relocation. Using an implicit sync helps stress core kernel code,
besides being much faster!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 14:03:15 +00:00
Chris Wilson
26507f3e21 igt/gem_cs_prefetch: Convert to intel_require_memory()
Replace the open-coded memory check with intel_require_memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-27 10:03:55 +00:00
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
a1e4ec4a68 igt/gem_cs_prefetch: Use gem_execbuf for pretty printing of failures
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-29 14:13:05 +01: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
Thomas Wood
b2ac2642a9 tests: add more test descriptions
Add more test descriptions based on exiting comments.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Chris Wilson
10552b5ca6 batch: Specify number of relocations to accommodate
Since relocations are variable size, depending upon generation, it is
easier to handle the resizing of the batch request inside the
BEGIN_BATCH macro. This still leaves us with having to resize commands
in a few places - which still need adaption for gen8+.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-30 11:44:51 +01:00
Chris Wilson
982f7eb238 Prepare for 64bit relocation addresses
This reveal that quite a few locations were writing relocation offsets
but only allowing for 32 bit addresses. To reveal such places in active
tests, we also now double check that we do not use more batch space than
declared.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29 20:02:10 +01: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
f5daeec724 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>
2014-03-23 13:47:09 +01: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
cb9e8376fa tests: fixup igt_simple_main fallout
Oops, I should look at compilier warnings a bit better.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 09:24:33 +01: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
c37e9cf0c4 gem_cs_prefetch: more gen8 integration fallout
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-13 18:23:06 -08:00
Ben Widawsky
f4dfa37e85 bdw: Update obvious missing blit support
This provides a macro that allows us to update all the arbitrary blit
commands we have stuck throughout the code. It assumes we don't actually
use 64b relocs (which is currently true). This also allows us to easily find
all the areas we need to update later when we really use the upper dword.

This block was done mostly with a sed job, and represents the easier
in test blit implementations.

v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
2013-11-06 09:34:35 -08:00
Daniel Vetter
f3c54d0cb4 tests: use igt_assert/igt_require more
With the new _f variants we can replace almost all of them.

Also remove a ton of checks for argc != 1, they're a bit useless ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-25 14:37:07 +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
Daniel Vetter
021909e10d tests: dont polute stderr if the test succeeds/skips
Results in spurious 'warn' results in piglit. Also don't print
progress indicators when not outputting to a terminal.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:37 +01:00
Daniel Vetter
c9795c6dfe tests: add gem_cs_tlb
Should test tlb coherency, but somehow it fails to hit the bug I want
it to hit ... needs more work.
2012-10-09 17:30:59 +02:00
Daniel Vetter
a7787baccc tests/gem_cs_prefetch: clarify what it tests
I've forgotten ;-)
2012-10-09 15:51:13 +02:00
Daniel Vetter
dac239e2b6 tests/gem_tiled_partial_pread/write: fixes
Astonishing how dense I sometimes am ...
- increase the bo size so that we don't have any round-up to next tile
  size areas (which the 2d blit go over, but the 1d pread/pwrite calls
  will notice).
- correctly set tiling bits when copying back to a linear buffer.
- read back through a tiled bo to avoid messing with swizzling.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-29 18:32:02 +01:00
Daniel Vetter
93a65895bb drmtest: add progress indicator
Some test that trash the aperture necessarily need to take forever, so
add a little progress indicator to keep worried minds at peace.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:18:21 +01:00
Daniel Vetter
7492f97cde tests: add gem_cs_prefetch
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:03:12 +01:00