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>
Or else face compile failures:
blt.c: In function 'affine_blt':
blt.c:1403:3: error: unknown type name 'pixman_f_vector_t'
blt.c:1407:4: error: request for member 'v' in something not a structure or union
blt.c:1408:4: error: request for member 'v' in something not a structure or union
blt.c:1409:4: error: request for member 'v' in something not a structure or union
blt.c:1411:3: warning: passing argument 2 of 'pixman_f_transform_point_3d' from incompatible pointer type [enabled by default]
In file included from /usr/include/xorg/miscstruct.h:52:0,
from /usr/include/xorg/regionstr.h:52,
from /usr/include/xorg/region.h:50,
from /usr/include/xorg/window.h:51,
from /usr/include/xorg/input.h:55,
from /usr/include/xorg/xf86str.h:38,
from sna.h:43,
from blt.c:32:
/usr/include/pixman-1/pixman.h:247:15: note: expected 'struct pixman_f_vector *' but argument is of type 'int *'
blt.c:1413:7: error: request for member 'v' in something not a structure or union
blt.c:1415:7: error: request for member 'v' in something not a structure or union
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since clearing is a relatively trivial operation, allow us to do the
clear to a CPU bo rather than block on the GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A few assertions are there to catch less desirable behaviour rather than
outright errors. For these, just grab the backtrace and continue.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Until now we only applied pixel-exact rotations to the cursors. However,
this left the cursors ignoring scaling and so appearing incorrect on
outputs with transformations applied. An extra complications comes from
making sure that the scaling routine is signal safe.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Ideally, we would iterate over each CRTC and check that the transformed
cursor is still valid for the HW plane and then remember to transform
the cursor before displaying. Disabling the HW cursor if a non-native
transform is the first step in correcting the display of said cursor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Sitting here with a 3200x1600 panel but no 1600x900 intermediate mode,
and I am too lazy to add it by hand.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When we are using the fallback method, we need to make sure the source
is on the CPU.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89053
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Even if we expect to flush at the end of the operation, we still want to
consider semaphores before overriding the engine selection.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In the normal command processing stream, we will have lots of
opportunity to ask whether we should be batching requests together. If
we wakeup without doing any work, then we will check inside the block
handler whether the GPU is idle and flush then.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
RR resources are freed before CloseScreen (as they are a ServerClient
resource), but on entering our CloseScreen callbacks we are left with a
set of stale pointers. Decouple those before proceeding so that we are
not tempted to dereference them.
Bugzilla: https://bugs.archlinux.org/task/43906
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Building intel driver with --disable-tools fails with following
configure: error: conditional "BUILD_TOOL_CURSOR" was never defined.
Reported-by: Tomas Pruzina <pruzinat@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89425
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Currently we only set the RR value for the output property on creation,
but we update that value every time we query the connector. To sync our
value with RR, we need to change the output property value.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Slightly more funky would be to poke around in the CRTC, but that should
require master. As it stands this should help verify that what X is
supplying to the driver matches user expectations
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 88e84320a3
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>
RRSetChanged() is much more recent than RROutputChanged(), and
RROutptChanged() allows for more finer grained updates. Switch to
RROutputChanged for compilation with xorg-server-1.14 and older.
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>
Don't error out if the kernel no longer supports pinning (despite it's
usefulness it has been removed) and hope that the kernel just works now
on 830gm/845g.
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>