All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Pat Campbell <plc@novell.com>
Cc: xen-devel@lists.xensource.com,
	Mark Williamson <mark.williamson@cl.cam.ac.uk>
Subject: Re: [RFC] Dynamic modes support for PV xenfb 	(included)
Date: Wed, 02 Jan 2008 11:51:50 +0100	[thread overview]
Message-ID: <477B6CC6.9050402@redhat.com> (raw)
In-Reply-To: <47787D69.3E48.0018.0@novell.com>

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

  reply	other threads:[~2008-01-02 10:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-31 12:27 [RFC] Dynamic modes support for PV xenfb (included) Pat Campbell
2008-01-02 10:51 ` Gerd Hoffmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-09 21:19 Pat Campbell
2008-03-09 21:29 ` Samuel Thibault
2008-03-10 12:36 ` Samuel Thibault
2008-03-10 16:16 ` Samuel Thibault
2008-03-10 16:36   ` Samuel Thibault
2008-03-12 17:04 ` Markus Armbruster
2008-03-13 13:05   ` Pat Campbell
2008-03-13 19:53     ` Pat Campbell
2008-03-14 16:39     ` Markus Armbruster
2008-02-04 18:49 [RFC]Dynamic " Pat Campbell
2008-02-05  9:52 ` Markus Armbruster
2008-02-05 23:38   ` Pat Campbell
2008-02-06 15:49     ` Markus Armbruster
2008-01-28  0:48 [RFC] Dynamic " Pat Campbell
2008-01-28  8:07 ` Keir Fraser
2008-01-30  9:43 ` Markus Armbruster
2008-01-30 13:41   ` Pat Campbell
2008-01-30 17:45     ` Markus Armbruster
2008-01-30 20:27       ` Pat Campbell
2008-01-31  8:22         ` Gerd Hoffmann
2008-01-31  8:50           ` Markus Armbruster
2008-01-31  9:06         ` Markus Armbruster
2008-01-30 20:43 ` Daniel P. Berrange
2008-02-28 10:36 ` Keir Fraser
2008-02-28 11:36   ` Markus Armbruster
     [not found] <476133BC0200001800606E1D@sinclair.provo.novell.com>
     [not found] ` <476999300200001800607A16@sinclair.provo.novell.com>
2007-12-20  5:20   ` Pat Campbell
2007-12-23 21:58     ` Mark Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=477B6CC6.9050402@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mark.williamson@cl.cam.ac.uk \
    --cc=plc@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.