Age | Commit message (Collapse) | Author |
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It could happen that we create front/back buffers with different
pitches. The kernel refuses to flip between such buffers, and so we will
hit some fallback paths that try to fix up the failed flips. Circumvent
such by avoiding the flip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Apply the manual CRTC fixup in case pageflipping fails. This can happen
if the pitches between the front and back differ for example.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Baby step. We first take advantage of TearFree to allow us to redirect a
single CRTC to the DRI2 frontbuffer and so allow a fullscreen game
covering a single monitor to avoid expensive blits when running in a
multi-monitor setup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The libudev documentation says that is it non-blocking by default, but
experience shows otherwise.
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Typo in DBG message.
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>
|
|
As there may be some latency between the wakeup and the queue, do a
final check if there is a pending vblank event before we decide whether
to chain up or perform an immediate flip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we may recurse into the vblank handler whilst waiting for the
TearFree shadow, we need to be careful that we do not queue the frame
from the vblank handler that we are in the process of constructing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As the Window may be resized between the client sending the swap request
and the xchg being processed, we need to validate the swap against the
final target not the buffers supplied originally by the client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
fbcon doesn't adjust the backlight when it takes over. Therefore if X
performs a VT switch whilst its outputs are off, fbcon wakes up with no
backlight and users are unhappy. Make the assumption that whoever takes
over the VT will set the outputs as it desires, and that the failsafe
value is to then turn the backlight to full.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67025
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The switch was moved after we checked whether pageflips are supported,
but the log message was left in the old location.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to free up memory and improve our bookkeeping when the X server
is switched away from the current VT, disable the CRTC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The tearfree code forgot to update the shadow bo, so after the first
flip it would be rendering to the scanout anyway and flip to itself
periodically.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This is for debug purposes only.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This was disabled in
commit 9f4f855ba37966fb91d31e9081d03cf72affb154
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon May 26 07:06:18 2014 +0100
sna: Implicit release of upload buffers considered bad
as retiring the buffers during the command setup could free one of the
earlier bo used in the command. But discarding the snooped bo could
still be advantageous. So restore the automatic discard of upload
proxies, but make sure we only do between operations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matti Hämäläinen <ccr@tnsp.org>
|
|
And double check after recreating the new GPU bo that is still mappable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
With a shadow, we may never attach a GPU bo to the frontbuffer, so be
careful when checking the scanout not to dereference that NULL pointer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fallout from commit 8369166349c92a20d9a2e7d0256e63f66fe2682b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 4 08:29:51 2014 +0100
sna/dri2: Enable immediate buffer exchanges
We set the flush hint too early, as we may need to swap the GPU bo for a
more appropriate buffer for DRI.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Changes to the backlights are notified through uevents. Hooking up a
udev monitor to listen out for external changes to the backlight (e.g.
through ACPI function keys, or by the user writing to
/sys/class/backlight directly) is easier than enabling polling on the
backlight sysfs file using X's select() mechanism.
Since we listen to backlight changes, we have to be careful not to
confuse the side-effects of disabling connectors (which may cause either
ourselves or the kernel to turn off the backlight) with the user value.
Many thanks to Alexander Mezin for the suggestion to use udev for
tracking the notifications for external changes to the backlight.
Reported-by: Alexander Mezin <mezin.alexander@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79699
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The intertwined logic was a little confusing to read mixed between the
functions, so inline it.
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>
|
|
As we have reorder the application of damage on a TearFree frontbuffer
to before we attach the CRTC, we do not need to then schedule the update
afterwards (until it gets drawn by the client).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Update the DBG to reflect the new arguments to sna_damage_reduce_all()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It is far easily to pass the PixmapPtr into the function and have it
pluck out the width and height than do so in all callers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When we discard a GPU bo, we need to make sure that the remaining
content is marked as only accessible via the CPU shadow pointer.
Regression from commit 65301412ecf2d55ab55a2d7faeaa048d4ee8b1d0
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat May 17 20:59:38 2014 +0100
sna: Discard active GPU buffers before uploading into them
Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79517
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The primary benefit of this is avoid the extra blit when using a
compositor and instead propagate the compositor flip on the frontbuffer
to the scanout, or equivalently allows a fullscreen game to flip onto
the scanout without intervention by TearFree.
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>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In commit 961139f5878572ebea268a0bbf47caf05af9093f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri May 30 09:45:15 2014 +0100
sna: Use manual detiling for downloads
the code for deciding when to use the GPU was refactored into a new
function that also performed the transfer, but failed to notice the
early return.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The other half of the commit that accidentally got included with
commit bb49222a514b1d6041f3d9530a22f5701377118b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Jun 2 08:25:52 2014 +0100
sna: Add DBG hints for using inplace CPU mmappings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Make sure we can compile against the pre-release tarballs at the expense
of an innocuous compile warning if compiled against xserver.git
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>
|
|
Only force the even-tile-row alignment if we have an old GPU with an old
kernel that doesn't perform conservative alignment for us (as required).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Presuming that we have both kernel support and Xorg support, of course.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If a flip fails, attempt to restore the previous working configuration
(using a modeset) then disable further flipping.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
OML_sync_control mandates that MSC must be monotonic, so if the kernel
reports that they go backwards, lie.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the flip is already completed before we finish the previous flip, the
drawable has been replaced already and we can unchain the flip queue.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
A little paranoia to clear the unused portion of the URB and dedicate it
to VS entries.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We use the GT level to decide how favourable it is to use the GPU in
various circumstances, now set it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|