Drop the GLX includes as they are not needed and obviously break if the
GLX are not present on the system (and we fail to check during
configure).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This allows us to avoid the occassional kernel bug if mmap() fails and
the upload is possible via our indirect upload paths.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This bogus comment confused both Chris Halse Rogers and myself.
Suggested-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Prompted by a suggestion by Haihao, clarify the intent behind checking
the incoming maximum blit extents against the recorded sizes of the
attached bo. Due to the asynchronous nature of DRI2 invalidation, it is
possible for the DRI2 buffer to be stale and for its bo to be smaller
than required for the client's blit.
References: https://bugs.freedesktop.org/show_bug.cgi?id=67210
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: haihao <haihao.xiang@intel.com>
In a Zaphod configuration, the set of CRTCs available for an output is
limited, and if that set does not match with the already established
linkage, our quick probe function will select no mode. However, since
the output is already on, the user definitely would like to continue
using it, so fallback to InitialConfiguratio to select an appropriate
mode.
Reported-by: Nick Bowler <nbowler@draconx.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67176
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Mostly for symmetry with GetImage, this in theory just bypasses a lot of
intermedate state checking.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Often we may find that the BLT operations we wish to do after a
XY_BLT_SETUP are either completely clipped out or transparent and so do
not generate any subsequent commands. This leaves us with many unused
XY_SETUP_BLT.
References: https://bugs.freedesktop.org/show_bug.cgi?id=61477
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Along some paths, we use a CPU mapping on a temporary object that never
gets a user ref - so the assertion is bogus. A lesson I keep forgetting.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A regression in
commit 6921abd810
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Jul 18 16:21:27 2013 +0100
sna: Add a fast path for the most common fallback for CPU-CPU blits
And add the full set of assertions to validate the memcpy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to allow the case for copying onto a target other than the
front buffer, such as the fake front buffer for example.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
RegionNotEmpty() is only valid if we only use the Region API, and as we
mix direct operations on the region extents, we need to also do our own
final check.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes regression in
commit 6921abd810
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Jul 18 16:21:27 2013 +0100
sna: Add a fast path for the most common fallback for CPU-CPU blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This path will mostly be upload for individual glyph uploads, for which
the malloc overhead is significant.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
There are times, such as rendering into the scanout, where continuing to
use the GTT is preferrable even when wedged.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Some operations we do not know the true extents and so check the whole
drawable when considering placement. In this case, the drawing may only
partially cover the drawable and so we can not simply ignore existing CPU
damage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This can happen if the DRI client passes in a stale DRI2Drawable - that
is the Drawable now references a new Pixmap which the client has not run
DRI2GetBuffers against.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Simply reject any attempts to copy using stale references (i.e. the
DRI2Drawable has changed structure but the client hasn't yet noticed).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
More our ifdef out of line from the main code into a header file, where
we can also apply a little bit of synatic sugar.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since __cpuid_count() was only introduced into gcc-4.4, we obviously
cannot use it with earlier versions or with compilers that do not
provide compatible interfaces.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
ALIGN() expects it alignment argument to be a power of two. As buffer
size depended upon cache_size, which is not always a power of two,
issues could arise with unexpected buffer sizes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Older hardware does not support cache size probing via cpuid4, so we
need to implement the older algorithm which requires a table based
lookup. (And in hindsight, why I thought cache probing via cpuid to be
quite hairy.) For the moment, just use the value found in /proc/cpuinfo.
Reported-by: Oscar Dario Trujillo Tejada <oscardt19@gmail.com>
Reported-by: Ferry Toth <ftoth@telfort.nl>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the linear bo is still in the CPU domain, we can map it through the
CPU with no penalty, so treat it as mappable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since we will not sample depth=1 pixmaps from the GPU, we may as well
directly allocate these in system memory and avoid tickling the upload
cache. This then avoids an issue within the size calculation code which
makes the assumption that bpp>=8.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>