919 Commits

Author SHA1 Message Date
Daniel Vetter
071e9ca1ca lib: add igt_main macro
In the past new testcases with subtest often forgot to add the call to
igt_exit at the end of their main() function. That is now caught with
a bit more obnoxious asserts, but it's still a nuissance.

This little igt_main macro takes care of that (and also of calling the
subtest machinery initialization code correctly).

If no one objects I'll roll this out for all the simple cases (i.e.
those tests that don't have additional argv parsing on top of the
subtest machinery).

v2: Roll it out across the board.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
223a61e12e lib: make igt_install_exit_handler never fail
Most callers didn't bother checking, so just move the asserts into
the function itself.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
1f0cf2df85 lib: make igt_set_vt_graphics_mode never fail
All tests agree that this is a letal failure, so no point
to pass it back to callers.

Also add some igt_require calls for the drm_fd where I've
noticed that it's missing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
0369fe19b8 lib: consolidate pipe crc exit handler
No need to sprinkle this all over:
- exit handlers will only be registered once
- they're always called when exiting, so no need to explictly call
  them.

This allows us to hide all the pipe crc cleanup in the library.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
43def94f32 tests/kms_cursor_crc: rework to auto-skip connectors
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 20:43:16 +01:00
Daniel Vetter
8bb5730d28 tests/debugfs_pipe_crc: set mode before creating CRC helper
Otherwise the automagic skipping for DP ports on gmch platforms
won't work.

v2: We also need to just skip that connector, not the entire subtest.

kms_cursor_crc still needs to be updated.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 20:43:16 +01:00
Daniel Vetter
842007154d tests: use "auto" pipe CRC source
Makes stuff work on DP ports on gmch platforms automatically.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 20:43:15 +01:00
Daniel Vetter
0b51de8dd0 lib: add more self-tests around the igt_exit checks.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 18:30:22 +01:00
Daniel Vetter
e14596a6d0 lib: fix igt_exit assert when only listing subtests.
Ooops. Reported by Paulo. Also add a new testcase for make check to
make sure this actually works.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 18:30:22 +01:00
Damien Lespiau
b1945f8c46 gitignore: Ignore recently introduced tools and tests
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-01 15:47:42 +00:00
Paulo Zanoni
bd0aa100ca module_reload: remove snd_hda_intel
The audio driver uses the power well provided by our driver, so on
Haswell we can't "rmmod i915" if we don't "rmmod snd_hda_intel" first.

The problem with removing snd_hda_intel is that we also need to kill
its users. On the specific machine I tested, the only user seem to be
alsactl, but on other machines this may change. IMHO we should leave
the "kill user space" step to whoever is running the script, but
Daniel asked me to put it here so we have a better chance of Just
Working on QA's machines.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70336
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-01 12:55:46 -02:00
Ben Widawsky
164b540936 debugfs_pipe_crc: skip on simulation
As with other display tests, they're not working (and in this case,
cause hangs).

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-31 14:16:41 -07:00
Paulo Zanoni
2addb2744f tests/pc8: remove some printfs
They pollute the output, which makes it harder to see which tests
failed or succeeded.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-10-30 19:37:21 -02:00
Paulo Zanoni
b6645ee2e2 tests/pc8: clarify modeset_subtest arguments
My tiny little brain can't properly process 3 unnamed boolean
arguments.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-10-30 19:37:21 -02:00
Paulo Zanoni
abb3340617 tests/pc8: add modeset -stress-no-wait tests
Used to trigger a racing condition between mode setting and
enabling/disabling PC8. The modeset-lpsp-stress-no-wait test should
fail on Kernels without the fix I just wrote today.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-10-30 19:37:21 -02:00
Paulo Zanoni
7a5275f8a5 tests/pc8: add modeset-lpsp and modeset-non-lpsp
The goal of these tests is to exercise the combination of power well
enabling/disabling and PC8 enabling/disabling. The modeset-non-lpsp
test exposes a silent bug on the current code that can just be
detected with the Runtime D3 patches. The Kernel patch that fixes the
bug will add a WARN to unmute it on the PC8-only case.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-10-30 19:37:21 -02:00
Ben Widawsky
87cf5571fc gem_suspend: Skip on simulation
Simulation has proven flaky across both reset, and s3/4

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-29 20:01:43 -07:00
Ben Widawsky
5382aca1af gem_close_race: Fix linker flags
Seems the -lpthread was missed in
commit 8f771f3facae133bb72216fa05c74bc817920b6d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 29 14:21:29 2013 +0000

    gem_close_race: Also test random closing of active fd

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-29 20:01:36 -07:00
Chris Wilson
8f771f3fac gem_close_race: Also test random closing of active fd
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-29 14:22:18 +00:00
Daniel Vetter
780807099a tests: Use igt_exit for tests with subtest
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-29 11:15:43 +01:00
Chris Wilson
ccb1b5888d gem_close_race: Bump the workload
Emit more work per client and many more clients in order to increase the
chance of racing i915_gem_release() and i915_gem_retire_requests()
2013-10-29 09:27:28 +00:00
Chris Wilson
51783fc7f9 gem_close_race: Tidy up call to execbuffer
Pass the right pointer to the execlist would be a good start.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-29 08:39:53 +00:00
Daniel Vetter
7b8784dccf tests/kms_cursor_crc: Use igt_exit
Otherwise the exit codes are all bogus.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-29 07:47:33 +01:00
Damien Lespiau
020600b77d tests: Convert the ctx test to use render nodes when possible
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-28 11:00:07 +00:00
Damien Lespiau
d71ecdbf5d tests/gem_render_copy: Use render nodes
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-28 11:00:07 +00:00
Chris Wilson
90ecf062d1 tests: Add gem_close_race
The intention is to exercise #70784. Yet the first challenge is make the
test suite happy.
2013-10-28 09:13:09 +00:00
Damien Lespiau
37c02cfa5c gem_render_linear_blits: Remove aub dump support
It's much easier to follow the new gem_render_copy test and acquire a
aub dump from it.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-24 13:44:32 +01:00
Damien Lespiau
7ad0cf585b tests/gem_render_copy: Add aub dump support
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-24 13:44:32 +01:00
Damien Lespiau
145722187c tests/gem_render_copy: Only dump pngs when the -d option is given
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-24 13:44:32 +01:00
Damien Lespiau
9cd092fac1 tests/gem_render_copy: Add a simple render copy test
The goal is here to both: demonstrate a simple usage of render copy with
the possibility to write pngs to visualize what it's doing and to
provide a test bed to port the render copy function to new
architectures.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-24 13:44:32 +01:00
Rodrigo Vivi
50c2653381 build: Fix small typo that was breaking make distcheck
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-10-22 11:28:56 -02:00
Ville Syrjälä
fa05c0bced kms_flip: Add test for -ENOENT
Make sure we get -ENOENT when we pass a non-existing fb_id to
the page flip and setcrtc ioctls.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21 20:23:18 +03:00
Ville Syrjälä
08c27e3e38 kms_cursor_crc: Add a cursor test using CRCs
Use the display CRC support to validate cursor plane functionality.
The test will position the cursor plane either fully onscreen,
partially onscreen, or fully offscreen, using either a fully opaque
or fully transparent surface. In each case it then reads the PF CRC
and compares it with the CRC value obtained when the cursor plane
was disabled.

v2: Loop over all connectors and crtcs
    Use igt_wait_for_vblank
    Test more corner cases
    Add some progress indication ala. kms_flip
    Make it work for pf and pipe sources

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21 20:00:32 +03:00
Ville Syrjälä
0786d5cc8f lib: Check pipe source validity in igt_pipe_crc_new()
Have igt_pipe_crc_new() check whether the selected source is actually
supported.

