An extra caveat to these generations for
commit 97d809c26b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Oct 10 00:15:55 2013 +0100
sna: Pass usage hint down to render fill routines
is that we don't want to incur ring switch overheads that may overwhelm
any advantages from using the BLT.
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>
If we cancel an operation after partially committing it, we may leave
the batch bookkeeping in an inconsistent state with an exec object with
a zero-length batch. Ordinarily, this would not be an issue as we could
pass the extra object to the next batch. However, if we switch rings, we
need to clear the extra objects as they are currently flagged as being
on the wrong ring, leading to hilarity.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than duplicating a string, we can simply transfer ownership from
the temporary mode to the mode list.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If for some reason the current mode on the CRTC (inherited most likely
from fastboot) doesn't match any of the modes reported by the output, we
end up with a stray mode that the client cannot control.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70132
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Upon aligning the buffer, we may enlarge the vbo to accomodate the
vertex alignment and push the current index past the end of the buffer.
Move the space check from before the alignment computation to
afterwards.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We need to be careful not to execute threads past the end of the alloted
buffer by making sure the clip extents correctly align.
Reported-by: Joseph Yasi <joe.yasi@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70204
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Instead trying to allocate 4100 bytes, fix the logic to only require a
maximum of 4096 bytes in the cache buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the trapezoids are rectilinear, they should hit a fast path through
the span compositors and so threading them seems pointless. Expect
possibily for inplace pixman operations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This allows us to distinguish between the texture cache invalidation
stage versus the opportunistic flushing, and test either.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We pre-emptively flush the render cache before reads as that seems to
improve performance. Now try not flushing if we don't subsequently need
to read from the render cache.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Regression from
commit c98b770a87
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Oct 4 18:37:01 2013 +0100
sna/trapezoids: Add a precise scan converter
Reported-by: Joseph Yasi <joe.yasi@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70204
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Lesson 2: Use the right variables.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70137
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Lesson 1: do not accidentally overwrite the loop count inside the loop.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70137
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Under certain circumstances, we can retire the pageflip before the
client has updated its back buffers. This leads us to pre-emptively
moving the scanout to the cache, when all we need to do (and will do) is
report the same back buffer back to the client.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
It appears that we need top-of-pipe synchronisation for changing of
certain state, and that the gen5 pipecontrol instruction is
insufficient. So we have to fall back on the good old MI_FLUSH in order
to make sure that the GPU invalidates its state correctly.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51422
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
During redisplay we wait for the pageflip result. If the fd is marked as
non-blocking this results in a busy-wait, so insert a poll first to
remove the busy-wait.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
After some probing mechanisms, we may end up with a valid device without
knowing its PCI address a priori. Having a valid device, we can just
query it for the correct device id, and can safely abort any path that
requires PCI information that we don't have. (Those paths are not valid
under such hosting anyway - if it may be required, we could reconstruct
the address.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than passing a negative timeout to select, if we detect that we
expired our timeout during the processing of the BlockHandler, restart.
More worrying is that something in the BlockHandler took longer than 3ms
to process.
Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Link: http://article.gmane.org/gmane.comp.freedesktop.xorg.devel/37388
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Before deleting the io buffer, we need to check that it is not active.
Currently we check that it is not pending use in the current batch, but
we also need to double check that it does not have outstanding use by
the GPU. Failing to do so could mean overwriting the data prior to it
being read by the GPU, a very small race but often hit!
Reported-by: Vedran Rodic <vrodic@gmail.com> # and many others
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66990
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Edges that extend past the left hand side of the clip box cannot simply
be ignored (since they contribute to the scanline to their right, our
region of interest) but they need to calculated separately rather than
merged into the first cell.
Reported-by: Pavel Ondračka <pavel.ondracka@email.cz>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69469
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the user requests that acceleration be disabled either through
AccelMethod or NoAccel, do so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Similar to the previous commit, we have to allow overlapping OVER
rectangles to be drawn one after another.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The specification is that each is drawn in sequence (so over top of
earlier rectangles), so do not cheat by using the computed region.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66313
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When we destroy the original source and copy it to a new bo, we also
need to make sure that any mappings of the original bo in the clones are
undone.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since we have a malloc cache for the bo, we may as well use it when
converting from an upload buffer to a bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So we need to check whether the cached framebuffer matches the requested
format, or else recreate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Sometimes we may have a compatible scanout cached, but of the wrong
size. Instead of throwing away the memory and creating a new scanout
from scratch, allow us to just resize the old scanout by destroying and
recreating its associated framebuffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We only want scanouts capable of being used for the front buffer in our
cache, so make sure that YUV formatted fb are destroyed upon release.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Back in the good old days of the overlay, we only needed to care about
having a frame buffer large enough to hold the data. This changed with
the sprite interface which encodes the width x height into the
framebuffer and so we need to be careful when handing back a cached
buffer that it does indeed match the required dimensions.
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We now allow LLC machines to also use GTT upload buffers, so we need to
be cache when scanning the cache to look for suitable buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Returning 0 from sigtrap_handler() when we wish to fallback to the core
OsSigHandler was precisely the wrong thing to do.
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>