]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/781-fbfront-bogus-rect.patch
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / 781-fbfront-bogus-rect.patch
1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/c9783c08495c
2 # HG changeset 781+783+788+789 patch
3 # User Keir Fraser <keir.fraser@citrix.com>
4 # Date 1233150093 0
5 # Node ID c9783c08495c56337dec371582b3f948e3b5ed8d
6 # Parent 83b71f4b5cb216d09856391d8616ee2cb6525c73
7 Subject: xenfb: fix xenfb_update_screen bogus rect
8 References: bnc#474335
9
10 Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
11
12 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/8197c86e6729
13 # HG changeset patch
14 # User Keir Fraser <keir.fraser@citrix.com>
15 # Date 1233228538 0
16 # Node ID 8197c86e67294835c9d90540cf776c373664c3ef
17 # Parent 51decc39e5e73ea201d0b96108f8a893106a6864
18 xenfb: eliminate the update_wanted field.
19
20 Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
21
22 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/26ddc59c674d
23 # HG changeset patch
24 # User Keir Fraser <keir.fraser@citrix.com>
25 # Date 1233312850 0
26 # Node ID 26ddc59c674df460cb36651ffe58bf30e46b1638
27 # Parent 98897f04b338f08686eba199d6234a95cf0939f1
28 xenfb: Revert mm_lock changes. They're not needed.
29 Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
30
31 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/25cc543a02e8
32 # HG changeset patch
33 # User Keir Fraser <keir.fraser@citrix.com>
34 # Date 1233669557 0
35 # Node ID 25cc543a02e88c090d117ee362ad006d1930f47b
36 # Parent 26ddc59c674df460cb36651ffe58bf30e46b1638
37 fbfront: Improve diagnostics when kthread_run() fails
38
39 Failure is reported with xenbus_dev_fatal(..."register_framebuffer"),
40 which was already suboptimal before it got moved away from
41 register_framebuffer(), and is outright misleading now.
42
43 Signed-off-by: Markus Armbruster <armbru@redhat.com>
44
45 Acked-by: jbeulich@novell.com
46
47 --- sle11-2009-02-16.orig/drivers/xen/fbfront/xenfb.c 2009-02-16 15:55:51.000000000 +0100
48 +++ sle11-2009-02-16/drivers/xen/fbfront/xenfb.c 2009-02-16 15:59:55.000000000 +0100
49 @@ -61,7 +61,6 @@ struct xenfb_info
50 int irq;
51 struct xenfb_page *page;
52 unsigned long *mfns;
53 - int update_wanted; /* XENFB_TYPE_UPDATE wanted */
54 int feature_resize; /* Backend has resize feature */
55 struct xenfb_resize resize;
56 int resize_dpy;
57 @@ -208,20 +207,25 @@ static void xenfb_update_screen(struct x
58 int y1, y2, x1, x2;
59 struct xenfb_mapping *map;
60
61 - if (!info->update_wanted)
62 - return;
63 if (xenfb_queue_full(info))
64 return;
65
66 mutex_lock(&info->mm_lock);
67
68 spin_lock_irqsave(&info->dirty_lock, flags);
69 - y1 = info->y1;
70 - y2 = info->y2;
71 - x1 = info->x1;
72 - x2 = info->x2;
73 - info->x1 = info->y1 = INT_MAX;
74 - info->x2 = info->y2 = 0;
75 + if (info->dirty){
76 + info->dirty = 0;
77 + y1 = info->y1;
78 + y2 = info->y2;
79 + x1 = info->x1;
80 + x2 = info->x2;
81 + info->x1 = info->y1 = INT_MAX;
82 + info->x2 = info->y2 = 0;
83 + } else {
84 + spin_unlock_irqrestore(&info->dirty_lock, flags);
85 + mutex_unlock(&info->mm_lock);
86 + return;
87 + }
88 spin_unlock_irqrestore(&info->dirty_lock, flags);
89
90 list_for_each_entry(map, &info->mappings, link) {
91 @@ -262,10 +266,7 @@ static int xenfb_thread(void *data)
92
93 while (!kthread_should_stop()) {
94 xenfb_handle_resize_dpy(info);
95 - if (info->dirty) {
96 - info->dirty = 0;
97 - xenfb_update_screen(info);
98 - }
99 + xenfb_update_screen(info);
100 wait_event_interruptible(info->wq,
101 kthread_should_stop() || info->dirty);
102 try_to_freeze();
103 @@ -666,15 +667,6 @@ static int __devinit xenfb_probe(struct
104 if (ret < 0)
105 goto error;
106
107 - /* FIXME should this be delayed until backend XenbusStateConnected? */
108 - info->kthread = kthread_run(xenfb_thread, info, "xenfb thread");
109 - if (IS_ERR(info->kthread)) {
110 - ret = PTR_ERR(info->kthread);
111 - info->kthread = NULL;
112 - xenbus_dev_fatal(dev, ret, "register_framebuffer");
113 - goto error;
114 - }
115 -
116 return 0;
117
118 error_nomem:
119 @@ -829,16 +821,25 @@ static void xenfb_backend_changed(struct
120 if (dev->state != XenbusStateConnected)
121 goto InitWait; /* no InitWait seen yet, fudge it */
122
123 - if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
124 - "request-update", "%d", &val) < 0)
125 - val = 0;
126 - if (val)
127 - info->update_wanted = 1;
128
129 if (xenbus_scanf(XBT_NIL, dev->otherend,
130 "feature-resize", "%d", &val) < 0)
131 val = 0;
132 info->feature_resize = val;
133 +
134 + if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
135 + "request-update", "%d", &val) < 0)
136 + val = 0;
137 +
138 + if (val){
139 + info->kthread = kthread_run(xenfb_thread, info,
140 + "xenfb thread");
141 + if (IS_ERR(info->kthread)) {
142 + info->kthread = NULL;
143 + xenbus_dev_fatal(dev, PTR_ERR(info->kthread),
144 + "xenfb_thread");
145 + }
146 + }
147 break;
148
149 case XenbusStateClosing: