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>
We can rely on our aperture and idleness tracking to appropriate flush
batches. Marking the large bo as flush interferes with the treatment of
flush for externally named bo, such as DRI/PRIME.
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>
We keep active/inactive scanouts in the same cache, so drop the assert
that they are all inactive - as it is handled a couple of lines later!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise a later call to GetImage will not notice the DRI update if it
was already clear - and so return a blank image. One example is the use
of x11vnc replaying xbmc.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69730
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
During the intial KMS probe, we do not yet have the list of output
modes, and in particular do not have the list of user preferred modes.
So, in order to honour the user preferrence, we need to query for any
preferred mode on the output from the option list.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=841696
Missing chunk from
commit 42330fbae8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Sep 22 14:39:57 2013 +0100
sna: Track CPU/GTT maps independently
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A regression from
commit f99e49f764
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Sep 17 09:15:40 2013 +0100
intel: Make the option to control VSync and PageFlip explict
which used the inverse meaning of the option to disable waiting on
swapbuffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Now that we use CPU mmaps to read/write to tiled X surfaces, we find
ourselves frequently switching between CPU and GTT mmaps and so wish to
cache both.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we fail the initial tests, we need to undo our translation to the
region before returning and starting the fallback paths.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The mapped hint is only useful for coherent mappings where it is
preferable to guide placement of regular operations.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
One debugging option forces the use of the write domain when
synchronising to force a full synchronisation. This trips up an
assertion to catch when we try to move the scanout into the CPU write
domain. So don't.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The operation is in theory redundant, and in the case of Haswell where
we have multiple outputs aliasing to the same encoder, actually harmful.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Stefan Dirsch <sndirsch@suse.de>
The operation is in theory redundant, and in the case of Haswell where
we have multiple outputs aliasing to the same encoder, actually harmful.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Forcing the batch emission on virtually every glyph eats a lot of CPU
time sending very short commands to the GPU, and is totally unnecessary.
Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In commit dcf9b5ae18
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Sep 17 22:27:45 2013 +0100
intel: Compile fixes for base install of SLED11.sp3
the includes were juggled around to avoid pulling in xorg-server.h
outside of the driver. However, missing xorg-server.h leads to subtle
bugs in the layout of structures, in this case breaking xf86Options.
Reported-by: FBrown <francisbrwn9@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69555
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Move the wrapping out of the main code body and hide it with the others
in our compatability header.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
SLED11 also requires us to poke around in the privates as it does not
provide the more recent privates API.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>