Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1869 - genpatches-2.6/trunk/2.6.38
Date: Wed, 02 Feb 2011 00:44:33
Message-Id: 20110202004417.ACA2B20054@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2011-02-02 00:44:16 +0000 (Wed, 02 Feb 2011)
3 New Revision: 1869
4
5 Modified:
6 genpatches-2.6/trunk/2.6.38/4200_fbcondecor-0.9.6.patch
7 Log:
8 Committing Alexey's latest fbcondecor port for 2.6.38
9
10 Modified: genpatches-2.6/trunk/2.6.38/4200_fbcondecor-0.9.6.patch
11 ===================================================================
12 --- genpatches-2.6/trunk/2.6.38/4200_fbcondecor-0.9.6.patch 2011-02-01 15:47:11 UTC (rev 1868)
13 +++ genpatches-2.6/trunk/2.6.38/4200_fbcondecor-0.9.6.patch 2011-02-02 00:44:16 UTC (rev 1869)
14 @@ -1,7 +1,7 @@
15 -From fce3327edfeca7dffe14b1bb3db417e41b2c33ab Mon Sep 17 00:00:00 2001
16 +From c487b396d2c8a819dbe6548490a4d18bb520736a Mon Sep 17 00:00:00 2001
17 From: Alexey Shvetsov <alexxy@g.o>
18 -Date: Mon, 17 Jan 2011 20:03:46 +0300
19 -Subject: [PATCH] [fbcondecor-0.9.6] Import fbcondecor
20 +Date: Sun, 23 Jan 2011 00:09:58 +0300
21 +Subject: [PATCH] [PATCH] [fbcondecor-0.9.6] Import fbcondecor
22
23 Import from http://dev.gentoo.org/~spock
24 Bootsplash successor by Michal Januszewski
25 @@ -10,14 +10,14 @@
26 ---
27 Documentation/fb/00-INDEX | 2 +
28 Documentation/fb/fbcondecor.txt | 206 +++++++++++++
29 - drivers/Makefile | 6 +-
30 - drivers/video/Kconfig | 1 -
31 + drivers/Makefile | 4 +-
32 + drivers/Makefile.rej | 16 +
33 drivers/video/console/Kconfig | 13 +
34 drivers/video/console/Makefile | 1 +
35 drivers/video/console/bitblit.c | 20 +-
36 drivers/video/console/cfbcondecor.c | 471 +++++++++++++++++++++++++++++
37 - drivers/video/console/fbcon.c | 183 ++++++++++--
38 - drivers/video/console/fbcondecor.c | 561 +++++++++++++++++++++++++++++++++++
39 + drivers/video/console/fbcon.c | 186 ++++++++++--
40 + drivers/video/console/fbcondecor.c | 562 +++++++++++++++++++++++++++++++++++
41 drivers/video/console/fbcondecor.h | 78 +++++
42 drivers/video/fbcmap.c | 9 +-
43 drivers/video/fbmem.c | 9 -
44 @@ -25,8 +25,9 @@
45 include/linux/console_struct.h | 3 +
46 include/linux/fb.h | 88 ++++++
47 kernel/sysctl.c | 13 +
48 - 17 files changed, 1668 insertions(+), 42 deletions(-)
49 + 17 files changed, 1686 insertions(+), 41 deletions(-)
50 create mode 100644 Documentation/fb/fbcondecor.txt
51 + create mode 100644 drivers/Makefile.rej
52 create mode 100644 drivers/video/console/cfbcondecor.c
53 create mode 100644 drivers/video/console/fbcondecor.c
54 create mode 100644 drivers/video/console/fbcondecor.h
55 @@ -258,7 +259,7 @@
56 +Fbcondecor, fbcondecor protocol design, current implementation & docs by:
57 + Michal Januszewski <spock@g.o>
58 diff --git a/drivers/Makefile b/drivers/Makefile
59 -index 7eb35f4..925e9f2 100644
60 +index b423bb1..4ce76a6 100644
61 --- a/drivers/Makefile
62 +++ b/drivers/Makefile
63 @@ -9,6 +9,9 @@ obj-y += gpio/
64 @@ -271,31 +272,38 @@
65 obj-y += video/
66 obj-y += idle/
67 obj-$(CONFIG_ACPI) += acpi/
68 -@@ -24,10 +27,7 @@ obj-$(CONFIG_XEN) += xen/
69 - # regulators early, since some subsystems rely on them to initialize
70 - obj-$(CONFIG_REGULATOR) += regulator/
71 -
72 --# char/ comes before serial/ etc so that the VT console is the boot-time
73 --# default.
74 +@@ -27,7 +30,6 @@ obj-$(CONFIG_REGULATOR) += regulator/
75 + # tty/ comes before char/ so that the VT console is the boot-time
76 + # default.
77 obj-y += tty/
78 -obj-y += char/
79
80 # gpu/ comes after char for AGP vs DRM startup
81 obj-y += gpu/
82 -diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
83 -index d916ac0..1a5d02d 100644
84 ---- a/drivers/video/Kconfig
85 -+++ b/drivers/video/Kconfig
86 -@@ -1268,7 +1268,6 @@ config FB_MATROX
87 - select FB_CFB_FILLRECT
88 - select FB_CFB_COPYAREA
89 - select FB_CFB_IMAGEBLIT
90 -- select FB_TILEBLITTING
91 - select FB_MACMODES if PPC_PMAC
92 - ---help---
93 - Say Y here if you have a Matrox Millennium, Matrox Millennium II,
94 +diff --git a/drivers/Makefile.rej b/drivers/Makefile.rej
95 +new file mode 100644
96 +index 0000000..c3d3251
97 +--- /dev/null
98 ++++ b/drivers/Makefile.rej
99 +@@ -0,0 +1,16 @@
100 ++--- drivers/Makefile
101 +++++ drivers/Makefile
102 ++@@ -27,10 +30,12 @@
103 ++ # regulators early, since some subsystems rely on them to initialize
104 ++ obj-$(CONFIG_REGULATOR) += regulator/
105 ++
106 +++<<<<<<< HEAD
107 ++ # tty/ comes before char/ so that the VT console is the boot-time
108 ++ # default.
109 +++=======
110 +++>>>>>>> [fbcondecor-0.9.6] Import fbcondecor
111 ++ obj-y += tty/
112 ++-obj-y += char/
113 ++
114 ++ # gpu/ comes after char for AGP vs DRM startup
115 ++ obj-y += gpu/
116 diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
117 -index 5a35f22..dc1417f 100644
118 +index 2209e35..1c49f8e 100644
119 --- a/drivers/video/console/Kconfig
120 +++ b/drivers/video/console/Kconfig
121 @@ -122,6 +122,19 @@ config FRAMEBUFFER_CONSOLE_ROTATION
122 @@ -854,7 +862,7 @@
123 + }
124 +}
125 diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
126 -index 7ccc967..dac5af3 100644
127 +index 9c092b8..e763778 100644
128 --- a/drivers/video/console/fbcon.c
129 +++ b/drivers/video/console/fbcon.c
130 @@ -80,6 +80,7 @@
131 @@ -883,15 +891,7 @@
132 u16 c, int is_fg)
133 {
134 int depth = fb_get_color_depth(&info->var, &info->fix);
135 -@@ -392,6 +393,7 @@ static void fb_flashcursor(struct work_struct *work)
136 - CM_ERASE : CM_DRAW;
137 - ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1),
138 - get_color(vc, info, c, 0));
139 -+
140 - release_console_sem();
141 - }
142 -
143 -@@ -528,6 +530,9 @@ static int search_for_mapped_con(void)
144 +@@ -528,6 +529,9 @@ static int search_for_mapped_con(void)
145 static int fbcon_takeover(int show_logo)
146 {
147 int err, i;
148 @@ -901,7 +901,7 @@
149
150 if (!num_registered_fb)
151 return -ENODEV;
152 -@@ -548,6 +553,12 @@ static int fbcon_takeover(int show_logo)
153 +@@ -548,6 +552,12 @@ static int fbcon_takeover(int show_logo)
154 info_idx = -1;
155 } else {
156 fbcon_has_console_bind = 1;
157 @@ -914,7 +914,7 @@
158 }
159
160 return err;
161 -@@ -1002,6 +1013,12 @@ static const char *fbcon_startup(void)
162 +@@ -1002,6 +1012,12 @@ static const char *fbcon_startup(void)
163 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
164 cols /= vc->vc_font.width;
165 rows /= vc->vc_font.height;
166 @@ -927,7 +927,7 @@
167 vc_resize(vc, cols, rows);
168
169 DPRINTK("mode: %s\n", info->fix.id);
170 -@@ -1031,7 +1048,7 @@ static void fbcon_init(struct vc_data *vc, int init)
171 +@@ -1031,7 +1047,7 @@ static void fbcon_init(struct vc_data *vc, int init)
172 cap = info->flags;
173
174 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
175 @@ -936,7 +936,7 @@
176 logo = 0;
177
178 if (var_to_display(p, &info->var, info))
179 -@@ -1241,6 +1258,11 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
180 +@@ -1241,6 +1257,11 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
181 if (sy < vc->vc_top && vc->vc_top == logo_lines)
182 vc->vc_top = 0;
183
184 @@ -948,7 +948,7 @@
185 /* Split blits that cross physical y_wrap boundary */
186
187 y_break = p->vrows - p->yscroll;
188 -@@ -1260,10 +1282,15 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
189 +@@ -1260,10 +1281,15 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
190 struct display *p = &fb_display[vc->vc_num];
191 struct fbcon_ops *ops = info->fbcon_par;
192
193 @@ -968,7 +968,7 @@
194 }
195
196 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
197 -@@ -1279,8 +1306,13 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
198 +@@ -1279,8 +1305,13 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
199 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
200 struct fbcon_ops *ops = info->fbcon_par;
201
202 @@ -984,7 +984,7 @@
203 }
204
205 static void fbcon_cursor(struct vc_data *vc, int mode)
206 -@@ -1800,7 +1832,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
207 +@@ -1800,7 +1831,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
208 count = vc->vc_rows;
209 if (softback_top)
210 fbcon_softback_note(vc, t, count);
211 @@ -993,7 +993,7 @@
212 goto redraw_up;
213 switch (p->scrollmode) {
214 case SCROLL_MOVE:
215 -@@ -1893,6 +1925,8 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
216 +@@ -1893,6 +1924,8 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
217 count = vc->vc_rows;
218 if (logo_shown >= 0)
219 goto redraw_down;
220 @@ -1002,7 +1002,7 @@
221 switch (p->scrollmode) {
222 case SCROLL_MOVE:
223 fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
224 -@@ -2041,6 +2075,13 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s
225 +@@ -2041,6 +2074,13 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s
226 }
227 return;
228 }
229 @@ -1016,7 +1016,7 @@
230 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
231 height, width);
232 }
233 -@@ -2111,8 +2152,8 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width,
234 +@@ -2111,8 +2151,8 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width,
235 var.yres = virt_h * virt_fh;
236 x_diff = info->var.xres - var.xres;
237 y_diff = info->var.yres - var.yres;
238 @@ -1027,7 +1027,7 @@
239 const struct fb_videomode *mode;
240
241 DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
242 -@@ -2148,6 +2189,21 @@ static int fbcon_switch(struct vc_data *vc)
243 +@@ -2148,6 +2188,21 @@ static int fbcon_switch(struct vc_data *vc)
244
245 info = registered_fb[con2fb_map[vc->vc_num]];
246 ops = info->fbcon_par;
247 @@ -1049,7 +1049,7 @@
248
249 if (softback_top) {
250 if (softback_lines)
251 -@@ -2166,9 +2222,6 @@ static int fbcon_switch(struct vc_data *vc)
252 +@@ -2166,9 +2221,6 @@ static int fbcon_switch(struct vc_data *vc)
253 logo_shown = FBCON_LOGO_CANSHOW;
254 }
255
256 @@ -1059,7 +1059,7 @@
257 /*
258 * FIXME: If we have multiple fbdev's loaded, we need to
259 * update all info->currcon. Perhaps, we can place this
260 -@@ -2212,6 +2265,18 @@ static int fbcon_switch(struct vc_data *vc)
261 +@@ -2212,6 +2264,18 @@ static int fbcon_switch(struct vc_data *vc)
262 fbcon_del_cursor_timer(old_info);
263 }
264
265 @@ -1078,7 +1078,7 @@
266 if (fbcon_is_inactive(vc, info) ||
267 ops->blank_state != FB_BLANK_UNBLANK)
268 fbcon_del_cursor_timer(info);
269 -@@ -2320,15 +2385,20 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
270 +@@ -2320,15 +2384,20 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
271 }
272 }
273
274 @@ -1103,7 +1103,7 @@
275 }
276
277 if (!blank)
278 -@@ -2503,13 +2573,22 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
279 +@@ -2503,13 +2572,22 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
280 }
281
282 if (resize) {
283 @@ -1126,7 +1126,7 @@
284 if (CON_IS_VISIBLE(vc) && softback_buf)
285 fbcon_update_softback(vc);
286 } else if (CON_IS_VISIBLE(vc)
287 -@@ -2638,7 +2717,11 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
288 +@@ -2638,7 +2716,11 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
289 int i, j, k, depth;
290 u8 val;
291
292 @@ -1139,7 +1139,7 @@
293 return -EINVAL;
294
295 if (!CON_IS_VISIBLE(vc))
296 -@@ -2664,7 +2747,49 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
297 +@@ -2664,7 +2746,49 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
298 } else
299 fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
300
301 @@ -1190,7 +1190,7 @@
302 }
303
304 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
305 -@@ -2872,7 +2997,7 @@ static void fbcon_modechanged(struct fb_info *info)
306 +@@ -2872,7 +2996,7 @@ static void fbcon_modechanged(struct fb_info *info)
307 struct fbcon_ops *ops = info->fbcon_par;
308 struct vc_data *vc;
309 struct display *p;
310 @@ -1199,7 +1199,7 @@
311
312 if (!ops || ops->currcon < 0)
313 return;
314 -@@ -2890,7 +3015,18 @@ static void fbcon_modechanged(struct fb_info *info)
315 +@@ -2890,7 +3014,18 @@ static void fbcon_modechanged(struct fb_info *info)
316 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
317 cols /= vc->vc_font.width;
318 rows /= vc->vc_font.height;
319 @@ -1219,7 +1219,25 @@
320 updatescrollmode(p, info, vc);
321 scrollback_max = 0;
322 scrollback_current = 0;
323 -@@ -3545,6 +3681,7 @@ static void fbcon_exit(void)
324 +@@ -3321,7 +3456,7 @@ static ssize_t store_rotate(struct device *device,
325 + if (fbcon_has_exited)
326 + return count;
327 +
328 +- console_lock();
329 ++ console_unlock();
330 + idx = con2fb_map[fg_console];
331 +
332 + if (idx == -1 || registered_fb[idx] == NULL)
333 +@@ -3369,7 +3504,7 @@ static ssize_t show_rotate(struct device *device,
334 + if (fbcon_has_exited)
335 + return 0;
336 +
337 +- console_lock();
338 ++ console_unlock();
339 + idx = con2fb_map[fg_console];
340 +
341 + if (idx == -1 || registered_fb[idx] == NULL)
342 +@@ -3545,6 +3680,7 @@ static void fbcon_exit(void)
343 }
344 }
345
346 @@ -1229,10 +1247,10 @@
347
348 diff --git a/drivers/video/console/fbcondecor.c b/drivers/video/console/fbcondecor.c
349 new file mode 100644
350 -index 0000000..d5da982
351 +index 0000000..43e8063
352 --- /dev/null
353 +++ b/drivers/video/console/fbcondecor.c
354 -@@ -0,0 +1,561 @@
355 +@@ -0,0 +1,562 @@
356 +/*
357 + * linux/drivers/video/console/fbcondecor.c -- Framebuffer console decorations
358 + *
359 @@ -1269,6 +1287,7 @@
360 +#include <linux/device.h>
361 +#include <linux/fs.h>
362 +#include <linux/compat.h>
363 ++#include <linux/console.h>
364 +
365 +#include <asm/uaccess.h>
366 +#include <asm/irq.h>
367 @@ -1375,13 +1394,13 @@
368 + int ret;
369 +
370 + if (origin == FBCON_DECOR_IO_ORIG_USER)
371 -+ acquire_console_sem();
372 ++ console_lock();
373 + if (!state)
374 + ret = fbcon_decor_disable(vc, 1);
375 + else
376 + ret = fbcon_decor_enable(vc);
377 + if (origin == FBCON_DECOR_IO_ORIG_USER)
378 -+ release_console_sem();
379 ++ console_unlock();
380 +
381 + return ret;
382 +}
383 @@ -1420,7 +1439,7 @@
384 + * new config and background picture will be successfully loaded, and the
385 + * decor will stay on, or in case of a failure it'll be turned off in fbcon. */
386 + if (origin == FBCON_DECOR_IO_ORIG_USER) {
387 -+ acquire_console_sem();
388 ++ console_lock();
389 + if (vc->vc_decor.state)
390 + fbcon_decor_disable(vc, 1);
391 + }
392 @@ -1431,7 +1450,7 @@
393 + vc->vc_decor = *cfg;
394 +
395 + if (origin == FBCON_DECOR_IO_ORIG_USER)
396 -+ release_console_sem();
397 ++ console_unlock();
398 +
399 + printk(KERN_INFO "fbcondecor: console %d using theme '%s'\n",
400 + vc->vc_num, vc->vc_decor.theme);
401 @@ -1527,7 +1546,7 @@
402 + /* If this ioctl is a response to a request from kernel, the console sem
403 + * is already held. */
404 + if (origin == FBCON_DECOR_IO_ORIG_USER)
405 -+ acquire_console_sem();
406 ++ console_lock();
407 +
408 + if (info->bgdecor.data)
409 + vfree((u8*)info->bgdecor.data);
410 @@ -1545,7 +1564,7 @@
411 + }
412 +
413 + if (origin == FBCON_DECOR_IO_ORIG_USER)
414 -+ release_console_sem();
415 ++ console_unlock();
416 +
417 + return 0;
418 +
419 @@ -1907,7 +1926,7 @@
420 }
421
422 diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
423 -index 4ac1201..ff014dc 100644
424 +index e2bf953..cf0ecf7 100644
425 --- a/drivers/video/fbmem.c
426 +++ b/drivers/video/fbmem.c
427 @@ -1166,15 +1166,6 @@ struct fb_fix_screeninfo32 {
428 @@ -2127,7 +2146,7 @@
429 void *par;
430 /* we need the PCI or similiar aperture base/size not
431 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
432 -index bc86bb3..9b869f1 100644
433 +index 0f1bd83..91946b3 100644
434 --- a/kernel/sysctl.c
435 +++ b/kernel/sysctl.c
436 @@ -133,6 +133,10 @@ static int min_percpu_pagelist_fract = 8;
437 @@ -2141,7 +2160,7 @@
438 #ifdef CONFIG_INOTIFY_USER
439 #include <linux/inotify.h>
440 #endif
441 -@@ -246,6 +250,15 @@ static struct ctl_table root_table[] = {
442 +@@ -247,6 +251,15 @@ static struct ctl_table root_table[] = {
443 .mode = 0555,
444 .child = dev_table,
445 },
446 @@ -2158,6 +2177,4 @@
447 };
448
449 --
450 -1.7.4.rc1
451 -
452 -
453 +1.7.4.rc2