Age | Commit message (Collapse) | Author |
|
Since both DRI2 and DRI3 manipulate the sna_pixmap->flush flag, we have
to relaxation assertions that it is wholly owned by DRI2.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the source is only being exported for reading, we can skip adding it
to the flush list only to perform a no-op.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
commit d1bf75f155f87d3a14d647316a0ba1f40d3957a6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Jun 1 08:56:43 2015 +0000
sna: Compilation fixes for stable distros
set the flag incorrectly - only future Xorg will do the damage
application itself.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we have no fence, we then try to discard the tiling. However, the
change_tiling routine assumes that it is only called when a change is
actually required. Make it so for dri2.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we export a surface over DRI2/DRI3, we have to use explicit tiling
via the kernel. :(
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The preference given multiple rings is to the previous writer, or if
none, to the render ring if active.
References: https://bugs.freedesktop.org/show_bug.cgi?id=90671
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the pixmap's GPU bo is already allocated with Y, expect Mesa to deal
with it rather than convert to X.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Querying the known swap values is much slower than not!
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 226a58bc592d4ed305b7ad0e460f1ee2548e0ddf
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>
|
|
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>
|
|
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
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>
|
|
A dropped if(!NULL) check from the previous patch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to be more like Windows and inflate benchmark results.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we limit the swaps, then doing xrandr --output -off causes unity to
misrender. Not quite sure why, but the revert is easy.
Fixes regression from
commit 88e84320a3a8b3faf20941d666ab846fe12b7a67
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Feb 24 12:44:19 2015 +0000
sna/dri2: Flush triple buffer swap on [un]redirection
but we still keep the async-swap fixes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89371#c14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When we enable buffer-age and Clients start taking advantage of that by
only submitting trimmed flips (SwapBuffersWithDamage) we don't want to
then lose that by randomly injecting new buffers into the mix (thereby
forcing the client to repaint the entire buffer and us to damage all
outputs). As new buffers are relatively rare, especially in a
steady-state game scenario, spend a few cycles to initialise the new
buffer with the current back buffer contents.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the future, I anticipate moving the application of damage into the
core dri2 (so that clients can specify the damage region for flips).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If multiple Clients intermix DRI2GetBuffers and DRI2GetBuffersWithFormat
we can end up with format mismatches. Rectify this by checking the
bitsPerPixel of the buffer instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Try to avoid more clflushing on the current Pixmap if we have a
scanout-ready bo in the cache. We also note that since we unflip before
any other drawing takes place, we do not need to mark the flipped Pixmap
as being pinned to the scanout.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Allow a request to swap on the next frame to be considered by the
immediate handling code by refactoring the target msc computation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we swap between Clients, or even Windows, then we may have a flip
still pending completion in hardware but no longer tracked in order to
release the freed state. In this scenario, queue the flip via a vblank
event.
Testcase: dri2-race with non-immediate flips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The executive decision has been made to render DRI2 inoperable with
render-nodes, so keep on passing the master device path to clients.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to handle PRIME offscreen Windows nicely, tie their
presentation into the Primary CRTC (if available).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Allow Option "DRI" "[23]" to also work with UXA.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Always check that the reused DRI2Buffer matches the associated name, and
not just for back buffers of a window.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Testcase: dri2-race
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The purpose is to keep the recent history of buffers for a DRI client
for tracking the relevant age.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Suppose for a moment that we don't have a DRI2Buffer associated with the
Drawable just yet... This could happen after a Composite redirect as the
front buffer may created (and so associated with the new Pixmap) after
the back buffer is recreated.
Reported-by: Tomas Pruzina <pruzinat@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88814
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Undo d16ac1f30bb (sna/dri2: Prefer to use normal selection criteria for
CopyRegion on small GT) to keep on the current ring as the external bo
if semaphores are disabled.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We can only pageflip if we don't change the pitch, otherwise we
simulate the pageflip with modeset. The idea is that once we have
exchanged the buffers, we will quickly settle down to a steady state
scenario where each buffer has the same pitch. We can encourage this
further by only keeping those buffers around that do have the same pitch
as the current front.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When disabling outputs with DPMS, make sure we update front_active for
consistency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This at least works when the wrapper is installed, there
is no i9xx vdpau driver. This should for example improve flash which
only supports vdpau. The expectation is that most software will use vaapi
in preference for -intel, for example kodi which supports both vdpau and
vaapi video acceleration methods. [A quick discussion with Peter
Frühberger clarified that kodi should indeed continue to work fine and
will not be confused if we expose an actual vdpau driver.]
|
|
Along with the name, pitch, bo, we should also preserve the flags.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the end it turned out to a small typo, s/scanout/active_scanout/ in
consideration of reusing the cache. Though there are a number of very
useful debug improvements along the way.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Reported-by: Patrick Welche <prlw1@cam.ac.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88252
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the Composite setup, if we are doing a DRI2 copy onto the front
buffer, we are fully cognizant that the copy will not go onto the
unredirected Windows of another Client. So we can preserve the shadow
CRTC mapping for those Clients, and prevent ping-ponging between CRTC
modes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we have relaxed the pitch restriction between front/back buffers when
swapping, we need to make sure that any change is also reported back
along with the change in front/back names.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In case we receive quick successive calls to DRI2GetBuffers on the same
Window, we need to check that the private exists before dereferencing
it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the Pixmap for a Window is changed (i.e. Composite
redirection/unredirection), we also need to decouple any associated DRI2
front buffer for the Pixmap (e.g. used for single CRTC flipping).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|