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>
We have to disable the "shadow idle; skipping" test if the CRTCs are
showing stale content following a sna_crtc_attach().
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89904
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Make sure we clear the scanout even after the error paths before
attaching the shadow buffer (in case it is full of unwanted junk).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In cases of stress, we use a timer to create a fake vblank event and
then we adjust the timer when it fires to match it up with the CRTC msc.
However, sometimes we fire before the vblank but less than a millisecond
and so below the precision of the timer causing us to send notifies too
early. Use a blocking vblank wait to fixup these rare cases.
Testcase: present/notify/accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise we may process a SIGIO moving the cursor away from the CRTC
causing us to remove the cursor and then process a stale pointer inside
the modeset after the signal is complete.
Reported-by: Chris Bainbrigde <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.
v2:
commit 226a58bc59
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Apr 4 20:58:24 2015 +0100
sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it
Tried to fix it by disabling SourceValidate. However, it a direct hook
into the Damage code by miSprite that triggers the copy. Since there
appears to be no way to intervene, we just mark that copy as internal
and ignore it.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So we don't disable the hwcursor when we have a rotation set but not all
pipes activated.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Suggested by Emil Velikov:
Normally hard coding pkg-config is considered a bad idea. Please
try PKG_CHECK_EXISTS - it would work like a charm when
cross-compiling.
Cheers
Emil
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We were not updating the window->crtc for the immediate swaps with the
result that after switching CRTCs, we were requesting a vblank on the
wrong pipe and triggering an error path (forcing the blit and negating
the elision).
Testcase: test/dri2-speed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We expect mesa nowadays to preferentially use the render pipeline for
doing its clears and so want to avoid handing it back an active BLT bo
if we don't have semaphores (as that would cause a sync).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to make tools indivdiually selectable for compiling, we don't
want to override earlier tools - so use '+=' rather than a plain '='
when adding each tool to the set of PROGRAMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
present.flush is called on the Window after a copy from a Pixmap is
completed - which will be naturally flushed anyway. What the API should
be passing is the Pixmap, since we do want to flush the operations from
it before sending the idle event. C'est la vie.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When emitting batches early for improved GPU/CPU concurrency, we only
want to do so if the target ring is not busy. However, if the batch
requires a semaphore, we also need to consider the other ring as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We improve dispatch latency if after creating a command buffer we
immediately submit if the GPU is idle. This improves concurrency as we
continue to build the next command buffer as the GPU executes and helps
prevent needlessly using one engine for too long (i.e. sometimes we may
be able to execute the work much early and do the ring switch cheaply).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since knowing which ring the bo is currently active on is important when
considering the impact of semaphores on the next operation, be sure to
query it on foreign bo before we use them.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Even on GT3, it is preferrential to use the blitter if the copy is small
(due to the latency in execution).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Even on GT3, it is preferrential to use the blitter if the copy is small
(due to the latency in execution).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Disabling the outputs and trying again can only possibly help in the
case of fragmentation. In all other failures modes (typically GPU hang)
it just causes a slow flash of the display.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
It's white lie that only is technically required for gen2, and works
around a massive performance hit on gen7.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Properties may refresh quickly, more often than the output status
changes. We want to query the properties without doing a forced probe,
so make sure we refresh the values if the user requests a property.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The preferred all-inclusive method for finding alloca().
Reported-by: Richard Palo <richard@netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89762
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We need to include <sys/mkdev.h> on Solaris.
Reported-by: Richard Palo <richard@netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89763
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>