From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KR8Ru-0001Tk-Kq for qemu-devel@nongnu.org; Thu, 07 Aug 2008 12:34:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KR8Rt-0001R6-6v for qemu-devel@nongnu.org; Thu, 07 Aug 2008 12:34:50 -0400 Received: from [199.232.76.173] (port=36023 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KR8Rs-0001Qm-Tr for qemu-devel@nongnu.org; Thu, 07 Aug 2008 12:34:48 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:65194) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KR8Rs-0000gM-Fj for qemu-devel@nongnu.org; Thu, 07 Aug 2008 12:34:48 -0400 Date: Thu, 7 Aug 2008 17:34:41 +0100 From: Samuel Thibault Subject: Re: [Xen-devel] Re: [Qemu-devel] [PATCH 0/7] merge some xen bits into qemu Message-ID: <20080807163441.GQ6604@implementation.uk.xensource.com> References: <20080806125055.GG4448@implementation.uk.xensource.com> <4899AD19.8060606@redhat.com> <20080806140132.GL4448@implementation.uk.xensource.com> <4899B06F.2090101@redhat.com> <20080806142526.GN4448@implementation.uk.xensource.com> <20080806221047.GE4486@implementation> <489AA532.7040006@redhat.com> <20080807105352.GC6604@implementation.uk.xensource.com> <489AE6E2.2040500@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <489AE6E2.2040500@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: xen-devel@lists.xensource.com, Ian Jackson , Markus Armbruster , qemu-devel@nongnu.org Gerd Hoffmann, le Thu 07 Aug 2008 14:13:22 +0200, a écrit : > > In your xen patch, since idle and GUI_REFRESH_INTERVAL are there, you > > can just use them. We'll push them to qemu. > > I'd prefer to do it the other way around (push depending changes > upstream, then adapt xen-framebuffer.c). I want xen-framebuffer.c look > the same in xen and upstream. Mmm, looking at that again, most of my idleness patch is actually already upstream. What wasn't pushed is what is specific to xenfb: transmitting the idleness to the backend. For this xenfb needs to get idleness information. Below is the patch that does that, you can just fold it in your qemu-upstream/0008-xen-add-framebuffer-backend-driver.patch About GUI_REFRESH_INTERVAL, you can just move it to a header. Samuel Index: console.h =================================================================== --- console.h (révision 4992) +++ console.h (copie de travail) @@ -80,6 +80,7 @@ void *opaque; struct QEMUTimer *gui_timer; uint64_t gui_timer_interval; + int idle; void (*dpy_update)(struct DisplayState *s, int x, int y, int w, int h); void (*dpy_resize)(struct DisplayState *s, int w, int h); Index: vl.c =================================================================== --- vl.c (révision 4992) +++ vl.c (copie de travail) @@ -5930,6 +5930,8 @@ ds->dpy_update = dumb_update; ds->dpy_resize = dumb_resize; ds->dpy_refresh = dumb_refresh; + ds->gui_timer_interval = 500; + ds->idle = 1; } /***********************************************************/ Index: sdl.c =================================================================== --- sdl.c (révision 4992) +++ sdl.c (copie de travail) @@ -526,9 +526,11 @@ if (ev->active.gain) { /* Back to default interval */ ds->gui_timer_interval = 0; + ds->idle = 0; } else { /* Sleeping interval */ ds->gui_timer_interval = 500; + ds->idle = 1; } } break; Index: vnc.c =================================================================== --- vnc.c (révision 4992) +++ vnc.c (copie de travail) @@ -660,6 +660,7 @@ client_io_error qemu_set_fd_handler2(vs->csock, NULL, NULL, NULL, NULL); closesocket(vs->csock); vs->csock = -1; + vs->ds->idle = 1; buffer_reset(&vs->input); buffer_reset(&vs->output); vs->need_update = 0; @@ -1920,6 +1921,7 @@ static void vnc_connect(VncState *vs) { VNC_DEBUG("New client on socket %d\n", vs->csock); + vs->ds->idle = 0; socket_set_nonblock(vs->csock); qemu_set_fd_handler2(vs->csock, NULL, vnc_client_read, NULL, vs); vnc_write(vs, "RFB 003.008\n", 12); @@ -1959,6 +1961,7 @@ exit(1); ds->opaque = vs; + ds->idle = 1; vnc_state = vs; vs->display = NULL; vs->password = NULL;