WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] stubdom: simplify xenfb resize handler

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stubdom: simplify xenfb resize handler
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jun 2008 03:40:35 -0700
Delivery-date: Tue, 10 Jun 2008 03:41:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213008310 -3600
# Node ID 6ec700f46c4e3a75be25bc14e500162f20328e3d
# Parent  f6520678755ab9690251467e1945cda63b040572
stubdom: simplify xenfb resize handler

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/ioemu/hw/xenfb.c |   38 +++++++++-----------------------------
 1 files changed, 9 insertions(+), 29 deletions(-)

diff -r f6520678755a -r 6ec700f46c4e tools/ioemu/hw/xenfb.c
--- a/tools/ioemu/hw/xenfb.c    Mon Jun 09 10:44:09 2008 +0100
+++ b/tools/ioemu/hw/xenfb.c    Mon Jun 09 11:45:10 2008 +0100
@@ -1353,8 +1353,6 @@ static char *kbd_path, *fb_path;
 
 static unsigned char linux2scancode[KEY_MAX + 1];
 
-static void xenfb_pv_colourdepth(DisplayState *ds, int depth);
-
 int xenfb_connect_vkbd(const char *path)
 {
     kbd_path = strdup(path);
@@ -1381,10 +1379,17 @@ static void xenfb_pv_resize_shared(Displ
     XenFBState *xs = ds->opaque;
     struct fbfront_dev *fb_dev = xs->fb_dev;
     int offset;
-    fprintf(stderr,"resize to %dx%d, %d required\n", w, h, linesize);
-    xenfb_pv_colourdepth(ds, depth);
+
+    fprintf(stderr,"resize to %dx%d@%d, %d required\n", w, h, depth, linesize);
     ds->width = w;
     ds->height = h;
+    if (!depth) {
+        ds->shared_buf = 0;
+        ds->depth = 32;
+    } else {
+        ds->shared_buf = 1;
+        ds->depth = depth;
+    }
     if (!linesize)
         ds->shared_buf = 0;
     if (!ds->shared_buf)
@@ -1405,31 +1410,6 @@ static void xenfb_pv_resize(DisplayState
 static void xenfb_pv_resize(DisplayState *ds, int w, int h)
 {
     xenfb_pv_resize_shared(ds, w, h, 0, 0, NULL);
-}
-
-static void xenfb_pv_colourdepth(DisplayState *ds, int depth)
-{
-    XenFBState *xs = ds->opaque;
-    struct fbfront_dev *fb_dev = xs->fb_dev;
-    static int lastdepth = -1;
-    if (!depth) {
-        ds->shared_buf = 0;
-        ds->depth = 32;
-    } else {
-        ds->shared_buf = 1;
-        ds->depth = depth;
-    }
-    if (depth != lastdepth) {
-        fprintf(stderr,"redepth to %d required\n", depth);
-        lastdepth = depth;
-    } else return;
-    if (!fb_dev)
-        return;
-    if (ds->shared_buf) {
-        ds->data = NULL;
-    } else {
-        ds->data = xs->nonshared_vram;
-    }
 }
 
 static void xenfb_pv_setdata(DisplayState *ds, void *pixels)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] stubdom: simplify xenfb resize handler, Xen patchbot-unstable <=