profile/extras/intel-gpu-tools.git
11 years agokms_flip: Make flip events optional
Ville Syrjälä [Wed, 30 Jan 2013 12:52:23 +0000 (14:52 +0200)]
kms_flip: Make flip events optional

Pass an argument to do_page_flip() telling it whether to request flip
events.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_lut_handle: Limit testing LUT interface to recent kernels
Chris Wilson [Thu, 17 Jan 2013 15:07:50 +0000 (15:07 +0000)]
tests/gem_lut_handle: Limit testing LUT interface to recent kernels

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_lut_handle: Expand negative testing
Chris Wilson [Thu, 17 Jan 2013 15:05:20 +0000 (15:05 +0000)]
tests/gem_lut_handle: Expand negative testing

Pass in lots of execs and relocs trying to trick the kernel into making
a mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: Benchmark new API for using a LUT with the execbuffer
Chris Wilson [Wed, 14 Nov 2012 12:15:01 +0000 (12:15 +0000)]
tests: Benchmark new API for using a LUT with the execbuffer

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: Exercise new API for using a LUT with the execbuffer
Chris Wilson [Wed, 14 Nov 2012 12:15:01 +0000 (12:15 +0000)]
tests: Exercise new API for using a LUT with the execbuffer

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/testdisplay.c: Fix the issue which don't display anything until '-o' given.
Yi Sun [Sun, 13 Jan 2013 02:10:24 +0000 (10:10 +0800)]
tests/testdisplay.c: Fix the issue which don't display anything until '-o' given.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_seqno_wrap: skip if debugfs entry is not there
Mika Kuoppala [Tue, 8 Jan 2013 11:16:06 +0000 (13:16 +0200)]
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>
11 years agotests: Add basic testing of gem_pin
Chris Wilson [Mon, 7 Jan 2013 11:43:38 +0000 (11:43 +0000)]
tests: Add basic testing of gem_pin

Including exercising races versus interrupts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agoFix out of bounds memory access
Thomas Jarosch [Tue, 25 Dec 2012 17:06:57 +0000 (18:06 +0100)]
Fix out of bounds memory access

cppcheck reported:
[tools/intel_infoframes.c:836]: (error) Width 31 given in format string
(no. 1) is larger than destination buffer 'option[16]',
use %15s to prevent overflowing it.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/testdisplay: Specify the display.
Yi Sun [Wed, 26 Dec 2012 09:12:39 +0000 (17:12 +0800)]
tests/testdisplay: Specify the display.

It can specify the display by the connector id which list as the first column of ./testdisplay -i.
E.g. command "./testdiplay -o 1,4" means setting number 4 mode line on the display with connector id 1.

v2. Specify the display by id which can be got from option '-i'

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agotests/gem_seqno_wrap: adapt to new next_seqno debugfs interface
Mika Kuoppala [Fri, 21 Dec 2012 12:06:02 +0000 (14:06 +0200)]
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>
11 years agotests/prime_nv_pcopy: guard output for subtest listing
Daniel Vetter [Thu, 20 Dec 2012 22:30:10 +0000 (23:30 +0100)]
tests/prime_nv_pcopy: guard output for subtest listing

11 years agointel/udl tests;
Dave Airlie [Tue, 14 Aug 2012 04:16:04 +0000 (14:16 +1000)]
intel/udl tests;

basic test to share a BO, add as a udl framebuffer, and call the dirty
ioctl on it so we cause the vmapping to happen

[danvet: Snatched up from Dave's prime branch, ocd name and bikeshed
whitespace a bit.]

11 years agotests: add testcase to check igt runtime enviroment
Daniel Vetter [Tue, 18 Dec 2012 21:55:58 +0000 (22:55 +0100)]
tests: add testcase to check igt runtime enviroment

Now that we've abandonded the autohell testrunner, need to port this
over. Easiest is to just add another testcase ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agokms_flip: Add -lrt back
Ville Syrjälä [Tue, 18 Dec 2012 14:51:27 +0000 (16:51 +0200)]
kms_flip: Add -lrt back

kms_flip doesn't build due to missing -lrt.

