From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzmVp-0002mg-T5 for qemu-devel@nongnu.org; Tue, 21 Feb 2012 05:00:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzmVj-0005u5-Mi for qemu-devel@nongnu.org; Tue, 21 Feb 2012 04:59:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzmVj-0005u1-Em for qemu-devel@nongnu.org; Tue, 21 Feb 2012 04:59:51 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1L9xoBF021981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 Feb 2012 04:59:50 -0500 Date: Tue, 21 Feb 2012 11:59:45 +0200 From: Alon Levy Message-ID: <20120221095945.GG6476@garlic> References: <1329686886-6853-1-git-send-email-alevy@redhat.com> <1329686886-6853-8-git-send-email-alevy@redhat.com> <4F423155.1010706@redhat.com> <20120220123823.GG23926@garlic.redhat.com> <4F42481B.3070605@redhat.com> <20120220173639.GJ23926@garlic.redhat.com> <4F434E82.2030401@redhat.com> <20120221082613.GD6476@garlic> <4F4361F1.5000207@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F4361F1.5000207@redhat.com> Subject: Re: [Qemu-devel] [RFC 7/7] qxl: add allocator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, elmarco@redhat.com On Tue, Feb 21, 2012 at 10:20:49AM +0100, Gerd Hoffmann wrote: > Hi, > > > Right now qxl_render_update checks if the displaysurface buffer is not > > shared, meaning it was allocated by qemu, and in this case it replaces > > it with the flipped buffer. > > I think we should first reqire spice-server 0.8.latest, so > update_area_complete is available unconditionally. Then do any > displaysurface updates in that callback (or a bh kicked by that > callback). Handle both shared & non-shared cases. I think we also can > get rid of the flip buffer then and just use a non-shared displaysurface > in that case (and flip the upside-down qxl surface while copying to the > qemu displaysurface). ok, I'll try that... > > > But right after that surface->data gets reset, by vga_hw_screen_dump: > > vga_hw_screen_dump/console_select/qemu_resize_displaysurface/ds->allocator->resize_displaysurface/defaultallocator_resize_displaysurface/qemu_alloc_display > > > > Hence my line of thought that replacing the allocator with my own would > > prevent this. Since you have misgivings about using our own allocator > > that I don't know how to resolve, I'm instead doing a second > > reallocation in our dpy_resize callback qxl.c:display_resize, in affect > > it means that we have three allocations and three deallocations for every > > screendump. Do you still think it's less ugly then an allocator? note > > that I have sdl and vnc working with spice with my allocator scheme. > > (just didn't test all three together yet). > > IMHO that calls for a patch like this to get rid of the pointless > console_select() call: > > --- a/console.c > +++ b/console.c > @@ -181,12 +181,14 @@ void vga_hw_screen_dump(const char *filename) > > /* There is currently no way of specifying which screen we want to > dump, > so always dump the first one. */ > - console_select(0); > + if (previous_active_console && previous_active_console->index != 0) { > + console_select(0); > + } > if (consoles[0] && consoles[0]->hw_screen_dump) { > consoles[0]->hw_screen_dump(consoles[0]->hw, filename); > } > > - if (previous_active_console) { > + if (previous_active_console && previous_active_console->index != 0) { > console_select(previous_active_console->index); > } > } ...and that. Thanks. > > > cheers, > Gerd >