Age | Commit message (Collapse) | Author |
|
Sprinkle fall through comments where needed.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
kgem_bo_map__(cpu|gtt) leaves the sync up to the caller, in particular
so that the obtaining the pointer and controlling the cache domains are
not conflated and can be separated. However, it does mean that the
caller can not assume that obtaining the pointer updates the cache
domains, as it does not. memcpy_copy_boxes fell into this trap.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The PICT_ are enums and so never report true to ifdef PICT_a2r10g10b10
and instead we need to check the xserver version they were introduced.
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Tracking SHM flushes precludes some of the optimisations we can make in
future for tracking DRI flushes, so split the two paths.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Based on xf86-video-ati
commit 9a1afbf61fbb2827c86bd86d295fa0848980d60b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Mon Jul 11 12:22:09 2016 +0900
Use EventCallback to avoid flushing every time in the FlushCallback
reports seeing an improvement in reducing flushes at the expense of
checking every event for a DamageNotifyEvent. Since we also mix
rendering with SHM buffers, we have a more diverse set of conditions
under which to flush - but maybe we will see enough of a win for DRI to
merit. So far seeing improvement of ~20% for series of small operations
under the compositor without seeing any regressions, should benefit
composited desktop users. The biggest danger here is missed flushes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Enable copying onto a scanout buffer using a WC mmap - so long as it is
X-tiled and no swizzling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since the naive implementation uses an 8bit temporary, we can only
support so many passes before the quantization artefacts become
apparent. We have to be extra conservation in order to support
multi-pass convolution algorithms (notable 2-pass separable Gaussian
kernels).
References: https://bugs.freedesktop.org/show_bug.cgi?id=95091
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It should only be the case that we create the upload proxy in this case,
but it ensures that the code remains self-consistent if we force the
all-damage reduction.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Down one particular patch (overlapping render copies) the
scratch.pScreen is dereferenced (to create a temporary Pixmap). Ensure
that we populate it before hand.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91658
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In case of error, we try to free up memory before trying again. This
involves callbacks into higher level code - but if we fail early, we
will not have those hooks installed. Set no-ops stubs early to prevent
untimely crashes.
References: https://bugs.freedesktop.org/show_bug.cgi?id=90622#c1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We shouldn't just discard the mask if the user requests that we render
the glyphs through a low bitdepth mask - and in doing so we should also
be careful not to improve the bitdepth of that mask (since we don't take
into account the extra quantisation desired).
Testcase: render-glyphs
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>
|
|
For very large scale factors, it is possible for the current calculation
to underflow and try negative tile sizes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we find the GPU is wedged, replace some of the lowlevel render
operations with CPU equivalents to simplify some fallbacks that still
need to operate on GPU bo (such as copying DRI buffers).
References: https://bugs.freedesktop.org/show_bug.cgi?id=85058
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Where possible, keep the offset of the partial Picture within the 3D
coordinate limit so that we can use the DrawRectangle offset to
automatically adjust the coordinates.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In particular, the promotion of an active snooped bo into an uncached
linear GPU bo was being performed on a busy buffer and forcing a stall.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
I overlooked the tiling-fill path passing down a temporary DrawableRec
into the fill_boxes callback - invalidating the assertion.
Fixes regression from
commit 43176b9bfafe389c4b9ed676f4e50e3b06f858c4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Jun 30 21:01:11 2014 +0100
sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c62
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
One day, we will move the width/height/bpp to the bo itself...
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
sna_render.c: In function 'sna_render_picture_downsample':
sna_render.c:822: warning: 'priv' may be used uninitialized in this function
introduced in
commit ded05e8abb248664124d2b86f77c27497a252c4e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Jun 23 22:15:56 2014 +0100
sna: Allow scratch pixmap to allocate linear GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fixes regression from
commit 1d74b2e07d125ad95b9db6c9c032e90faf2bfa60
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Jun 24 08:58:51 2014 +0100
sna: Decompose self-copy into overlapping/non-overlapping regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We only need to stage the copy for the overlapping portion of the
self-copy, for the rest we can do in a single pass.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
References: https://bugs.freedesktop.org/attachment.cgi?id=101618
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When allocating a scratch pixmap, we do so in the expectation that
rendering on the GPU is always preferrable, so even allocate a small
linear bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
sna_damage_contains_box() routine implicitly reduces the damage before
performing its check. This may alter and even destroy the damage entry,
so pass in the handle so that it can be updated correctly.
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This was disabled in
commit 9f4f855ba37966fb91d31e9081d03cf72affb154
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon May 26 07:06:18 2014 +0100
sna: Implicit release of upload buffers considered bad
as retiring the buffers during the command setup could free one of the
earlier bo used in the command. But discarding the snooped bo could
still be advantageous. So restore the automatic discard of upload
proxies, but make sure we only do between operations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matti Hämäläinen <ccr@tnsp.org>
|
|
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>
|
|
This should always be set during bo creation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fix up all the warnings about implicit enum conversions. The
container_of() macro remains defunct.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Scaling the output feed in an invalid picture->format/depth combination
which causes the fallback downsampling function to explode. Whilst this
is a bug in the higher layer, we can handle the error anyway.
References: https://bugs.freedesktop.org/show_bug.cgi?id=79320
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Currently upload buffers are automatically decoupled when the buffer is
retired. As retiring can happen during command setup after we have
selected which bo to render with, this can free the bo we plan to use.
Which is bad.
Instead of making the release of upload buffers automatic, we manually
check whether the buffer is idle before use as a source to consider
scrapping it and replacing it with a real GPU bo. This is likely to keep
upload buffers alive for longer (limiting reuse between Pixmaps but
making reuse of the buffer within a Pixmap more likely) which is both
good and bad. (Good - may improve the content cache, bad - may increase
the amount of memory used by upload buffers for arbitrary long periods.)
Reported-by: Matti Hämäläinen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79238
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>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Composite operations were presumed to cover their entire width x height
area. However, a few paths submit boxes that do not cover the clip
region and so the optimisation made during prepare to discard completely
overwritten data is incorrect (and leads to corruption - stale data is
seen which the client expected to have been overdrawn). So along these
more unusual paths, we must add a flag to prevent the overzealous
discard. Notably, xfce4 triggers this as it uses a lot of unantialiased
trapezoids in its theme drawing.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69528
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
For the scanlines emitted for rendering Core drawing primitives, it is
preferable to use the BLT engine, so pass those hints down.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This is required to ensure that the tiled offsets are tile-row aligned.
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1232546
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This is a little helper function, that just returns a bool, not the
error code used by the render backends. Instead the caller tries an
alternative method of extraction before giving up.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We know that when we access either a CPU or GTT mmap we are vulernable
to receiving a SIGBUS. In fact, we can catch these and abort the
operation preventing X and all of its clients from randomly dieing.
This helps for instance if you try and use a 1GiB frontbuffer on a 2GiB
machine...
For complete protection, we also need to catch signals for all GTT maps,
such as VBO and staging buffers. (TBD)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Highlights of that distribution include xorg-xserver-1.6.5, kernel
3.0.76 and gcc-4.3.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Mark how dangerous this function is by giving it a __ prefix.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Mostly of the only used in debugging path variety.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Occasionally when forced to use an intermediate destination surface, we
know that we will completely overwrite the contents of the surface and
so we can forgo the initial copy from the target.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66249
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|