The build was broken due to a typo in this commit:

commit acdf7171264a5139caabb78127c9eef5080c0682
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Dec 15 00:48:47 2012 +0100

    tests: s/flip_test/kms_flip

    OCD wins!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
For some reason libudev.pc brings in -lrt as well, which probably
caused the typo to go unnoticed.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/kms_flip: don't die on stdin input
Daniel Vetter [Tue, 18 Dec 2012 09:25:15 +0000 (10:25 +0100)]
tests/kms_flip: don't die on stdin input

Seems to be a leftover from fliptest ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib: extract kmstest_get_pipe_from_crtc_id
Daniel Vetter [Sat, 15 Dec 2012 00:06:11 +0000 (01:06 +0100)]
lib: extract kmstest_get_pipe_from_crtc_id

11 years agotests/gem_flink: enable flink lifetime subtest
Daniel Vetter [Sat, 15 Dec 2012 00:05:33 +0000 (01:05 +0100)]
tests/gem_flink: enable flink lifetime subtest

Somehow fumbled this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: s/flip_test/kms_flip
Daniel Vetter [Fri, 14 Dec 2012 23:48:47 +0000 (00:48 +0100)]
tests: s/flip_test/kms_flip

OCD wins!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/flip_test: add flip vs. rmfb testcase
Daniel Vetter [Fri, 14 Dec 2012 23:41:01 +0000 (00:41 +0100)]
tests/flip_test: add flip vs. rmfb testcase

To check that the kernel doesn't fall over when tearing down a life
fb. Confirmed that it exercises the right codepath with printk.

Also fix an issue Imre introduced in

commit fe7fea0be3b5f418b76dc7834e73b31827484429
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Oct 16 04:09:43 2012 +0300

    flip_test: add event sequence number tracking

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: recreate fb
Daniel Vetter [Thu, 13 Dec 2012 20:30:43 +0000 (21:30 +0100)]
flip_test: recreate fb

... to test the latency of rmfb, getfb and addfb. Since if those still
can cause spikes, we have a problem.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/flip_test: split out timestamp checks into subtest
Daniel Vetter [Thu, 13 Dec 2012 20:10:58 +0000 (21:10 +0100)]
tests/flip_test: split out timestamp checks into subtest

This way we can still test basic pageflips on kernels with broken
locking while still failing when the timestamps/framecounts are wrong.

Also disable the delay check on analog tv, timings on those ports are
truely screwed-up

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_seqno_wrap.c: include <signal.h> for definition of kill()
Alan Coopersmith [Sun, 16 Dec 2012 18:38:54 +0000 (10:38 -0800)]
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>
11 years agotests/prime_nv_pcopy: convert to subtests
Daniel Vetter [Sat, 15 Dec 2012 14:38:31 +0000 (15:38 +0100)]
tests/prime_nv_pcopy: convert to subtests

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/prime_nv_tests: convert to subtests
Daniel Vetter [Sat, 15 Dec 2012 14:30:19 +0000 (15:30 +0100)]
tests/prime_nv_tests: convert to subtests

And properly fail the failing ones - bloody hate it when the tests lie
to me ...

11 years agotools: intel_gpu_abrt bug report template.
Rodrigo Vivi [Thu, 13 Dec 2012 16:11:24 +0000 (14:11 -0200)]
tools: intel_gpu_abrt bug report template.

checking if file has been generated and output a template for a good bug report

11 years agotools: intel_gpu_abrt checking for root access
Rodrigo Vivi [Thu, 13 Dec 2012 16:11:23 +0000 (14:11 -0200)]
tools: intel_gpu_abrt checking for root access

needed by other igt tools that are collecting more usefull information.

11 years agotools: intel_gpu_abrt collecting more useful info
Rodrigo Vivi [Thu, 13 Dec 2012 16:11:22 +0000 (14:11 -0200)]
tools: intel_gpu_abrt collecting more useful info

11 years agotools: intel_gpu_abrt "get" function
Rodrigo Vivi [Thu, 13 Dec 2012 16:11:21 +0000 (14:11 -0200)]
tools: intel_gpu_abrt "get" function

