31 Commits

Author SHA1 Message Date
Imre Deak
f1b1729a8a flip_test: reset the state for each test run
Each test run needs a clean state.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16 16:52:14 +02:00
Imre Deak
472e8a70c2 flip_test: free FBs after each test run
Though the FBs will be freed implicitly at process exit, with the
growing number of test cases it's probably better not to let them
accumulate and free them as soon as we can.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16 16:52:04 +02:00
Daniel Vetter
dc5d76e2bf tests/flip_test: check -EBUSY and -EINVAL behaviour
We want -EBUSY for a pending flip and -EINVAL if the pipe is off
(either dpms off or completely off). With the small exception that
someone thought it would be funny to return -EBUSY when the crtc is
fully off.
2012-10-04 22:09:16 +02:00
Daniel Vetter
826326bc7c flip_test: fix timestamp order
When grabbing the timestamp after a flip, it has a decent chance to
actually be after the flip. Surprising.
2012-10-03 23:16:18 +02:00
Daniel Vetter
9965299cf3 flip_test: add an explicit flag for timing checks
We'll need this for the wait_vblank test cases.
2012-10-03 08:26:46 +02:00
Daniel Vetter
43737163d3 flip_test: increase runtime of the plain flip to 15s
This ensures that we'll hit the stupid hpd poll handler in every run.

Also don't yell around about jitter for tv outputs ...
2012-10-02 19:45:52 +02:00
Daniel Vetter
400535e82f tests/flip_test: measure inter-frame ts jitter
Yell if it's wrong.

For some odd reason this blows up on my snb. And always on the same
o->count frame on the 2nd crtc ... And we have to thank the hpd poll
helper for that. Comment explaining this added, also made the error
non-fatal.
2012-10-02 19:39:17 +02:00
Daniel Vetter
87f7dccab6 flip_test: race against modesets, too
Even slower than dpms switching ;-)
2012-10-02 19:39:17 +02:00
Daniel Vetter
d619a672df tests/flip_test: also test pannning with dummy load
Needs a bit more relaxed select timeout to work (which is not
required when testing dummy_load vs. dpms, since the dpms forces the
sync, not the select timeout).
2012-10-02 17:22:09 +02:00
Daniel Vetter
66fe119afd tests/flip_test: test interaction with panning
Since panning with set_crtc is synchronous, we need to stall for any
outstanding pageflips. This new testcase exercise that code. Unfortunately
we still need eyes to check whether we don't loose the offset :(
2012-10-02 17:17:40 +02:00
Daniel Vetter
3441ad29bf tests/flip_test: robustifications
- don't yell around about dropped frames on tv connectors (and explain
  why in a comment)
- wait a bit when using a test config that checks for dropped frames before
  starting. Also allow for 1% of fudge, this makes it reliably work
- make the dummy load more variable, took too long on older machines.
2012-10-02 17:01:06 +02:00
Daniel Vetter
cdad308a4b tests/flip_test: don't complain about timestamps in the future
those can happen due to the scanline vblank timestamp adjuster ...
2012-10-02 16:09:00 +02:00
Daniel Vetter
4c7fc65cb6 tests/flip_test: actually try to check what I want to check
/me sucks
2012-10-02 15:59:58 +02:00
Daniel Vetter
6b034a6fd6 tests/flip_test: check whether timestamp isn't in the past
This is mostly useful for when we add support for other clock sources,
e.g. clock_monotic, to check whether the kernel picked the right
clock.
2012-10-02 15:42:34 +02:00
Daniel Vetter
73af035c59 tests/flip_test: check whether the pageflip event took too long
We're suspecting that something is fishy with the event deliver/vblank
timestamp handling on gmch platforms. Unfortunately, this isn't it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-02 15:37:24 +02:00
Chris Wilson
f509d40fa9 flip_test: count the number of flips and check we don't drop any
In the basic case of just flipping between two buffers with no
additional work, we should neve drop a frame.
2012-10-02 13:31:33 +01:00
Daniel Vetter
93ea0182c4 tests/flip_test: re-enable disabled testcases
oops
2012-10-02 11:50:20 +02:00
Daniel Vetter
4701dacbc5 tests/flip_test: new testcase with a busy load before the flip
I've hoped that this would be good enough to hang pch platforms, but
it looks like those just complete the flip immediately on disabled pipes.
2012-10-02 10:33:13 +02:00
Chris Wilson
a65087a26e tests/flip_test: Revamp to demonstrate race with modeset/dpms and pageflips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-28 13:02:46 +01:00
Ben Widawsky
bc62567b77 clang: Fix static analysis warnings from clang
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:20:52 -07:00
Alan Coopersmith
4cdfa8e9b7 flip_test: add cast to pacify Solaris Studio compiler
Fixes build error:
"flip_test.c", line 180: improper pointer/integer combination: op "="

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:27 +02:00
Daniel Vetter
efa5e355ac test/flip_test: don't fail if we can't find a crtc
some connectors are forced to certain crcs ...
2012-07-23 13:38:40 +02:00
Daniel Vetter
434be47f12 shut up the compiler a bit
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23 09:52:10 +02:00
Daniel Vetter
96c2fc82ba test/flip_test: fail harder
We want testcase to return non-zero if they fail ...
2012-05-22 19:54:22 +02:00
Daniel Vetter
17787f30c6 lib: extract kmstest_dump_mode 2012-05-22 16:15:15 +02:00
Daniel Vetter
b7aa6756ce test/flip_test: use kmstest_create_fb
And bring back some frame indication that actually works.
2012-05-22 16:12:04 +02:00
Daniel Vetter
0732cc59ab tests: use drm_open_any more
And fix it up to not leak open fds, which kills all the master only
stuff.
2012-05-22 12:01:36 +02:00
Daniel Vetter
a5e6897d10 tests/flip_test: rip out usage
Totally useless if the only option is "-h"
2012-05-22 10:57:17 +02:00
Daniel Vetter
9e620146f7 tests/flip_test: rip out funny pictures
The path isn't properly autodetected and it yells stupid stuff into
stderr. Which causes spurious failures.

And really, these are automated tests. If you need to look at the output,
something is wrong.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22 10:51:29 +02:00
Jesse Barnes
e70b7de8ce tests/flip_test: test on each CRTC for each detected output
This allows us to test on 3 pipe configs for example.
2012-05-07 12:57:05 -07:00
Jesse Barnes
362599ac10 tests: add simple flip test
Add a simple flip test to test flipping on a single output with the
preferred mode.

TODO: test each crtc for 3s and print pass/fail results
2012-05-07 12:36:28 -07:00