36 Commits

Author SHA1 Message Date
Damien Lespiau
6b964c93f7 gem_seqno_wrap: Remove unused variable
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-06 18:51:37 +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
Chris Wilson
255bade1ea igt/gem_seqno_wrap: Use debugfs singleton
This has the added advantage of automounting debugfs for us.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29 21:25:14 +01:00
Thomas Wood
80d2c9bf82 tests: convert simple tests to use igt_simple_init_parse_opts
Convert simple tests to use igt_simple_init_parse_opts if they require
extra options.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-23 15:23:54 +01: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
Tim Gore
5f89d6f41f intel-gpu-tools: remove the --cmd option from gem_seqno_wrap
gem_seqno_wrap was not being built on Android because it uses
wordexp which is not in Bionic.
After discussion with Mika Kuoppala (the test author) it seems
that wordexp was used to implement the --cmd option that was
really only intended for use during development of the test and
is no longer needed. So I have removed support for this option
and enabled this test for Android.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Resolve conflicts with cocci run.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-16 20:04:55 +02:00
Daniel Vetter
c9c554594e tests: run igt.cocci
Re-run with correct igt_fail rules. Again manually fixup missing
includes for igt_core.h.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-13 18:27:59 +02:00
Daniel Vetter
722b25a303 tests/gem_seqno_wrap: Replace control flow with asserts
Only tricky bit was a bit of debug output sprinkled all over, I've
moved it all to cmp_bo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 10:09:25 +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
254f19ba8d lib: unnecessary header removal for drmtest.h, part 2
I've left unistd.h in it - it's not strictly required but most users
of drmtest.h want it for the open helpers, and then you kinda need to
close that file descriptor again ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:29:01 +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
43b7aa44fd lib/intel_batchbuffer: drop cpu_mapping from igt_buf
It's unused. There's still num_tiles getting in the way of things,
but that is used by gem_stress a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 18:04:52 +01:00
Daniel Vetter
53a4d9e982 lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs
Now everything is prepared to pour some neat api docs over this all.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:49:02 +01:00
Daniel Vetter
83a4c7d3eb lib/intel_batchbuffer: igt_ namespace for the buffer structure
Step one to properly namespace the rendercpy/mediafill functions. Als
give the buf_height/width helpers a proper igt_ prefix.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 15:44:48 +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
Daniel Vetter
eaccd444f7 lib: switch intel_copy_bo to directly take a size
Instead of a width/height combination. Since I've been lazy with the
math this now only accepts page-aligned copy operations, but that's
all we need really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:22 +01:00
Daniel Vetter
c88f898c57 tests/gem_seqno_wrap: use igt logging
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 14:41:40 +01:00
Thomas Wood
01757d052c tests/gem_seqno_wrap: fix over allocation of arrays
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11 14:35:09 +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
Ville Syrjälä
725da6ee74 rendercopy: Pass context to rendercopy functions
rendercopy does the batch buffer flush internally, so if we want
to use it with multiple contexts, we need to pass the context
in from caller.

v2: Modify rendercopy_gen8 as well

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27 16:21:28 +02:00
Daniel Vetter
8dbd1fb9d4 lib/drmtest: igt_skip when drm_get_card fails
Also add printf support to igt_skip to make sure there's always a
reason why we fail a testcase.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-19 11:09:25 +02:00
Daniel Vetter
23eee39489 tests: roll out igt_require some more
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-19 10:47:53 +02:00
Daniel Vetter
5951ffb6a0 lib/drmtest: rip out drm_open_any_master
It's unused. Also most of our tests failed to ask for the right type
of drm fd anyway. So it's imo better to just let them fall over when
they don't get master but want it, like they already do today.

This also allows us to garbage-collect the master parameter to
drm_get_card and associated code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-19 10:34:34 +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
b30d95f33c tests: s/exit(77)/igt_skip()/
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
00ab9a1313 tests: Instrument gem_seqno_wrap to run in simulation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:56:59 +01: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
Mika Kuoppala
a7ca33b673 tests/gem_seqno_wrap: verify debugfs write with readback
Make sure that debugfs entry works as expected by reading
back the sequence number that was written.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-11 17:26:56 +02:00
Mika Kuoppala
c612481a19 tests/gem_seqno_wrap: skip if debugfs entry is not there
Return error code 77 to skip test if debugfs entry is not
available.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59116
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-08 12:20:44 +01:00
Mika Kuoppala
33f09f6954 tests/gem_seqno_wrap: adapt to new next_seqno debugfs interface
- adapt to use debugfs interface that can set seqno to arbitrary value
- fix dynamic buffer allocation

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-21 20:49:22 +01:00
Alan Coopersmith
f185699a4b tests/gem_seqno_wrap.c: include <signal.h> for definition of kill()
Fixes build failure on Solaris:
gem_seqno_wrap.c: In function ‘run_cmd’:
gem_seqno_wrap.c:328:3: error: implicit declaration of function ‘kill’ [-Werror=implicit-function-declaration]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-16 19:45:57 +01:00
Mika Kuoppala
a2452d68a0 tests/gem_seqno_wrap: dont sync when crossing half of seqno space
For seqno comparison to work they have to be less than UINT32_MAX/2
apart. So when crossing the half way of seqno space, be careful not
to sync anything as this causes gpu hangs. Do real test with
syncing only when we are about to wrap.

v2: Don't spam if no rendercopy was found, only warn once
2012-12-13 12:52:26 +01:00
Mika Kuoppala
796fd58a17 tests: add gem_seqno_wrap
This test uses debugfs entry to set next_seqno close
to a wrapping point and then creates a load with dependant
buffer objects or with specified command to induce the wrap.

v2: Use new get_rendercpy_func as suggested by Daniel Vetter.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-04 23:03:54 +01:00