Age | Commit message (Collapse) | Author |
|
When we tile, we do so in order to fit an operation involving two
objects larger than the aperture. If we then choose an intermediate
tiling object that is larger than either of those two, the error will
persist and we will be forced to recuse.
In the worst case, this will provide an upper bound to the recursion.
Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This option should only be used for compatibility. Previously this was
done at a high level, this changes it to enforce the tiling as we apply
the CRTC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As the Window may exist for multiple Clients, we cannot rely on the
destruction of the Window decoupling all outstanding events and
preventing chasing a stale Client pointer.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Instead track what we explicitly want to discard for the next operation,
so that we don't have to copy back the whole buffer if we have to
replace the shadow and intend to overwrite it all.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Unlike GLXWindows, GLXPixmaps are rendered directly into, without a
staging copy. Therefore we must treat those carefully when exported and
clear our hints everytime control passes back to the Client.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79999
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Panel Self-Refresh requires us to avoid frontbuffer rendering in order
to be power efficient. This is a job for TearFree!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Tricksy asserts making sure that the correct arguments are passed
around!
Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As the kernel does not send out an explicit DISCOVER event, we have to
reinspect every connector after every hotplug event to detect topology
changes.
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>
|
|
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 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>
|
|
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>
|
|
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>
|
|
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>
|
|
The scanout is a global property, track it as so. The primary benefit to
this is it strengthens our assertions that we never hand out an active
scanout for use as a back buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Replace the fixed size MAX_PIPES array by moving the vblank handling to
per-crtc.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we have a queue of events, we may set the msc from a recent vblank
query only to then process an older vblank event and declare the counter
wrapped.
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>
|
|
We rely on the reference pipe to drive the event wake up. If we issue a
deferred flip, there is a chance that the user could rearrange the
screen on another crtc whilst otherwise preserving the screen geometry.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
GetDrawableMSC is specified as returning the frame counter and timestamp
of the last flip event associated with the drawable, not the current
hardware timestamp.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Clients are not yet ready for outputs that disappear at runtime, often
unexpectedly dieing with asynchronous BadOutput errors. A simple
workaround is to not remove any output just yet - but allow users to opt
in via xorg.conf, i.e.
Section "Device"
Option "DeleteUnusedDP12Displays" "true"
EndSection
The name chosen is to be consistent with the nvidia driver, which did
MST first and encountered all of these issues first, and has also been
adopted for -modesetting. If this is combined with persistent output
naming (i.e. based on DisplayPort branch topology), the number of
outputs presented to the user should be static.
Instead of removing the outputs, we have to mark them detached instead
to avoid throwing errors from the kernel.
Based on the patch for -modesetting by Dave Airlie.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
From OML_sync_control:
"The graphics MSC value is incremented once for each screen refresh.
For a non-interlaced display, this means that the graphics MSC value
is incremented for each frame."
When the pipe is disabled, return the last known MSC such that the
reported value is always monotonic and consistent with the pipe when it
is active again. That also is consistent with OML_sync_control which
says that the MSC is a vertical refresh counter, and by implication does
not increase whilst the pipe is off.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
One of the side-effects of MST is that we need to support dynamic
attachment and removal of displays as the branch hierachy changes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the near future we will be dealing with dynamic discovery of
connectors, and so we cannot assume that the mode resources will be
static for our lifetime. The first step is to not keep that struct
around, but pull out the useful information and discard it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When tiling, factor in the destination usage of the aperture in case
that reduces the available aperture for the intermediate bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We need to avoid all allocations within the signal handlers, so
preallocate the cursor structs.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77975
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We need to avoid all allocations within the signal handlers, so
preallocate the transfer buffer.
References: https://bugs.freedesktop.org/show_bug.cgi?id=77975
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This help with the continuing saga of
commit 1de1104064b5898cbed37e836901694a381c1266 [2.99.911]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Feb 21 22:43:04 2014 +0000
sna: Use a hint to do whole image uploads inplace
References: https://bugs.freedesktop.org/show_bug.cgi?id=77178
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As we may need to allocate from within the cursor update, we are prone
to re-entrancy issues within malloc()/free(). To avoid these we need to
block SigIO (for pointer updates) whilst in the critical section.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the pixmap is already partially on the GPU, and the next operation
touches the entire pixmap, promote that operation back to the whole GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
One of the downsides with supporting large cursors is that the full size
is very rarely used leading to a waste of permanently allocated
resources. Refactor our cursor handling so that we can allocate fresh
cursors on the fly that are appropriately sized.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Under PictFilterNearest, we can ignore fractional translations (not all
renderers discard those.) And if we are being approximate, we can loosen
our tolerance as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
To handle sigtrapping of the threads, we allow the threads to handle
their async signals and upon hitting the trap, we kill the thread. All
the rest of the threads are reaped by the main xserver thread
afterwards.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Curiouser and curiouser.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
By killing the threads and leaking their allocations - marginally
preferrable to losing the entire Xserver.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The sprite plane can be independently rotated to the CRTC primary plane.
To rotate the sprite plane, we just set a property on the plane similar
to how we rotate the CRTC, so we can refactor them together to use the
same routines.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When considering move-region-to-cpu, we need to take into account that
the region may not replace the whole drawable, in which case we cannot
simply dispose of an active CPU bo.
Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reported-by: Conley Moorhous <conleymoorhous@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74327
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Refactor some more of the common code, and add some debug tracking.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We keep a pointer to the old funcs when wrapping, this now needs to be const.
sna_accel.c: In function 'sna_gc_move_to_cpu':
sna_accel.c:4008:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
sgc->old_funcs = gc->funcs;
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|