WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel][RFC] Dynamic modes support for PV xenfb (included)

To: Pat Campbell <plc@xxxxxxxxxx>
Subject: Re: [Xen-devel][RFC] Dynamic modes support for PV xenfb (included)
From: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Date: Wed, 02 Jan 2008 11:51:50 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Delivery-date: Wed, 02 Jan 2008 02:52:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47787D69.3E48.0018.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47787D69.3E48.0018.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.9 (X11/20071115)
Pat Campbell wrote:
>> I took a quite look through the code and was impressed by how small a patch 
>> was actually required.

The linux framebuffer has resize support, so this is easy ;)

Resizing the framebuffer text console using the "fbset" utility should
work too btw.

>> A few general comments:
>> 1) I think it would be preferable to be able to dynamically size the memory 
>> allocated to the framebuffer according to the resolution, rather than 
>> statically allocating it and then potentially not using all of it.  
>> Presumably this would require more extensive changes to the backend, since 
>> it 
>> would need to map and unmap the framebuffer memory during a resize 
>> operation.  
>> How complicated do you think this would be?
> 
> I am not familiar enough with the Linux frame buffer code to even hazard 
> a guess.  Once the frame buffer is registered in the probe function can the
> memory be changed without crashing the app that has mmaped it in?

Easy.  You can zap the mapping, then fill it with other pages in the
page fault handler.  I think the driver already does that anyway to
track framebuffer page writes (aka screen updates).

> Handshake with the backend would complicate things, need to disable shared
> memory access, remapped it and then reenable it.  Not sure how suspend 
> resume might work in this case.

Backend handshake would be more tricky.  You can't release the pages as
long as the backend has them mapped.  Otherwise things will go seriously
wrong, especially in case the kernel decides to use the released pages
as page tables.

When you touch these things anyway it you might want switch over to
grant tables (we have resizeable grant tables and a grant table device
for userspace apps now) to allow the backend access to the framebuffer
memory.  And make the structs 32/64-bit invariant.

> Absolute mouse positioning needs to know the resolution to scale the 
> position properly.  Need some new events to alert it of a resolution change.

Just watch xenbus width/height nodes?

> No further plans at the moment.  I looked into using grant tables for the
> shared memory but decided against it for now.  Grant tables would break
> backwards compatibility unless both memory sharing techniques were
> supported. 

On the flip side the current scheme (one page full of mfns) limits the
video memory, for larger virtual screens this must be changed anyway.
So maybe just keep the current scheme for 800x600 fixed size?  And
require grant tables for the resizable fb?  That will make the amount of
backward compatibility code smaller as the resizeable bits are required
in the grant tables code paths only.

cheers,
  Gerd


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel][RFC] Dynamic modes support for PV xenfb (included), Gerd Hoffmann <=