Commit Graph

109 Commits

Author SHA1 Message Date
Chris Wilson 47cd7fdd0b test: Exercise XVidMode switching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-04 12:34:37 +01:00
Chris Wilson ebe86fdaa9 test/dri2-race: Don't leak the Display after detecting the race
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-30 14:44:55 +01:00
Chris Wilson c186d4dda3 sna/present: Restrict vblank.sequence range to 31bits
The kernel checks for past vblanks using an int32_t comparison, so we
can only program up to 31bits into the future (and similarly programing
a timer that large would also overflow).

References: https://bugs.freedesktop.org/show_bug.cgi?id=94685
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-24 18:30:50 +00:00
Chris Wilson 68913715a2 test: Look at Present scaling with number of cpus
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16 14:18:56 +00:00
Chris Wilson cd864c0055 tests: Anticipate Present reporting too early
Given Present bugs, any completion event may be sent too early and
out-of-order. Make sure we drain all outstanding events before
continuing on to the next test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16 14:18:56 +00:00
Chris Wilson e042b5d825 tests: Add DRI2 race against window resize + Composite redirection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16 09:47:24 +00:00
Chris Wilson a0bf3c1f48 test/present: Catch FPE when notifies are broken
If the Xserver reports 10 frames passed instantaneously, flag an error
rather than divide by zero.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-15 21:30:49 +00:00
Chris Wilson b2cd809fe2 test/dri2-race: Tweak runtimes
When we specify a divider we are looking for slightly different races
that are in theory not so timing dependent (since we are using vrefresh
windows). However, since they each take some multiple of vblanks to
complete, they are much slower. We should be able to reduce the number
of iterations without losing detection capability.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-13 08:49:21 +00:00
Chris Wilson de7407d207 test/dri2-race: Add a set of races against Client death
Try terminating the client using XKillClient and seeing if we can find
any races with Client shutdown.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-10 11:56:08 +00:00
Chris Wilson 3aab368412 test/dri2-race: Use loops for iterating over divisor tests
Expand the test cases slightly to check high dividers everywhere.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-10 10:50:04 +00:00
Chris Wilson 1c95b7e811 test/dri2-test: Add WaitMSC accuracy tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-03 09:58:05 +00:00
Chris Wilson 65e6bae3ac test: Add present-race
A simple demonstration of what may go wrong when a Window is destroyed
by another client such as the window-manager.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-03 09:58:04 +00:00
Chris Wilson 84e824873b test/dri2-race: Capture race between window-manger and clients
If the window manager closes the Window before the client disconnects,
we can end up with a blocked client as dri2 does not call AttendClient()
in its DRI2DrawableGone.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-02 17:19:48 +00:00
Chris Wilson 66e16d97ee test: Exercise copyplane
Reported-by: Omar Sandoval
References: https://bugs.freedesktop.org/show_bug.cgi?id=91499
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-29 09:45:47 +01:00
Chris Wilson 324ba96520 tests/render-trapezoid: Add edge tests
Check fidelity of edge rendering, just a variant of render-triangle

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-19 10:45:37 +01:00
Chris Wilson 3852977f14 test: Add a fidelity test for triangle edge rendering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-18 13:14:42 +01:00
Chris Wilson d4c82a16bc test: Remove the blit through a temporary Pixmap
Originally this was inplace so that we wouldn't simply migrate the
target away from the GPU whenever we inspected results. That is no
longer a problem and so we can speed up the tests by skipping the
temporary.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-18 09:16:12 +01:00
Chris Wilson b10ef9cf5c sna/glyphs: Improve handling of low bitdepth mask format conversions
We shouldn't just discard the mask if the user requests that we render
the glyphs through a low bitdepth mask - and in doing so we should also
be careful not to improve the bitdepth of that mask (since we don't take
into account the extra quantisation desired).

