[Spice-devel] RFC: Integrating Virgil and Spice

Dave Airlie airlied at gmail.com
Wed Oct 9 00:46:15 CEST 2013


> That leaves the question how to do single-card multihead.  I think the
> most sensible approach here is to go the spice route, i.e. have one big
> framebuffer and define scanout rectangles for the virtual monitors.
> This is how real hardware works, and is also provides a natural fallback
> mode for UIs not supporting scanout rectangles:  They show a single
> window with the whole framebuffer, simliar to old spice clients.

No real hw doesn't work like that, that is how we program real hw at the moment,
but for example wayland won't do this, and neither does Windows mostly,

real hw can have multiple separate framebuffers with separate strides,
and separate
scanouts from them, and the kms device drivers fully support this mode
of operation,
just the X server prevents it from being useable.

I'd ideally want to have a window per gpu output, since the idea would
be to allow them
to be placed on different monitors on the host side, and doing it as a
single app might
limit the possiblities.

The other thing is for virgil to work at all we need to render the
whole console using
GL interfaces, at the moment I just use glDrawPixels in the SDL ui
update when in GL
mode, so there is no direct access to the framebuffer in this case
anyways, its all
just GL rendered.

>> 2) The ability for a video-card generating output to pass a dma-buf
>> context to the display (ui in qemu terms) to get the contents from,
>> rather then requiring the contents to be rendered to some memory
>> buffer. This way we can save the quite expensive read-back from gpu
>> memory of the rendered result and then copying that back to the
>> framebuffer of the gpu for local displays (ie gtk, SDL),
>
> Hmm?  Not sure what you are asking for...
>
> First, reading from gpu memory isn't expensive.  It's all virtual, no
> slow read cycles as with real hardware.  There is almost no difference
> between gpu memory and main memory for kvm guests.  It's not clear to me
> why you are copying stuff from/to gpu memory.
>
> Second, you can have your scanout framebuffer in main memory.  That
> isn't a problem at all.  It only needs to be contiguous in guest
> physical memory, scatter-gather for the framebuffer isn't going to fly.

Scatter-gather for the framebuffer is fine as long as
its not VESA LFB. I already have virtio-vga device allocating a
non-contig framebuffer
and just using DMA operations to move data in/out.

Dave.


More information about the Spice-devel mailing list