From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akio Takebe Subject: Re: [Patch] fix xenfb_update_screen bogus rect Date: Thu, 29 Jan 2009 18:12:36 +0900 Message-ID: <49817304.4080509@jp.fujitsu.com> References: <497E784B.7060003@jp.fujitsu.com> <497ED10A.76E4.0078.0@novell.com> <498009CC.1000101@jp.fujitsu.com> <49802E40.76E4.0078.0@novell.com> <87zlhb1own.fsf@pike.pond.sub.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070001090403010904010805" Return-path: In-Reply-To: <87zlhb1own.fsf@pike.pond.sub.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Markus Armbruster Cc: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------070001090403010904010805 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Markus and Jan Markus Armbruster wrote: > "Jan Beulich" 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 Best Regards, Akio Takebe --------------070001090403010904010805 Content-Type: text/x-diff; name="eliminate_update_wanted.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eliminate_update_wanted.patch" 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; --------------070001090403010904010805 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------070001090403010904010805--