Testcase: render-glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-18 09:05:30 +01:00
Chris Wilson 65cc48757e test/present: Do a double flip to test tiling changes
Since the first flip may require a fixup, we will only really know with
the second flip whether we can start a flip chain with different tiling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-21 15:06:18 +01:00
Chris Wilson 75037efcd7 test/dri3: Add an explicit DRI3 extension check first
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-20 15:00:47 +01:00
Chris Wilson 7eaf593640 sna/present: Reuse last cached swap msc/ust during a flip chain
Querying the known swap values is much slower than not!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-18 12:37:42 +01:00
Chris Wilson c47fd1dcad test/present: Synchronize MSC notifiy modulus test to the vblank
As the test presumes we can queue all the modulus queries within the
same vblank, we can improve matters by synchronizing to the next vblank
first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 14:02:41 +01:00
Chris Wilson a00ed98131 test/present-speed: Disable idle event reporting for no-copy overhead test
Reduce the overheads in the server for better measurements.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 11:39:49 +01:00
Chris Wilson d348f897c8 test/present: Expland MSC accuracy test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 21:33:40 +01:00
Chris Wilson 6de85a1e60 test/present: Include composite redirected windows in the test matrix
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 21:13:38 +01:00
Chris Wilson 990ca393fd test/present-speed: Reneable normal testing
Oops, debug leftover.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 17:13:54 +01:00
Chris Wilson f4588b64e2 test/present-speed: Export the pixmap over DRI3
Improve the DRI3 simulation by exporting the Pixmap to force DRI3
syncflushes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 17:03:02 +01:00
Chris Wilson af2da32574 test/present-speed: More measurement for different swap methods
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 10:52:21 +01:00
Chris Wilson fd12095f89 test/present: Also test swaps on windows (as well as full screen flips)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 10:52:21 +01:00
Chris Wilson 61da72c076 test/present-speed: More buffers required to hit maximal framerates
5 buffers are required for swap elision, plus an extra or two for IPC
scheduling jitter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-04 19:38:49 +01:00
Chris Wilson 459efa036e test/dri2: Reset swap-interval after testing async swapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 22:50:54 +01:00
Chris Wilson 3c3f7d7df4 test/dri2: Check vblank waits
Make sure that waiting 60 times for a vblank, 60 msc pass

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 22:50:19 +01:00
Chris Wilson 0814dc41c3 test/present-speed: Include a measure for fence signalling overhead
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 15:13:43 +01:00
Chris Wilson 019402f8ca test: Test tiling across DRI3/Present
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-24 17:27:15 +00:00
Chris Wilson 9e39bea9d3 tests: Add basic present benchmark
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-20 14:40:09 +00:00
Chris Wilson 1877c8f508 test/present: Compact flip queue checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-16 12:00:20 +00:00
Chris Wilson b9eeb9dd84 test/present: Tighten MSC modulus computation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-16 09:45:17 +00:00
Chris Wilson 3382bd78d9 test/present: Test notifier accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-15 19:21:01 +00:00
Chris Wilson 35ab0afd04 test/present: Automatically disable DPMS
DPMS plays havoc with Present timings, make sure the screen doesn't turn
off.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 21:10:25 +00:00
Chris Wilson 9eb0ab15b1 test/present: Look for MSC wraparound
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 17:10:13 +00:00
Chris Wilson 254f2f2f4b test/present: Check a simple double-buffer sequence
Just check that we can do a present roundtrip in time to submit a new
frame on the next vblank.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 17:10:13 +00:00
Chris Wilson 92f74186b0 test/present: Include test for timing accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 17:10:13 +00:00
Chris Wilson 9d4df75edb test/present: Check modulus computation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 14:47:30 +00:00
Chris Wilson 51f184edfb test/present: Tighten the accuracy requirements
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 13:51:04 +00:00
Chris Wilson ac1eb7f7c9 test/present: Test accuracy of long pauses
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 13:51:04 +00:00
Chris Wilson 688f5e9bd7 sna/present: Compensate for time elapsed since last swap
When computing the delay for the fake flip, compensate for any time
elapsed since the last frame in order to hit the desired vblank more
accurately. A side-effect of this is that we may now compute 0 delay
timers which require special handling.

Testcase: present-test/accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-11 22:16:25 +00:00
Chris Wilson 8b8b1021f4 test/dri2-race: Mix immediate flips with delayed flips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-11 12:09:01 +00:00
Chris Wilson fc010846b1 test/dri2-race: Actually queue a number of future WaitMSC
In order to have outstanding WaitMSC when the Client quits or the Window
is destroyed, we need to use the xcb version so as not to immediately
block on the play.

And also print keepalive dots to console as test progresses.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-11 11:06:49 +00:00
Chris Wilson 4f5d7825df test/present: Return the correct error counter from for_each_crtc
When the xserver is fixed and we no longer block for ever inside the
test, we can see that the test itself falsely reports failure!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-11 10:34:47 +00:00
Chris Wilson 426a3afcc6 sna/present: Prevent DoS from exhausting the kernel vblank queue
The kernel caps the number of vblanks per client to 128. There are
already reports from the wild that Present clients are running foul of
that limit, so supplement it with a timer fallback.

Testcase: present-test with future flips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-11 09:51:43 +00:00