As we will stall in the near future to serialise access with the
ShmPixmap, we may as well stall first and do a simple copy using the
CPU in this highly unlikely scenario.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This helps minimise the stall when syncing with the GPU before sending
the next reply to the Client.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This reverts commit 5a5212117e.
The clean up is in effect too early, as this is during preparation and
the actual work is already being correctly done at the end.
The automatic selection may not correspond with the correct backlight
(such as in a multi-gpu, multi-panel device) or the user may simply
prefer another control interface. This allows them to override the
chosen interface using
Option "Backlight" "my-backlight"
to specify '/sys/class/backlight/my-backlight' as the interface to use
instead.
Suggested-by: Alon Levy <alevy@redhat.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=29273
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As sna_blt_composite() will overwrite parts of the composite op as it
checks whether or not it can execute that operation, it will lead to a
crash as the normal render path finds the op corrupt. (The BLT
conversion functions cater for the cases where we may wish to switch
pipelines after choosing src/dst bo.)
Reported-by: rei4dan@gmail.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we already check the tiling state, so all we need to then check is
that the pitch is within the BLT constraint.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Submit early, submit often in order to keep the GPU busy. As always we
trade off CPU overhead versus concurrency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This fixes a regression from
commit 02963f489b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Aug 19 15:45:35 2012 +0100
sna: Only submit the batch if flushing a DRI client bo
which made the presumption that we called sna_add_flush_pixmap() for
every DRI pixmap that we used. However, that is only called for the
dirty pixmaps, any native exported pixmap only marks the batch as
requiring a flush. So in those cases we always need to submit the batch
if it contains an exported DRI pixmap.
Reported-by: chr.ohm@gmx.net
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So that if we write to a surface through one view, we make sure that the
sample cache is invalidated for all future views.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks to Adam Jackson for pointing me towards drmGetVersion() and
Julien Cristau for saying "Yuck!"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If you pass a name to drmOpen() it will attempt to open any device
corresponding to that name if it first fails to open the device
corresponding to the BusID. Obviously we want the failure from opening
the specified device in order to prevent wrongly opening the first found
device multiple times.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The only real user now has its own heuristics, so convert the remaining
users over to !is_gpu().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>