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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>