After starting a new video on another CRTC, disable the old one as we
currently only track the single video port. However, showing a video
split across multiple CRTCs would be a useful extension in the future.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we get more well-endowed GPUs with ever more execution units, it
becomes advantageous to do even basic copies through the render ring.
However, the extra performance comes at a cost - higher power usage. To
mitigate this, we apply a heuristic of only allowing a switch over to
the render ring if the render ring is already active with an early
request (in addition to the usual stall avoidance and general
performance heuristics).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
They where accidentally move the packed branch in
commit 85e89f2121
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Aug 16 21:11:33 2013 +0100
sna/video: YUV420 is not supported by sprites, replace it with a RGB passthrough
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
An issue with passthrough Xv buffers is that they end up in the scanout
cache and potentially reused instead of being immediately discarded.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise we will destroy it at the end of the frame whilst it is still
meant to be shown. Not normally an issue as the next frame is show
before it vanishes, but is if the image is shown for an extended period
of time.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As YUV420 is not supported by any of the current sprite implementations
drop it. Instead implement some RGB passthroughs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the client sends a BO that is too small to satifsy the PutImage, then
reject with BadAlloc rather than die with an assert.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
An unusual path to be sure, to call sna_crtc_set_mode_major before we
create a GPU bo for the scanout - but might be possible after a GPU
hang, or it appears after trying to set a 0x0 mode. At any rate, make
sure the GPU bo exists before dereferencing.
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1212344
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we are hosted, then we do not have our own modesetting backend and
calling it results in fireworks. So leave the old modesetting entry
points for the hosting midlayer to control.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Following
commit 021c59f624
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Aug 10 13:15:48 2013 +0000
sna/glyphs: Micro-optimise glyph drawing
we need to be careful during sna_glyph_release() that the atlas points
into the glyph cache before releasing it. Fortunately caught by an
assertion.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The application of dst_x|y was incorrect, and so the drawing could end
up in the wrong location for a window.
References: https://bugs.freedesktop.org/show_bug.cgi?id=66990
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Don't force us to select BLT too early if we allow ring switching. As
the RENDER ring benefits from more cacheing over time (e.g. HSW:GT3e) it
becomes much more preferable to use it over the BLT. Since we already
have the logic to decide if ring switching is possible/preferred, relax
the initial checks on where the current activity is to allow switching
between batches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Only bail we fail to find the CRTC for this output amongst the allowed
set for this ZaphodHead - but allow us to find an invalid CRTC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When you don't have many cycles to play with, every one counts.
Here we make sure we cache negative lookups for large glyphs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Obviously we can only replace the bo if it is not pinned and so just
incur a stall when we could have instead rerouted the rendering through
its CPU bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The inplace write distinction is not important on LLC, so pick any
buffer that is on the GPU and available for reuse.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
There is yet another race in drm initialisation where X is starting long
before the drm device is completely ready, and is being told that the
output has a valid mode, but with bogus settings. Ignore it, and hope it
comes to its senses later on.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Start adding the infrastructure to disable direct hardware access if X
is being run under a system compositor (aka "hosted").
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Repairs the build for f16 which has an older version of xorg-macros.
Fortunately, as it doesn't define XORG_TESTSET_CFLAG it also doesn't use
it generate noisy output.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Framebuffers created from stolen bo were not being released and so the
kernel would keep the fb and bo alive, causing the memory to be
remain unreusable whilst X lived and us to leak all available stolen
memory.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>