v2: Make debugfs_pipe_crc.c not crash

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-10-21 20:00:32 +03:00
Daniel Vetter
4acaf0004d tests/kms_flip: More leeway for dummy load tests
At least on my old atom i945 they take forever. Also, metric tons of
pipe B underruns while running rcs-flip-vs-panning. No idea why that
happens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-20 20:37:21 +02:00
Daniel Vetter
45cd89ab3d tests/kms_flip: Unconfuse the framenumber step checking
We run flips and vblank waits in parallel, which means the step
for each is the maximum. If we'd switch to an interleaved scheme
(to be able to check the correlation) we'd need to add them instead.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-20 16:11:57 +02:00
Daniel Vetter
8e11f8778a tests/kms_flip: no absolute vblank wait on the first frame
We don't have a reference value for the vblank counter yet, so
will end up waiting for a long time for the vblank counter to
wrap around again.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-20 16:11:57 +02:00
Daniel Vetter
e313dee22b tets/kms_flip: disable correlation check
It's broken since it doesn't take the order the events arrived into
account and so will fall over for longer seq_step values in the vblank
event: Since the flip completes right away, but the vblank later on
they won't have the same timestamp.

For now just give up, we could resurrect this by strictly alternating
between a flip and a vblank wait.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-20 16:11:57 +02:00
Daniel Vetter
f698984bae tests/debugfs_pipe_crc: new subtest to check CRC frame numbers
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-20 16:11:57 +02:00
Damien Lespiau
09e9f0b216 rendercopy: Add a way to dump an .aub file with the rendercopy bos
v2 (by Ben): Remove libdrm dependency since intel-gpu-tools now requires
a higher version anyway. Remove associated #ifdef ENABLE_AUB_DUMP

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-10-18 09:49:41 -07:00
Damien Lespiau
5e3047ce52 tests/debugfs_pipe_crc: Test the read CRCs are not null
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-18 12:27:21 +01:00
Daniel Vetter
43f5384c08 tests/debugfs_pipe_crc: test all connectors
Diff looks a bit ugly, but it's just due to the added indentation.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17 14:18:35 +02:00
Daniel Vetter
070904bf59 tests/debugfs_pipe_crc: test all pipes
And skip them if there's no suitable connector.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17 14:10:43 +02:00
Daniel Vetter
e6ad75c1c4 tests/debugfs_pipe_crc: fix fb leak
Also remove the unused connector_t->mode.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17 14:09:52 +02:00
Daniel Vetter
173a4cf1da tests/debugfs_pipe_crc: fall back to PIPE source
With PLANE1 and PIPE CRC sources the test will work on all currently
shipping (and planed fwiw) platforms.

Also add all the other new sources for non-ivb/hsw chips.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17 13:35:51 +02:00
Daniel Vetter
1cefd198da tests/ZZ_missed_irq: Fixup SOURCE_PATH handling
Copy the trick from ZZ_hangman of just cd'ing into the old working
directory in a subshell.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70561
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-17 10:49:45 +02:00
Ben Widawsky
a12d4a7135 gem_ctx_bad_exec: skip vebox when appropriate
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-16 22:01:34 -07:00
Daniel Vetter
0412f32670 tests/debugfs_pipe_crc: correctly skip on unsupported platforms
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-16 14:12:49 +02:00
Damien Lespiau
4ba97ddf96 debugfs_pipe_crc: Let's check CRCs!
Let's add a new test that sets a mode, wait for a few vblanks (3) and
then make sure we read 3 identical CRCs.

Some subtests check for various parsing errors.

In the process, improve the debugfs helpers to deal with CRCs.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-10-15 19:40:07 +01:00
Daniel Vetter
d3d371fdf6 tests/pc8: Readd verbose error message
I deemed them a bit redundant (assuming that developers are the only
ones that look at them anyway). But Paulo requested that I readd them
for the education of QA.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-14 19:10:56 +02:00