1430 Commits

Author SHA1 Message Date
Daniel Vetter
dfe942edec Revert "tests/gem_flink_race: count leaked objects"
This reverts commit bd927662fcfb1443c5982fb04cc694f78e1c8d53.

It's bogus.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24 09:31:40 +02:00
Daniel Vetter
aaeaca7720 tests/gem_flink_race: check for expected flink failure code
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24 08:01:35 +02:00
Daniel Vetter
bd927662fc tests/gem_flink_race: count leaked objects
And fail the test if the leak count is bigger than 0.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24 07:37:45 +02:00
Daniel Vetter
9736fc09e2 tests/gem_flink_race: kill debug printf
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24 06:55:10 +02:00
Daniel Vetter
7b5440a09a tests: add gem_flink_race
This exercises a race in the flink name descruction of the current drm
gem core. When racing a gem close with a gem open the open can sneak
in and cause the kernel to leak the flink name and its reference.

This results in leaked gem objects that won't get reaped even at drm
file close time. On my 2 core/4 threads snb machine this leaks on the
order of 1k objects per second.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23 23:15:12 +02:00
Daniel Vetter
8e46c382e3 lib/drmtest: add gem_flink and gem_open
Requires us to rename a few things in the gem_flink test to avoid
variable shadowing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23 23:15:12 +02:00
Daniel Vetter
5fcb528cb3 tests: sort tests in Makefile.am and .gitignore
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23 23:15:12 +02:00
Daniel Vetter
10834f8610 tests/gem_suspend: exercise fence restore code
This exercise the bug fixed in

commit 94a335dba34ff47cad3d6d0c29b452d43a1be3c8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Jul 17 14:51:28 2013 +0200

    drm/i915: correctly restore fences with objects attached

For fun I've also added a subtest for the inverse transition.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-23 20:46:57 +02:00
Daniel Vetter
5bc0324e86 lib/drmtest: document interface groups with one-liners
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-22 09:25:41 +02:00
Ben Widawsky
89d96a12d6 tests: Basic tools tester
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-07-21 22:04:20 -07:00
Chris Wilson
f801b92882 test/gem_pread_after_blit: Make the test a little more stressful
Extend the simply functionality by repeating it under the rude
interrupter and chain together a couple of steps in new test cases.

As a compromise for adding more tests, incorporate the piglit subtest
framework.
2013-07-20 10:25:12 +01:00
Damien Lespiau
7d9dbd1fed tests: Source drm_lib.sh instead of having its own INTEL_SIMULATION test
One code path to maintain is always better.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:40:25 +01:00
Damien Lespiau
a7c56938c8 tests: Allow a shell test to declare it doesn't need to be DRM master
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:40:22 +01:00
Damien Lespiau
aefc5c63e4 lib: Allow users of env_set() to specify a default value
So when the environment value isn't set, one can specify the default
value to return.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:38:47 +01:00
Damien Lespiau
94444aea6e build: Pimp up the configure summary
This helps people compiling i-g-t figuring out what can be optional.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:38:38 +01:00
Damien Lespiau
2797596432 build: Fix automake 1.13 warnings
warning: deprecated feature: target 'sr' overrides 'sr$(EXEEXT)'

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:38:34 +01:00
Damien Lespiau
bbce319b29 build: Fix unbalanced quoting in the python dumper AC_ARG_ENABLE()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:38:31 +01:00
Damien Lespiau
54ec3cbdd5 build: Fix a small typo in configure.ac
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:38:27 +01:00
Daniel Vetter
289024b328 lib/drmtest: fix const mismatch warning
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-19 18:24:59 +02:00
Xiong Zhang
fc5c693014 tests: add reloc, pread, pwrite slow path subtest
the reloc, pread, pwrite slow path will be prevented by prefault,
these subtests will disable prefault first, then do reloc, pread,
pwrite, finally enable prefault.

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
2013-07-19 18:12:44 +02:00
Xiong Zhang
7ea2983b11 lib/drmtest: add drmtest_disable/enable_prefault() function
V2: add exit handler to enable prefault (Daniel)

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
2013-07-19 18:12:36 +02:00
Damien Lespiau
161e610765 tests: Add some tiled tests to the runs on simulation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 16:16:19 +01: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
204df66798 tests: Instrument gem_lut_handle for simulation
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:56:53 +01: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
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
Damien Lespiau
cf4efd1597 lib: Remove old dead code intel_batchbuffer_emit_mi_flush()
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:48:55 +01:00
Damien Lespiau
4b34765594 lib: Introduce drmtest_skip_on_simulation()
This will allow us to explicitely blacklist tests we don't want to run
on simulation.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:48:46 +01:00
Damien Lespiau
c25e892ec3 lib: Rename IGT_QUICK to INTEL_SIMULATION
It's more accurate this way as the quick mode is really useful for in
the simulation environment.

