20 Commits

Author SHA1 Message Date
Chris Wilson
cdf0ea825e igt/gem_cpu_reloc: Terminate the bad batch
gen2 will read the batch up until it reaches the end as defined by the
MI_BATCH_BUFFER_END command. Play nice and make sure that it does end on a
MI_BB_END.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08 12:56:06 +01:00
Chris Wilson
2ce0691cd5 igt/gem_cpu_reloc: Update the memory requirements
Use intel_check_memory() for accuracy and beautification

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-12 15:34:12 +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
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
Daniel Vetter
b5bfdbb1ad tests: More bdw fallout
This time misplaced parens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-15 00:10:52 +01:00
Daniel Vetter
df5e880bea tests: More bdw fallout 2013-11-14 23:31:43 +01:00
Ben Widawsky
ffc43fcbc0 gem_cpu_reloc: Fixed botched BLIT conversion
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Ben Widawsky
6fa529ecd6 tests/bdw: gem_cpu_reloc
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08: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
d1e862324b tests: Instrument tests run in simulation to run quickly
We tweak the tests marked as runnable in simulation to run more quickly,
more often then not at the expense of stress testing (which is of an
arguable interest for the initial bring up in simulation). Hopefully the
values chosen still test something, which is not always straightforward.

It does run quickly, the number on an IVB machines are:

$ time sudo IGT_SIMULATION=0 ./piglit-run.py tests/igt.tests foo
[...]
real	2m0.141s
user	0m16.365s
sys	1m33.382s

Vs.

$ time sudo IGT_SIMULATION=1 ./piglit-run.py tests/igt.tests foo
[...]
real	0m0.448s
user	0m0.226s
sys	0m0.183s

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:56:35 +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
Chris Wilson
aaa460951d gem_cpu_reloc: Do another pass explicitly moving to the CPU write domain
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:40:46 +01:00
Chris Wilson
99a0824669 gem_cpu_reloc: Use the mappable aperture size!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
217511012a gem_cpu_reloc: And run the test in reverse to check with already bound batches
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
8b2c19da0b gem_cpu_reloc: Fix for running on SNB+
I work with these everyday and I still made a basic mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
3b9a76d2fa tests: Add gem_cpu_reloc
Attempt to stress test performing relocations whilst the batch is in the
CPU domain.

A freshly allocated buffer starts in the CPU domain, and the pwrite
should also be performed whilst in the CPU domain and so we should
execute the relocations within the CPU domain. If for any reason one of
those steps should land it in the GTT domain, we take the secondary
precaution of filling the mappable portion of the GATT.

In order to detect whether a relocation fails, we first fill a target
buffer with a sequence of invalid commands that would cause the GPU to
immediate hang, and then attempt to overwrite them with a legal, if
short, batchbuffer using a BLT. Then we come to execute the bo, if the
relocation fail and we either copy across all zeros or garbage, then the
GPU will hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 17:35:01 +01:00