[Spice-devel] [protocol RFC 0/2] RANDR support via QXLHead + SpiceHead

Alon Levy alevy at redhat.com
Mon May 28 02:05:03 PDT 2012


On Fri, May 25, 2012 at 09:23:13AM +0200, Alexander Larsson wrote:
> On Mon, 2012-05-07 at 09:28 +0300, Alon Levy wrote:
> > Hi,
> > 
> >  Currently we support multiple monitors by having:
> >   single pci = single display channel = single client window
> >  
> >  The RANDR architecture doesn't lend itself to this, but on the other hand it
> >  makes it very easy to have an alternative scheme:
> >   single pci = single display channel = multiple client windows
> >  
> >  RANDR introduces a concept of a CRTC and an OUTPUT. The CRTC scansout a
> >  portion of the framebuffer onto one or more OUTPUTs. I propose having a 1:1 CRTC:OUTPUT correspondence and introducing two new commands, one on PCI and one for the protocol:
> >  QXLHead = (id, x, y, width, height)
> >  SpiceHead = (id, x, y, width, height)
> 
> I'd like to point out that while this is the current way things work the
> plan for the furture is to implement Per-CRTC pixmaps[1] which will
> allow clients to map a separate pixmap to each crtc rather than have all
> the crtcs scan out from a separate one (the framebuffer).
> 
> This is important, because the current situation with multiple monitors
> means the framebuffer can easily become much wider than the hardware
> limitation on texture widths of modern GPUs which means you can't run a
> 3D compositor in such multi-monitor setups. So, instead the plan is to
> have a separate pixmap per monitor and have the compositor draw the
> windows to the right pixmap(s).
> 
> [1] http://lists.x.org/archives/xorg-devel/2010-May/008141.html
> 

Right. And with a true per CRTC pixmap situation we could have one QXLHead
command per surface backing that pixmap, by adding a surface id to the
QXLHead and SpiceHead commands:

QXLHead = (id, global_x, global_y, width, height, surface_id, surface_x,
surface_y)

 - surface_x, surface_y are offsets inside surface_id
 - global_x, global_y are offsets in the global coordinate space.

In the current situation global_x == surface_x, global_y == surface_y,
and surface_id == 0

In the one pixmap per CRTC situation surface_x == surface_y == 0.

This would also allow a middle ground situation, and panning (surface_x
!= 0 and surface_id != 0, and surface_x != global_x)



More information about the Spice-devel mailing list