[Spice-devel] multiple heads memory arrangement

Noel Van Hook noel.van.hook at intelligraphics.com
Wed Apr 18 14:56:54 PDT 2012


I am not sure I fully understand the ramifications of having a list of ram
headers.  Is the intent to have one additional ram header per additional
head?

For multiple heads to work correctly, I believe:
1) the framebuffer must be contiguous
2) the entire framebuffer must be accessible to all heads, and
3) each head must be able to be abitrarily located in that framebuffer.

Unless I misunderstand what you are doing, I am concerned that multiple ram
headers won't be flexible enough.

Noel


On Wed, Apr 18, 2012 at 4:53 AM, Alon Levy <alevy at redhat.com> wrote:

> Hi,
>
>  I'm just starting to work on this, wanted to solicit some feedback. I
>  am thinking that the simplest way to implement multiple heads would be:
>
>  Add additional QXLRam headers back to back on the vram bar.
>  Add a new flag QXL_RAM_FLAG_MORE_HEADS, set it on all but the last
>  (largest offset into bar) header.
>  Don't add new fields to QXLRom or QXLRam.
>  Update QXLRom.ram_header_offset to point to the first (smallest
>  offset) header.
>
> New driver that notices the QXL_RAM_FLAG_MORE_HEADS will count the
> headers (it cannot be done by looking at the header offset since it may
> not know about additional future data that will be put at the end of the
> bar).
>
> Old driver will lose sizeof(QXLRam) * (num_heads - 1) bytes from the end
> of the bar.
>
> Visually it would look like this for a two head qxl device:
>
>   .----------------------------------------------.
>   |                   ROM BAR                    |
>   | ...                                          |
>  || ram_header_offset                            |
>  || ...                                          |
>  ||                                              |
>  ||                                              |
>  |'----------------------------------------------'
>  |
>  |
>  |.--------------------------------------------------.
>  ||                     VRAM BAR                     |
>  |.--------------------------------------------------.
>  ||                   Working area                   |
>  ||                                                  |
>  v.--------------------------------------------------.
>   |                   First Header                   |
>   | magic                                            |
>   | ...                                              |
>   | flags == QXL_RAM_FLAG_MORE_HEADS                 |
>   |                                                  |
>   .--------------------------------------------------.
>   |                  Second Header                   |
>   | magic                                            |
>   | ... (identical fields) ...                       |
>   | flags == 0                                       |
>   '--------------------------------------------------'
>
> Alon
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Noel Van Hook - Intelligraphics, Inc
522 Cooper Ave N
Red Lodge, MT 59068
Noel.Van.Hook at Intelligraphics.com  (425) 770-5561
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120418/faaffde4/attachment.htm>


More information about the Spice-devel mailing list