From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7axt-0008D1-0y for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:31:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7axs-0008Ck-9c for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:31:20 -0500 Received: from [199.232.76.173] (port=51809 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7axs-0008Ce-3M for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:31:20 -0500 Received: from yw-out-1718.google.com ([74.125.46.152]:40232) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7axr-0000MZ-My for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:31:19 -0500 Received: by yw-out-1718.google.com with SMTP id 6so1219498ywa.82 for ; Tue, 02 Dec 2008 11:31:19 -0800 (PST) Message-ID: <49358D02.3090703@codemonkey.ws> Date: Tue, 02 Dec 2008 13:31:14 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3 of 7] [UPDATE] DisplayState interface change References: <492D8BB1.8040306@eu.citrix.com> In-Reply-To: <492D8BB1.8040306@eu.citrix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Stefano Stabellini wrote: > This patch changes the DisplayState interface adding support for > multiple frontends at the same time (sdl and vnc) and implements most > of the benefit of the shared_buf patch without the added complexity. > > Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is > also responsible for allocating the data and setting the depth. > Vga.c (or another backend) will do any necessary conversion. > > The idea is to change it so that is vga.c (or another backend) together > with console.c that fully manage the DisplayState interface allocating > data and setting the depth (either 16 or 32 bit, if the guest uses a > different resolution or is in text mode, vga.c (or another backend) is > in charge of doing the conversion seamlessly). > > The other idea is that DisplayState supports *multiple* frontends > like sdl and vnc; each of them can register some callbacks to be called > when a display event occurs. > > The interesting changes are: > > - the new structures and related functions in console.h and console.c > > in particular the following functions are very helpful to manage a > DisplaySurface: > > qemu_createDisplaySurface > qemu_resizeDisplaySurface > qemu_createDisplaySurfaceFrom > qemu_freeDisplaySurface > These names suck. Please change them to something more in line with the rest of the code. > Signed-off-by: Stefano Stabellini > > --- > diff -r f1fd23dcd333 hw/cirrus_vga.c > --- a/hw/cirrus_vga.c Tue Nov 25 12:28:31 2008 +0000 > +++ b/hw/cirrus_vga.c Wed Nov 26 11:43:17 2008 +0000 > @@ -789,22 +789,16 @@ > if (BLTUNSAFE(s)) > return 0; > > - if (s->ds->dpy_copy) { > - cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr, > - s->cirrus_blt_srcaddr - s->start_addr, > - s->cirrus_blt_width, s->cirrus_blt_height); > - } else { > - (*s->cirrus_rop) (s, s->vram_ptr + > - (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), > - s->vram_ptr + > - (s->cirrus_blt_srcaddr & s->cirrus_addr_mask), > - s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch, > - s->cirrus_blt_width, s->cirrus_blt_height); > + (*s->cirrus_rop) (s, s->vram_ptr + > + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), > + s->vram_ptr + > + (s->cirrus_blt_srcaddr & s->cirrus_addr_mask), > + s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch, > + s->cirrus_blt_width, s->cirrus_blt_height); > You've eliminated the dpy_copy optimization? This is extremely important for VNC. Regards, Anthony Liguori