add OpenWrt-logo (480x480) besides the well known penguin and prevent early printk...
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.29 / 050-dont-override-logo-with-early-printks.patch
1 diff -ruN linux-2.6.29.orig/drivers/video/console/fbcon.c linux-2.6.29/drivers/video/console/fbcon.c
2 --- linux-2.6.29.orig/drivers/video/console/fbcon.c 2009-05-14 22:21:12.000000000 +0200
3 +++ linux-2.6.29/drivers/video/console/fbcon.c 2009-05-15 01:45:36.000000000 +0200
4 @@ -562,7 +562,7 @@
5 /* Need to make room for the logo */
6 struct fbcon_ops *ops = info->fbcon_par;
7 int cnt, erase = vc->vc_video_erase_char, step;
8 - unsigned short *save = NULL, *r, *q;
9 + unsigned short *r, *q;
10 int logo_height;
11
12 if (info->flags & FBINFO_MODULE) {
13 @@ -581,37 +581,18 @@
14 q = (unsigned short *) (vc->vc_origin +
15 vc->vc_size_row * rows);
16 step = logo_lines * cols;
17 - for (r = q - logo_lines * cols; r < q; r++)
18 - if (scr_readw(r) != vc->vc_video_erase_char)
19 - break;
20 - if (r != q && new_rows >= rows + logo_lines) {
21 - save = kmalloc(logo_lines * new_cols * 2, GFP_KERNEL);
22 - if (save) {
23 - int i = cols < new_cols ? cols : new_cols;
24 - scr_memsetw(save, erase, logo_lines * new_cols * 2);
25 - r = q - step;
26 - for (cnt = 0; cnt < logo_lines; cnt++, r += i)
27 - scr_memcpyw(save + cnt * new_cols, r, 2 * i);
28 - r = q;
29 - }
30 - }
31 - if (r == q) {
32 - /* We can scroll screen down */
33 - r = q - step - cols;
34 - for (cnt = rows - logo_lines; cnt > 0; cnt--) {
35 - scr_memcpyw(r + step, r, vc->vc_size_row);
36 - r -= cols;
37 - }
38 - if (!save) {
39 - int lines;
40 - if (vc->vc_y + logo_lines >= rows)
41 - lines = rows - vc->vc_y - 1;
42 - else
43 - lines = logo_lines;
44 - vc->vc_y += lines;
45 - vc->vc_pos += lines * vc->vc_size_row;
46 - }
47 - }
48 + r = q - step - cols;
49 + for (cnt = rows - logo_lines; cnt > 0; cnt--) {
50 + scr_memcpyw(r + step, r, vc->vc_size_row);
51 + r -= cols;
52 + }
53 + int lines;
54 + if (vc->vc_y + logo_lines >= rows)
55 + lines = rows - vc->vc_y - 1;
56 + else
57 + lines = logo_lines;
58 + vc->vc_y += lines;
59 + vc->vc_pos += lines * vc->vc_size_row;
60 scr_memsetw((unsigned short *) vc->vc_origin,
61 erase,
62 vc->vc_size_row * logo_lines);
63 @@ -621,16 +602,6 @@
64 update_screen(vc);
65 }
66
67 - if (save) {
68 - q = (unsigned short *) (vc->vc_origin +
69 - vc->vc_size_row *
70 - rows);
71 - scr_memcpyw(q, save, logo_lines * new_cols * 2);
72 - vc->vc_y += logo_lines;
73 - vc->vc_pos += logo_lines * vc->vc_size_row;
74 - kfree(save);
75 - }
76 -
77 if (logo_lines > vc->vc_bottom) {
78 logo_shown = FBCON_LOGO_CANSHOW;
79 printk(KERN_INFO