A function to make it easy to collect any file or directory needed later.

11 years agotests/gem_seqno_wrap: dont sync when crossing half of seqno space
Mika Kuoppala [Thu, 13 Dec 2012 10:43:35 +0000 (12:43 +0200)]
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

11 years agoflip_test: fix link error due to missing -lrt
Imre Deak [Fri, 7 Dec 2012 18:30:28 +0000 (20:30 +0200)]
flip_test: fix link error due to missing -lrt

Needed by clock_gettime(). This isn't a problem if libudev is used,
as that pulles librt with it.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_*_tiled_blits: Use the vma limiter to present address space exhaustion
Chris Wilson [Wed, 12 Dec 2012 14:33:17 +0000 (14:33 +0000)]
tests/gem_*_tiled_blits: Use the vma limiter to present address space exhaustion

References: https://bugs.freedesktop.org/show_bug.cgi?id=58113
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_tiled_pread_pwrite: Allow the kernel to reap the GTT address space
Chris Wilson [Wed, 12 Dec 2012 13:58:04 +0000 (13:58 +0000)]
tests/gem_tiled_pread_pwrite: Allow the kernel to reap the GTT address space

Otherwise we can not run this test on 32-bit systems.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_tiled_swapping: Don't needless crash on 32-bit systems
Chris Wilson [Wed, 12 Dec 2012 13:56:09 +0000 (13:56 +0000)]
tests/gem_tiled_swapping: Don't needless crash on 32-bit systems

Only 32-bit of mmap address space, but with PAE we may be trying to
allocate more than 4 GiB of memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/prime_nv_pcopy.c: fail if nouveau_pushbuf_kick fails rather than spinning
Maarten Lankhorst [Tue, 11 Sep 2012 17:01:46 +0000 (19:01 +0200)]
tests/prime_nv_pcopy.c: fail if nouveau_pushbuf_kick fails rather than spinning

11 years agotests: disable gem_exec_bad_domains/conflicting-write-domain
Daniel Vetter [Fri, 7 Dec 2012 22:34:23 +0000 (23:34 +0100)]
tests: disable gem_exec_bad_domains/conflicting-write-domain

Kernel checks have been eased in

commit c1f093e09c4ceb583b04d11e767bb3201812e4d2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Dec 3 11:49:07 2012 +0000

    drm/i915: Remove check for conflicting relocation write-domains

11 years agotests: Add a basic test for tiled render copies
Chris Wilson [Thu, 6 Dec 2012 20:36:24 +0000 (20:36 +0000)]
tests: Add a basic test for tiled render copies

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agoImplement a working gen7 rendercopy
Chris Wilson [Thu, 6 Dec 2012 17:18:52 +0000 (17:18 +0000)]
Implement a working gen7 rendercopy

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: Add basic test for render blits
Chris Wilson [Thu, 6 Dec 2012 19:32:14 +0000 (19:32 +0000)]
tests: Add basic test for render blits

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agopci: Search for the first Intel GPU, rather than assume a fixed slot
Chris Wilson [Thu, 6 Dec 2012 12:16:12 +0000 (12:16 +0000)]
pci: Search for the first Intel GPU, rather than assume a fixed slot

Everywhere else we search for a match based on an Intel display
device, so if the quick check of the fixed slot fails, fallback to
walking the PCI bus looking for a match.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_exec_nop: implemented correct SKIP reporting
Daniel Vetter [Wed, 5 Dec 2012 18:29:11 +0000 (19:29 +0100)]
tests/gem_exec_nop: implemented correct SKIP reporting

I think I need a testsuite for test writing.

11 years agotests/gem_dummy_reloc_loop: some updates
Daniel Vetter [Wed, 5 Dec 2012 09:09:08 +0000 (10:09 +0100)]
tests/gem_dummy_reloc_loop: some updates

- convert to subtests
- shut up stderr output for successful runs

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: fixup gem_exec_nop subtests
Daniel Vetter [Wed, 5 Dec 2012 03:16:38 +0000 (04:16 +0100)]
tests: fixup gem_exec_nop subtests

Note to self: No more pushing after 12 o'clock midnight. Not a good
idea, too embarassing.

11 years agotests: run no-op batches on all rings
Daniel Vetter [Tue, 4 Dec 2012 16:13:05 +0000 (17:13 +0100)]
tests: run no-op batches on all rings

For Ben ...

11 years agotests: add gem_seqno_wrap
Mika Kuoppala [Tue, 4 Dec 2012 17:43:13 +0000 (19:43 +0200)]
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>
11 years agoREADME: piglit requires results-file for testruns
Daniel Vetter [Tue, 4 Dec 2012 09:42:15 +0000 (10:42 +0100)]
README: piglit requires results-file for testruns

Noticed by Mika.

11 years agotests/Makefile.am: Add a comment about the subtest infrastructure
Daniel Vetter [Tue, 4 Dec 2012 09:37:55 +0000 (10:37 +0100)]
tests/Makefile.am: Add a comment about the subtest infrastructure

11 years agoREADME: add quick howto for using piglit as testrunner
Daniel Vetter [Tue, 4 Dec 2012 09:34:46 +0000 (10:34 +0100)]
README: add quick howto for using piglit as testrunner

11 years agotests/gem_flink: check flink lifetime rules
Daniel Vetter [Sat, 1 Dec 2012 12:07:45 +0000 (13:07 +0100)]
tests/gem_flink: check flink lifetime rules

flink names may not be destroyed while there's still a userspace
handle around. Test this by
- exporting an flink name from fd2
- open a gem bo from that name in fd
- close fd2, then open a new drm file (so that the original handle
  disappears)
- check whether the same flink name still works

11 years agotests/gem_exec_bad_domains: add more bad domains
Daniel Vetter [Fri, 30 Nov 2012 23:51:53 +0000 (00:51 +0100)]
tests/gem_exec_bad_domains: add more bad domains

- mulitple write domains
- conflicting write domains
- not-yet-defined gpu domains

Also convert to subtests while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotools/intel_reg_dumper: add some cpt/ppt debug regs
Daniel Vetter [Fri, 30 Nov 2012 23:52:24 +0000 (00:52 +0100)]
tools/intel_reg_dumper: add some cpt/ppt debug regs

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_stress: prevent segfault in getopt parsing
Daniel Vetter [Thu, 29 Nov 2012 14:01:09 +0000 (15:01 +0100)]
tests/gem_stress: prevent segfault in getopt parsing

Needs a terminal element in the long option array.

11 years agolib: extract get_render_copyfunc
Daniel Vetter [Thu, 29 Nov 2012 13:59:57 +0000 (14:59 +0100)]
lib: extract get_render_copyfunc

Otherwise we won't update all the tests if we add new render
copyfuncs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: disable gem_non_secure_batch
Daniel Vetter [Thu, 29 Nov 2012 10:27:32 +0000 (11:27 +0100)]
tests: disable gem_non_secure_batch

Seems to cause hangs on some of my old gen2/3 machines, but not all of
them.

11 years agotests/gem_tiled_partial_pwrite_pread: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 12:25:12 +0000 (13:25 +0100)]
tests/gem_tiled_partial_pwrite_pread: convert to subtest infrastructure

11 years agotests/gem_tiled_partial_pwrite_pread: refactor subtests into functions
Daniel Vetter [Wed, 28 Nov 2012 12:22:39 +0000 (13:22 +0100)]
tests/gem_tiled_partial_pwrite_pread: refactor subtests into functions

11 years agotests/gem_set_tiling_vs_blt: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 12:10:26 +0000 (13:10 +0100)]
tests/gem_set_tiling_vs_blt: convert to subtest infrastructure

11 years agotests/gem_ringfill: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 12:08:20 +0000 (13:08 +0100)]
tests/gem_ringfill: convert to subtest infrastructure

11 years agotests/gem_partial_pwrite_pread: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 12:08:07 +0000 (13:08 +0100)]
tests/gem_partial_pwrite_pread: convert to subtest infrastructure

11 years agotests/gem_partial_pwrite_pread: refactor subtests into functions
Daniel Vetter [Wed, 28 Nov 2012 11:47:26 +0000 (12:47 +0100)]
tests/gem_partial_pwrite_pread: refactor subtests into functions

This was a too big mess.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_mmap_gtt: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 11:40:23 +0000 (12:40 +0100)]
tests/gem_mmap_gtt: convert to subtest infrastructure

11 years agotests: re-enable gem_hangcheck_forcewak
Daniel Vetter [Wed, 28 Nov 2012 11:38:00 +0000 (12:38 +0100)]
tests: re-enable gem_hangcheck_forcewak

Was accidentally disable in ab3f4bdafe60dede32a48674ef9920df090bf3a7

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_gtt_concurrent_blit: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 11:35:03 +0000 (12:35 +0100)]
tests/gem_gtt_concurrent_blit: convert to subtest infrastructure

Same treatment as for gem_cpu_concurrent_blit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_flink: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 11:17:40 +0000 (12:17 +0100)]
tests/gem_flink: convert to subtest infrastructure

11 years agotests/gem_cs_tlb: convert to subtests
Daniel Vetter [Wed, 28 Nov 2012 11:09:58 +0000 (12:09 +0100)]
tests/gem_cs_tlb: convert to subtests

Again required a bit of shuffling to avoid expensive setup and some
logic to properly handling 'skip' when only running a subtest.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_cpu_concurrent_blt: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 11:00:33 +0000 (12:00 +0100)]
tests/gem_cpu_concurrent_blt: convert to subtest infrastructure

Small changes to avoid expensive setup just to print out the subtest
list, and setting up the source buffers such that "early-read" works
without having run "overwrite-soure" right beforehand.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_cacheing: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 10:41:33 +0000 (11:41 +0100)]
tests/gem_cacheing: convert to subtest infrastructure

11 years agotests/gem_basic: convert to subtest infrastructure
Daniel Vetter [Wed, 28 Nov 2012 10:16:44 +0000 (11:16 +0100)]
tests/gem_basic: convert to subtest infrastructure

11 years agotests/flip_test: use subtest infrastructure
Daniel Vetter [Tue, 27 Nov 2012 19:33:15 +0000 (20:33 +0100)]
tests/flip_test: use subtest infrastructure

To make the testnames easier to handle in scripts, replace all
spaces with dashes.

The important part is to not print anything to stdout when enumerating
subtests, so protect the timestamp test with the right check.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: subtest infrastructure
Daniel Vetter [Tue, 27 Nov 2012 19:03:25 +0000 (20:03 +0100)]
lib/drmtest: subtest infrastructure

To make these helpers as least invasive as possible simply initialize
the options with a getopt parser and let the control flow be steered
with a simple helper which gets the subtest name as an argument.

The only tricky part for using it is that the subtest check helper
doubles up as the conduit to enumerate tests (and in that mode
prevents any test from being run). It is therefore important that
nothing gets printed to stdout outside of these checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: dont polute stderr if the test succeeds/skips
Daniel Vetter [Tue, 27 Nov 2012 19:04:15 +0000 (20:04 +0100)]
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>
11 years agotests: remove ZZ_check_dmesg from runner
Daniel Vetter [Tue, 27 Nov 2012 15:38:43 +0000 (16:38 +0100)]
tests: remove ZZ_check_dmesg from runner

This is getting in the way of piglit integration. If we want this
functionality again, we should integrate it into the IGT piglit runner
as an option.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: infrastructure for piglit runner
Daniel Vetter [Wed, 28 Nov 2012 10:08:31 +0000 (11:08 +0100)]
tests: infrastructure for piglit runner

Piglit needs a way to grab the latest list of tests to run, so add new
make targets to dump those. Note that for future extendability we'll
dump 2 different lists, one for single-testcase tests and one for
testcases with enumerable subcases. Some support code for the later
will follow in subsequent patches.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotestdisplay: Use the fb stride when painting the color key
Damien Lespiau [Tue, 27 Nov 2012 19:14:05 +0000 (19:14 +0000)]
testdisplay: Use the fb stride when painting the color key

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55901

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: add gem_non_secure_batch
Daniel Vetter [Sun, 25 Nov 2012 12:55:55 +0000 (13:55 +0100)]
tests: add gem_non_secure_batch

11 years agoflip_test: switch to using monotonic timestamps (v2)
Imre Deak [Thu, 22 Nov 2012 14:46:36 +0000 (16:46 +0200)]
flip_test: switch to using monotonic timestamps (v2)

Since monotonic timestamps are now the preferred time format, change
timestamps checks to compare against monotonic instead of real time.
Also add two tests for DRM's compatibility mode where it returns real
timestamps.

v2: drop the tests for the compatibilty mode (Daniel)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: use monotonic time to measure the test duration
Imre Deak [Thu, 22 Nov 2012 13:25:05 +0000 (15:25 +0200)]
flip_test: use monotonic time to measure the test duration

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoflip_test: skip check for last_received_ts for the first event
Imre Deak [Thu, 22 Nov 2012 13:25:04 +0000 (15:25 +0200)]
flip_test: skip check for last_received_ts for the first event

The old way worked too, but just skipping the test for the first event
is more logical/simpler thing to do.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoflip_test: add wf-vblank test for expired sequence
Imre Deak [Tue, 23 Oct 2012 09:07:52 +0000 (12:07 +0300)]
flip_test: add wf-vblank test for expired sequence

In v2:
- Wait for the seq that just completed (current_seq) not last_seq - 1.
- Do an equality check for ts and seq instead of >=. The previous
  issue didn't let us do this before.
- Simplify the condition when we do an "expired sequence" check by
  only using the last flip event as a reference.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoflip_test: add comment about the race between flip vs. vblank events
Imre Deak [Mon, 22 Oct 2012 17:40:07 +0000 (20:40 +0300)]
flip_test: add comment about the race between flip vs. vblank events

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoflip_test: check if the vblank and flip states correlate
Imre Deak [Mon, 22 Oct 2012 17:40:06 +0000 (20:40 +0300)]
flip_test: check if the vblank and flip states correlate

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoflip_test: fixup zero timestamp for premature vblanks
Imre Deak [Mon, 22 Oct 2012 17:40:05 +0000 (20:40 +0300)]
flip_test: fixup zero timestamp for premature vblanks

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoflip_test: increase duration for vbl+flip tests with ts check
Imre Deak [Mon, 22 Oct 2012 17:40:04 +0000 (20:40 +0300)]
flip_test: increase duration for vbl+flip tests with ts check

We need a big enough duration, so the hotplug event's affect doesn't
distort our final frame count too much.

Without this these tests will exit with a "dropped frames" error.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_cs_tlb: make it more robust
Daniel Vetter [Thu, 18 Oct 2012 20:37:20 +0000 (22:37 +0200)]
tests/gem_cs_tlb: make it more robust

... using a fine roll of duct-tape. Dunno what exactly leaks out from
the previous testcase, but the bo gets moved about a bit and makes the
self-check of the test fail.

12 years agoflip_test: check whether wait_vblank fails when it should
Daniel Vetter [Wed, 17 Oct 2012 09:09:13 +0000 (11:09 +0200)]
flip_test: check whether wait_vblank fails when it should

12 years agoflip_test: drop vblank vs. pan
Daniel Vetter [Tue, 16 Oct 2012 22:35:43 +0000 (00:35 +0200)]
flip_test: drop vblank vs. pan

pageflip vs. pan is interesting since we wait for outstanding flips
before updating the fb base address. For vblank absolutely nothing
interesting happens.

12 years agoflip_test: tune test-durations a bit
Daniel Vetter [Tue, 16 Oct 2012 22:34:43 +0000 (00:34 +0200)]
flip_test: tune test-durations a bit

15 seconds for timestamp checkers (to at least hit the dreaded hotplug
once), 5 seconds for fast tests that check every vblank something, 30
for slow test (dpms/modeset cycles).

12 years agoflip_test: add wait-for-vblank tests
Imre Deak [Tue, 16 Oct 2012 02:43:19 +0000 (05:43 +0300)]
flip_test: add wait-for-vblank tests

