From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38405 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJPLT-0001wG-PM for qemu-devel@nongnu.org; Tue, 01 Jun 2010 07:09:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJPLK-0002nw-WB for qemu-devel@nongnu.org; Tue, 01 Jun 2010 07:09:19 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:42145) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJPLK-0002nX-T9 for qemu-devel@nongnu.org; Tue, 01 Jun 2010 07:09:10 -0400 Message-ID: <4C04EAE8.5000509@citrix.com> Date: Tue, 1 Jun 2010 12:11:36 +0100 From: Julian Pidancet MIME-Version: 1.0 References: <1274386823-6153-1-git-send-email-kraxel@redhat.com> <4BF6DFC9.6010000@citrix.com> <4BFB7814.7040107@redhat.com> In-Reply-To: <4BFB7814.7040107@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [[RfC PATCH]] linux fbdev display driver prototype. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: "qemu-devel@nongnu.org" , Stefano Stabellini On 05/25/2010 08:11 AM, Gerd Hoffmann wrote: >> - You should register a Display Allocator and override the >> create_displaysurface() method like I did in the DirectFB driver. >> This way you save qemu a data copy. fbdev_render_32() should only be >> used when the guest framebuffer is not compatible with the physical >> framebuffer (guest_bpp != physical_bbp || guest_linesize != >> physical_linesize). > > Isn't a trivial move though. If the console is switched you must stop > drawing on the framebuffer. > > Right now this is easy: just stop copying. Likewise restoring the > screen when switching back is easy: just copy everything. > > If we give out pointers to the framebuffer to other qemu code which > doesn't know anything about console switching we have to be quite > careful get things right ... > When loosing the focus, you can force display surface reallocation by calling hw_invalidate(), this way you can give qemu a temporary pointer to prevent drawing on the framebuffer. When switching back, you just have to copy the content of the temporary pointer location to the framebuffer. Cheers, Julian Pidancet