If reallocs gives us a new memory block, we need to update everything
that pointed into the old blocks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the user tries to use multiple commands to combine multiple displays,
reroute those to the first instance.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When converting to the auto-extending arrays, I forgot to include room
for the extra connection for the recording Display. By using an
explicit variable within the global state it is a little more clear.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
And prevent cloning the localhost! The caveat is that the transport
string (Display name) must match, so it still would be possible to
connect to the same display with different transports (local sockets and
TCP sockets for socket) and so cause confusion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we try to create VirtualHeads, gnome-shell tries to enable them.
Leading to a lot of flashing and extraneous modes appearing. Without
being able to grab the screen configuration for the duration of our
pruning, there does not seem much we can do other than try and squelch
the worst of the errors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Now that we allocate VirtualHeads on the fly, we can query the list of
available outputs on the target display and clone them all, rather than
manually passingthe list of outputs to clone.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Aligning a 16-bpp image to a 32-byte boundary is tricky, apparently. Or
at least I make it look so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Always maintain one spare so that we can reconfigure for any number of
desired outputs on the fly.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Avoid up-converting to a depth-24 image and wasting extra bandwidth if
either end-point is only using depth-16.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Support rendering between mixed depths by using Render to stage the
transfer into our x8r8g8b8 image. An improvement would be to use the gcd
intermediate depth so we don't waste bw unecessarily.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we find that the headers for the tools are not available on the
system, simply disable building them as they are not essential features
of the driver.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Based on the original implementation (hybrid-screenclone) by
Tomáš Janoušek, and Bumblebee integration by Kevin Puetz.
intel-virtual-output utilizes local VirtualHeads to present a contiguous
desktop to the local display manager, but maps the drawing on those
outputs to the remote display, and provides bidirectional RandR proxy so
that you can resize the remote display and configure it within your
desktop. The remote display should also send hotplug events back to the
local desktop, for reconfiguration on the fly.
Ideally the remote display is a discrete GPU on the same host so that we
can use local Shared Memory transport and avoid sending data over the
wire (though it will work in that setup). Ideally you would have userptr
support to provide zero-copy rendering between the GPUs, or have dma-buf
(in which case you would be using PRIME). For remote rendering, no
compression is done so this fares worse than VNC.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Prevent a NULL dereference for the small system pixmaps. Introduced with
commit f22d7f68b8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Aug 28 14:24:33 2013 +0100
sna/gen6+: Improve ring stickyness for BLT composite ops
Reported-by: Sami Farin <hvtaifwkbgefbaei@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68728
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We also need to correctly offset the current_msc for the normal
pageflip, so rearrange the code flow so that we only do the calculation
of target_msc once.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Previously, we instantiated a fake output in case we had a machine with
no output. (For certain server-class products.) The Bumblee project were
also doing something very similar in order to fake an extended desktop
on the Intel igfx and copy portions onto a discrete GPU. (The preferred
method for doing this upstream is through the use of PRIME). As the code
is very similar, we can support both use-cases simultaneously.
This adds the option:
Section "Device"
Driver "intel"
Option "VirtualHeads" "<count>"
EndSection
to allow the user to specify an additional set of fake outputs, which
can then be controlled using xrandr.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A cut'n'paste error dropped the clip region copy, resulting in the
port not being set on the window instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The final version that was upstreamed differed from the original version
we implemented. The final version allows for both destination/source
colorkeying, but left the ddx out of date.
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We can arrive there with a COW and wanting to a CPU mapping, which is
unfortunate and requires the indirect path instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Being able to read back the fbcon handle as a non-Master process is an
information leak that will be fixed. We should already be Master by
this point by virtue of the sequence in which we obtain the device fd.
However, to be pedagogically correct, call drmSetMaster() before the
fbcon copy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reduce the number of pipe-controls we emit by combining one of the
frequent flushes with a stall.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Make sna_set_screen_pixmap() a little more complete and remove the
assertion that the caller manages sna->front. This should make the
function easier to reuse.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we are hosted, we do not own the CRTC configuration, and deferencing
the private data structures believing them to be ours, only leads to
disaster.
Based on patches by Christopher James Halse Rogers.
Reported-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When copying from the DRI client onto the scanout, we return the source
buffer back to the client afterwards. Therefore if we force the source
to switch rings, we incur a double ring switch from the client to us and
back. If we force the dst to switch rings, it will likely be then
correct for all subsequent copies as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The test for a hosted Xserver was backwards in
commit 306c72cffb
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Aug 24 14:02:23 2013 +0100
sna: Trust the preferred-depth returned by the host
so we failed to load the driver instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we are not master and will not be binding the fb, it is irrelevant as
to whether our render buffer is actually bindable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When hosted, we have no idea what the right initial contents should be
as we are independent of the CRTC and so the existing fb is irrelevant.
Plus, not actually being master will cause the attempt to read back the
bound framebuffer to fail...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Render nodes allow clients full access to off-screen rendering and GPU
offload, without assuming any master responsiblities (for device and
display management). As they have a more limited interface, they can be
used in a more permissive manner.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes the regression introduced in
commit 6f5fd772c7 [2.21.13]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Jul 25 08:29:55 2013 +0100
sna/dri: Discard the strict checking for stale bo before performing a blit
which added the sync request flag along the explicit async blit path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>