Signed-off-by: Imre Deak <imre.deak@intel.com>
[danvet: add {} for multi-line but single-statement if block.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoflip_test: add check to see if any event has occured
Imre Deak [Tue, 16 Oct 2012 01:11:43 +0000 (04:11 +0300)]
flip_test: add check to see if any event has occured

At the moment select() would time out in case we don't get any event.
When we add vblank events in a later patch, it's possible that we
receive one type of events but not the other type. In this case select()
doesn't time out and we need another way to detect this.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: add event sequence number tracking
Imre Deak [Tue, 16 Oct 2012 01:09:43 +0000 (04:09 +0300)]
flip_test: add event sequence number tracking

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: add logic to track pending events
Imre Deak [Mon, 15 Oct 2012 22:47:15 +0000 (01:47 +0300)]
flip_test: add logic to track pending events

When we add the vblank tests later, it can happen that one type of event
is pending while we are servicing another. Prepare for that by
maintaining a pending/completed event mask.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: make page flip tests conditional
Imre Deak [Mon, 15 Oct 2012 22:47:15 +0000 (01:47 +0300)]
flip_test: make page flip tests conditional

Since later we want to add vblank tests where we don't want to flip,
make the flips and corresponding state checks conditional.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: unify the name of the current test in status messages
Imre Deak [Mon, 15 Oct 2012 18:18:40 +0000 (21:18 +0300)]
flip_test: unify the name of the current test in status messages

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: store the pipe id in the test context obj
Imre Deak [Mon, 15 Oct 2012 18:15:18 +0000 (21:15 +0300)]
flip_test: store the pipe id in the test context obj

For DRM_IOCTL_WAIT_VBLANK we'll have to pass the pipe id - as opposed to
the crtc id required by the rest of the IOCTLs we use.

Thanks for Chris Wilson for pointing this out.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: don't skip checks for sequence #1
Imre Deak [Tue, 16 Oct 2012 13:18:08 +0000 (16:18 +0300)]
flip_test: don't skip checks for sequence #1

So far we skipped some tests for seq#0 and #1, since at that point we
were missing the 'last' state against which we could compare the current
state. Since in the previous patches we fixed the ordering in the test
loop and moved the increment of count to the update state phase, we have
a proper 'last' state for seq#1, so enable the tests already at that
point.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: factor out the event state
Imre Deak [Mon, 15 Oct 2012 17:37:01 +0000 (20:37 +0300)]
flip_test: factor out the event state

Factor out the status vars that are specific to the flip events into a
separate structure. This will allow us tracking the vblank events with
the same code.

We move the increment of the flip event counter to the end of the test
loop, but this shouldn't affect anything. This is the only functional
change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: swap the order of check state/run test step
Imre Deak [Mon, 15 Oct 2012 23:41:02 +0000 (02:41 +0300)]
flip_test: swap the order of check state/run test step

At the moment we first check the state then run the test step in our
test loop. Swapping the order makes the starting state of each iteration
better defined, allowing an easier extension of these steps in the
future.

Since now it's guaranteed that we exit the event loop with no pending
flips, we can also get rid of the final flushing of events.

We don't want the first initializing flip to affect the test loop other
than setting an initial FB, so before starting the test loop wait for it
to complete by calling wait_for_events() and leave the flip event
counter at zero.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: split the flip handler into logical parts
Imre Deak [Mon, 15 Oct 2012 23:37:15 +0000 (02:37 +0300)]
flip_test: split the flip handler into logical parts

The handler consits of handle_event/run_test/check_state/update_state
logical steps, split the function accordingly. This is needed by the
following patches that need to do part of these steps for both flip and
vblank events.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: store current flip/received timestamps in the context obj
Imre Deak [Mon, 15 Oct 2012 23:26:35 +0000 (02:26 +0300)]
flip_test: store current flip/received timestamps in the context obj

This is needed by the next patch that splits the flip handler function
into logical parts. Make the timestamps accesible to these parts.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
12 years agoflip_test: factor out the final state check
Imre Deak [Tue, 16 Oct 2012 02:50:22 +0000 (05:50 +0300)]
flip_test: factor out the final state check

Needed by an upcoming patch where we want to make a final state check
for both the flip and vblank events.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>