From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [RFC] Dynamic modes support for PV xenfb (included) Date: Mon, 10 Mar 2008 16:36:39 +0000 Message-ID: <20080310163639.GG6158@implementation.uk.xensource.com> References: <47D4547F.1060305@novell.com> <20080310161657.GF6158@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20080310161657.GF6158@implementation.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Pat Campbell , xen-devel , Markus Armbruster , "Daniel P. Berrange" List-Id: xen-devel@lists.xenproject.org Samuel Thibault, le Mon 10 Mar 2008 16:16:57 +0000, a écrit : > Pat Campbell, le Sun 09 Mar 2008 15:19:59 -0600, a écrit : > > diff -r 854b0704962b tools/ioemu/hw/xenfb.c > > --- a/tools/ioemu/hw/xenfb.c Wed Mar 05 09:43:03 2008 +0000 > > +++ b/tools/ioemu/hw/xenfb.c Fri Mar 07 13:44:09 2008 -0600 > > @@ -516,6 +516,15 @@ static void xenfb_on_fb_event(struct xen > > } > > xenfb_guest_copy(xenfb, x, y, w, h); > > break; > > + case XENFB_TYPE_RESIZE: > > + xenfb->width = event->resize.width; > > + xenfb->height = event->resize.height; > > + xenfb->row_stride = event->resize.stride; > > + /* Disable video buf sharing, not compatable with resizing */ > > + dpy_colourdepth(xenfb->ds, 0); > > + dpy_resize(xenfb->ds, xenfb->width, xenfb->height); > > Insert if (xenfb->ds->shared_buf) dpy_setdata(xenfb->ds, xenfb->pixels); > just after dpy_colourdepth() and dpy_resize(), and the video buf sharing > will work (so you can replace 0 with xenfb->depth in the colourdepth > call). That actually leads me to the the question of an "offset" support in the resize event; it would actually be very easy: just add xenfb->offset to xenfb->pixels in the dpy_setdata call, as well as in the BLT macro and memcpy call in xenfb_guest_copy. Samuel