28 Commits

Author SHA1 Message Date
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
0e22f14ed6 tests|lib: remove assert.h includes
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.

Fix things up where assert instead of igt_assert was used.

One tiny step towards header sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:46 +01:00
Daniel Vetter
7dc0001f3d lib: make rendercopy.h an internal header
And move the public interfaces into intel_batchbuffer.[hc].

A bit messy since we are fairly inconsistent with our header #include
handling.

Also exclude rendercopy.h from the documentation.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:31:15 +01:00
Rodrigo Vivi
2f96726c96 tests/gem_wait_render_timeout: Fix for BDW
Update XY_COLOR_BLT command for Broadwell.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-19 13:12:33 -07:00
Rodrigo Vivi
3e6d9d912a tests/gem_wait_render_timeout: Use XY_COLOR_BLT instead of COLOR_BLT.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-19 11:45:21 -07:00
Ben Widawsky
e8562b3081 gem_wait_render_timeout: use igt_assert_cmpint
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-19 11:42:07 -07: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
Ville Syrjälä
49f4860d5c lib: Add gem_bo_busy
Move gem_bo_busy() from gem_wait_render_timeout.c to lib.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27 16:21:28 +02: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
a4cb8954b2 tests: s/exit(EXIT_FAILURE)/igt_fail(1)/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +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
Chris Wilson
ef45b44036 gem_wait_render_timeout: Fix SKIP return code
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 19:22:37 +01:00
Alan Coopersmith
99fdba921e Fall back to CLOCK_MONOTONIC on systems without CLOCK_MONOTONIC_RAW
Solaris has not yet adopted this Linux extension

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:14 +02:00
Daniel Vetter
76b53ef68d tests/gem_wait_rendering_timeout: needs more fudge
Due to the way we calculate the workload by doubling it each time we
might end up with almost twice as much as we want. Hence increase our
fudge by 1.5 to account for that.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50666
2012-06-26 19:47:30 +02:00
Daniel Vetter
a35dcac0ff tests/gem_wait_rendering_timeout: check polling behaviour
... with timeout=0. We have special code in the kernel to optimize
that one.
2012-05-30 20:16:24 +02:00
Daniel Vetter
b8e00110a0 lib/gem_wait_rendering_timeout: sprinkle busy_ioctl checks
While we have that testcase, let's cross-check the busy ioctl.
2012-05-29 22:23:14 +02:00
Daniel Vetter
04dfa492d1 tests/gem_wait_rendering_timeout: test the timeout case
When I've first tried this it somehow failed, but I can't reproduce
this any more. I guess I've hunted a ghost.
2012-05-29 17:35:21 +02:00
Daniel Vetter
b711bfe54f tests/gem_wait_rendering_timeout: fix up the autotuner
duuh
2012-05-29 16:49:41 +02:00
Daniel Vetter
2952feb23f tests/get_wait_rendering_timeout: fixup the auto-tuner
- start at 1 iterations
- actually adjust the number of iterations like the comment claims
2012-05-29 16:35:30 +02:00
Daniel Vetter
cf979c2063 tests/gem_wait_rendering_timeout: some fixes for the blt function
- widht/height are in pixel, and the cmd uses 32bit, so we need to
  adjust this.
- we write to the buffer, set the right reloc domain.
2012-05-29 16:34:32 +02:00
Daniel Vetter
25bf5574a2 tests/gem_wait_rendering_timeout: properly skip test
also assign the timeout value unconditionally, we want to know it even
when we've timeout out.
2012-05-29 16:24:04 +02:00
Daniel Vetter
f14a045137 tests/gem_wait_rendering_timeout: make it compile
... we need to do this libdrm depency dance. Or just copy&paste it.
2012-05-29 16:14:31 +02:00
Ben Widawsky
9cfcb75b79 tests/wait render timeout test
Assures that signals interrupting the wait works properly. Because of
the scheduling around signals, interrupted waits will *seem* faster as
the GPU continues to work while all the CPU scheduling stuff happens.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-05-25 13:08:28 +02:00