A logic inversion in
commit 1909910fdf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Jun 22 20:19:22 2014 +0100
sna: Inject a batch flush before adding a fresh bo
also applied the injection to when the batch was empty.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c48
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we need to fallback to the BLT unit, we need to pass it the original
source/dest coordinates and not our transformed render coordinates. So
keep the original values intact until we start emitting the render
operation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fresh bo (those without a reservation already defined, ala
presumed_offset) will cause the kernel to do a full relocation pass. So,
if possible flush the already correct batch in the hope of trimming the
amount of checking the kernel has to perform on this new batch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If undocking removes output (as the MST topology changes and some
outputs then become unreachable), we may leave dangling CRTC. This
confuses us, so disable any enabled but unconnected CRTC after the
undock event.
Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we have a pending flip across a modeset we must be careful to drop
the stale flip_bo after the modeset.
Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We need to do this to stop any stray references escaping through kernel
events now that we are passing the CRTC through the event.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In places, we assume that if the flag is set, we must have an active
CRTC. However, we were not clearing when disabling the CRTC.
Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80325
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This seems slightly weird, as there is nothing to indicate that this
would generate incorrect results only for snoopable bo. But no many of
flushes make my pnv box happy, so adjust the placement logic to move the
blending operation away from the snoopable target. This is sensible for
reasons of avoiding snoops from the render pipeline anyway.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80253
Reported-and-tested-by: Matti Hämäläinen <ccr@tnsp.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This so far appears to be the most restrictive alignment required, so
simply increase the upload alignment to 256 bytes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80033
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Significantly improve the stress impose upon the tiled BLT operations.
Also start dumping pngs of the failures.
References: https://bugs.freedesktop.org/show_bug.cgi?id=80033
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As this may be mapped by the Xserver using a read-only SHM segment, we
are forced to treat it always as read-only. And this being X, that it is
using a SHM segment is opaque to the driver. Fantastic middlelayer.
This was incorrectly removed in
commit e680e54eab
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 11 10:48:26 2014 +0100
sna: Ignore setting read-only for temporary userptr maps
Also let's not forget the ShmPutImage -> CopyArea path.
Reported-by: Christoph Haag <haagch.christoph@googlemail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78411
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As this may be mapped by the Xserver using a read-only SHM segment, we
are forced to treat it always as read-only. And this being X, that it is
using a SHM segment is opaque to the driver. Fantastic middlelayer.
This was incorrectly removed in
commit e680e54eab
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 11 10:48:26 2014 +0100
sna: Ignore setting read-only for temporary userptr maps
Reported-by: Christoph Haag <haagch.christoph@googlemail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78411
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The kernel can quite happily send a SIGBUS whenever we read from an bo
(due to oom), so catch it and handle it.
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>
After a window resize or redirection, the DRI2BufferPtr become stale but
it may take a while for the Client to notice and reconfigure. Just
skip touching stale backbuffers and let the Client catch up.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes regression from
commit 62aaf2ff4f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 18 18:41:15 2014 +0100
sna: Skip redundant copies when already cloned
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Missed updaing the DBG message in
commit 83c0f03445
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 18 16:51:46 2014 +0100
sna: Pass desired CRTC viewport for completing single CRTC flips
References: https://bugs.freedesktop.org/show_bug.cgi?id=80157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We cannot simply compare against the crtc->shadow_bo for all our needs,
so pass in exactly the setup we want and apply that. In particular this
is required when flipping away from the single CRTC setup on secondary
pipes.
Fixes TearFree multi-monitor regression from
commit 3932e97057 [2.99.912]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Jun 9 08:58:15 2014 +0100
sna/dri2: Allow TearFree flipping to individual CRTC
Reported-by: Leo Wolf <jclw@ymail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80191
/usr/include/xorg/os.h around line 579 reads:
extern _X_EXPORT char *
strndup(const char *str, size_t n);
However strndup is already defined by glibc, and this redefine causes a
compile error.
This gets triggered because backlight.c does:
Without first doing:
Causing HAVE_STRNDUP to not be defined.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
If the region we are blitting is either narrow or short, we may be able
to construct a tiling pattern out of a large pixmap.
In the process, spot a regression due to
commit 542aeca6e6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Jun 17 12:26:30 2014 +0100
sna: Tweak creation 8x8 tiled patterns
which copied too much from the source line.
References: https://bugs.freedesktop.org/show_bug.cgi?id=79888
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>