v2: Use the INTEL_ prefix to have a chance to share the same environment
    variable as piglit OpenGL tests

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:48:42 +01:00
Damien Lespiau
0193b69e14 build: Depend on cairo 1.12.0 for CAIRO_FORMAT_RGB30
We've somewhat recently added RGB30 support to testdisplay, but we need
cairo 1.12.0 for that. Barf early.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-17 17:58:44 +02:00
Mika Kuoppala
edee952e6a tools/inter_error_decode: decode for ctl and acthd
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-16 15:18:56 +02:00
Daniel Vetter
05cc515f3a tests/prime_nv_api: check multiple foreign imports with flink
We want prime to only ever create one native gem object for each
dma-buf it sees. This can e.g. happen if multiple processes import the
same foreign dma-buf, e.g. the application imports a yuv frame from
v4l to encode it into a video stream and the compositor imports it
into his fd again to display it with an overlay.

Hence add a bunch of tests which check all the various orders in which
this could happen. Currently they all fail.

Checking flink names is the easiest (and afaik only) way to check
whether we're indeed dealing with the same object.

This checks both ways, i.e. exporting from i915 and from nouveau, each
with two variants of the test: One reuses the prime fd, the other
closes it and creates a new one.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-16 13:36:38 +02:00
Daniel Vetter
d64a9458b2 test/prime_nv_test: use gem drmtest functions for pread/pwrite
Different argument order, otherwise the same.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15 11:12:31 +02:00
Daniel Vetter
bc1a85e813 test/prime_nv_test: nicer test names
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15 11:09:57 +02:00
Daniel Vetter
4a9d50db1b test/prime_nv_api: more descriptive subtest names
Preprocessor magic ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15 11:04:20 +02:00
Daniel Vetter
1a3c7e3493 tests/prime_nv_api: Drop bogus check from import-twice
It's purely accidental that importing that same bo to different
drm nouveau fds yields the same handle.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15 10:59:55 +02:00
Daniel Vetter
c28b898cd4 tests/prime_nv_api: convert to subtest infrastructure
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-15 10:51:10 +02:00
Chris Wilson
b37d89318d tests/gem_write_ring_switch: Skip on pre-SNB
The test requires MI commands only introduced with SNB, and so causes
GPU death on gm45 and ilk.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66838
2013-07-12 10:07:04 +01:00
Chris Wilson
7dbc43f27a tests/gem_write_read_ring_switch: Repeat under rude interrupter
Another waiter that will then be subject to being interrupted, so retest
the ring switches with the rude interrupter.
2013-07-12 10:00:42 +01:00
Daniel Vetter
9ee41661de tools/quickdump: gitignore generated files
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-10 15:35:13 +02:00
Daniel Vetter
727440c48a tests: actually add gem_write_read_ring_switch
Duh ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-10 15:34:56 +02:00
Daniel Vetter
21c0ab30a1 test: add gem_write_read_ring_switch
This is meant to exercise the bug fixed in

https://patchwork.kernel.org/patch/2825192/

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-10 10:35:10 +02:00
Daniel Vetter
037847a102 tools/intel_reg_dumper: fix up END register
I'm full of fail ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-09 23:04:20 +02:00
Daniel Vetter
d3221334d2 tools/intel_reg_dumper: add gen6+ fences
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-09 10:46:09 +02:00
Chris Wilson
79b3029fe8 gem_(tiled|linear)_blits: s/interrutible/interruptible/
Spelling fix in "interruptible" subtest name.
2013-07-04 01:12:00 +01:00
Daniel Vetter
db94faede5 tests/kms_flip: don't run blocking relateve vblank waits with interrupts
They simply take forever with the current kernel implementation. And
since everyone switched over to the event based interface I don't see
much incentive to try to fix that.

So just disable them.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-04 01:52:04 +02:00
Paulo Zanoni
a7e7d08513 intel_reg_dumper: enable the power well
The intel_reg_dumper tool reads a lot of display registers. If we
don't turn on the power well, dmesg will get flooded with tons of
messages about unclaimed registers. So here we enable the "Debug"
power well register and then restore its state later. It's impossible
to guarantee that other things won't mess with the debug register
between our put and get calls, but at least we're trying our best to
keep things working fine, and it's the debug register anyway.

As far as I know, nothing else uses the Debug register for anything,
so we should be safe for now.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-07-03 14:49:09 -03:00
Paulo Zanoni
a1ca6f9ca5 lib: fix WM_DBG register address
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-07-03 14:49:09 -03:00
Paulo Zanoni
c013bb02e6 intel_reg_dumper: add hsw_debug_lp_wm
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-07-03 14:49:09 -03:00
Chris Wilson
c6cec844f9 Make the failure message for drm_open_any() more specific
Do not suggest retrying as root if we already are.
2013-07-03 10:01:15 +01:00