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] [linux-2.6.18-xen] xenfb: fix xenfb_update_screen bogus

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xenfb: fix xenfb_update_screen bogus rect
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Jan 2009 09:30:02 -0800
Delivery-date: Wed, 28 Jan 2009 09:29:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1233150093 0
# Node ID c9783c08495c56337dec371582b3f948e3b5ed8d
# Parent  83b71f4b5cb216d09856391d8616ee2cb6525c73
xenfb: fix xenfb_update_screen bogus rect
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 drivers/xen/fbfront/xenfb.c |   47 ++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 23 deletions(-)

diff -r 83b71f4b5cb2 -r c9783c08495c drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c       Tue Jan 20 13:28:35 2009 +0000
+++ b/drivers/xen/fbfront/xenfb.c       Wed Jan 28 13:41:33 2009 +0000
@@ -213,17 +213,23 @@ static void xenfb_update_screen(struct x
        if (xenfb_queue_full(info))
                return;
 
+       spin_lock_irqsave(&info->dirty_lock, flags);
+       if (info->dirty){
+               info->dirty = 0;
+               y1 = info->y1;
+               y2 = info->y2;
+               x1 = info->x1;
+               x2 = info->x2;
+               info->x1 = info->y1 = INT_MAX;
+               info->x2 = info->y2 = 0;
+       } else {
+               spin_unlock_irqrestore(&info->dirty_lock, flags);
+               return;
+       }
+       spin_unlock_irqrestore(&info->dirty_lock, flags);
+
        mutex_lock(&info->mm_lock);
-
-       spin_lock_irqsave(&info->dirty_lock, flags);
-       y1 = info->y1;
-       y2 = info->y2;
-       x1 = info->x1;
-       x2 = info->x2;
-       info->x1 = info->y1 = INT_MAX;
-       info->x2 = info->y2 = 0;
-       spin_unlock_irqrestore(&info->dirty_lock, flags);
-
+       
        list_for_each_entry(map, &info->mappings, link) {
                if (!map->faults)
                        continue;
@@ -262,10 +268,7 @@ static int xenfb_thread(void *data)
 
        while (!kthread_should_stop()) {
                xenfb_handle_resize_dpy(info);
-               if (info->dirty) {
-                       info->dirty = 0;
-                       xenfb_update_screen(info);
-               }
+               xenfb_update_screen(info);
                wait_event_interruptible(info->wq,
                        kthread_should_stop() || info->dirty);
                try_to_freeze();
@@ -665,15 +668,6 @@ static int __devinit xenfb_probe(struct 
        ret = xenfb_connect_backend(dev, info);
        if (ret < 0)
                goto error;
-
-       /* FIXME should this be delayed until backend XenbusStateConnected? */
-       info->kthread = kthread_run(xenfb_thread, info, "xenfb thread");
-       if (IS_ERR(info->kthread)) {
-               ret = PTR_ERR(info->kthread);
-               info->kthread = NULL;
-               xenbus_dev_fatal(dev, ret, "register_framebuffer");
-               goto error;
-       }
 
        return 0;
 
@@ -839,6 +833,13 @@ static void xenfb_backend_changed(struct
                                        "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");
+               }
                break;
 
        case XenbusStateClosing:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xenfb: fix xenfb_update_screen bogus rect, Xen patchbot-linux-2.6.18-xen <=