qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [Qemu-devel] [PATCH 0/7] merge some xen bits into qe


From: Samuel Thibault
Subject: Re: [Xen-devel] Re: [Qemu-devel] [PATCH 0/7] merge some xen bits into qemu
Date: Thu, 7 Aug 2008 17:34:41 +0100
User-agent: Mutt/1.5.12-2006-07-14

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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]