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-devel

Re: [Xen-devel] [Patch] fix xenfb_update_screen bogus rect

To: Markus Armbruster <armbru@xxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] fix xenfb_update_screen bogus rect
From: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Date: Thu, 29 Jan 2009 18:12:36 +0900
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 29 Jan 2009 01:13:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <87zlhb1own.fsf@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <497E784B.7060003@xxxxxxxxxxxxxx> <497ED10A.76E4.0078.0@xxxxxxxxxx> <498009CC.1000101@xxxxxxxxxxxxxx> <49802E40.76E4.0078.0@xxxxxxxxxx> <87zlhb1own.fsf@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
Hi, Markus and Jan

Markus Armbruster wrote:
"Jan Beulich" <jbeulich@xxxxxxxxxx> writes:

Generally this looks okay (assuming it works), but couldn't the update_wanted
field then go away altogether?

Jan

I think so, yes.  Start the kthread only when request-update.

Thank you for your review.
The patch was commited already.
So I made an additional patch which eliminate the update_wanted field.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

Best Regards,

Akio Takebe
diff -r 51decc39e5e7 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c       Wed Jan 28 13:42:09 2009 +0000
+++ b/drivers/xen/fbfront/xenfb.c       Thu Jan 29 18:04:36 2009 +0900
@@ -61,7 +61,6 @@ struct xenfb_info
        int                     irq;
        struct xenfb_page       *page;
        unsigned long           *mfns;
-       int                     update_wanted; /* XENFB_TYPE_UPDATE wanted */
        int                     feature_resize; /* Backend has resize feature */
        struct xenfb_resize     resize;
        int                     resize_dpy;
@@ -208,8 +207,6 @@ static void xenfb_update_screen(struct x
        int y1, y2, x1, x2;
        struct xenfb_mapping *map;
 
-       if (!info->update_wanted)
-               return;
        if (xenfb_queue_full(info))
                return;
 
@@ -823,22 +820,24 @@ static void xenfb_backend_changed(struct
                if (dev->state != XenbusStateConnected)
                        goto InitWait; /* no InitWait seen yet, fudge it */
 
-               if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
-                                "request-update", "%d", &val) < 0)
-                       val = 0;
-               if (val)
-                       info->update_wanted = 1;
 
                if (xenbus_scanf(XBT_NIL, dev->otherend,
                                        "feature-resize", "%d", &val) < 0)
                        val = 0;
                info->feature_resize = val;
 
-               info->kthread = kthread_run(xenfb_thread, info, "xenfb thread");
-               if (IS_ERR(info->kthread)) {
-                       info->kthread = NULL;
-                       xenbus_dev_fatal(dev, PTR_ERR(info->kthread),
-                                       "register_framebuffer");
+               if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+                                "request-update", "%d", &val) < 0)
+                       val = 0;
+
+               if (val){
+                       info->kthread = kthread_run(xenfb_thread, info,
+                                                   "xenfb thread");
+                       if (IS_ERR(info->kthread)) {
+                               info->kthread = NULL;
+                               xenbus_dev_fatal(dev, PTR_ERR(info->kthread),
+                                               "register_framebuffer");
+                       }
                }
                break;
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel