/[linux-patches]/genpatches-2.6/trunk/2.6.15-pre/4500_fbsplash-0.9.2-r5.patch
Gentoo

Diff of /genpatches-2.6/trunk/2.6.15-pre/4500_fbsplash-0.9.2-r5.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 212 Revision 213
1diff --git a/Documentation/fb/00-INDEX b/Documentation/fb/00-INDEX 1diff --git a/Documentation/fb/00-INDEX b/Documentation/fb/00-INDEX
2index 92e89ae..a6cfacc 100644
2--- a/Documentation/fb/00-INDEX 3--- a/Documentation/fb/00-INDEX
3+++ b/Documentation/fb/00-INDEX 4+++ b/Documentation/fb/00-INDEX
4@@ -19,6 +19,8 @@ matroxfb.txt 5@@ -19,6 +19,8 @@ matroxfb.txt
5 - info on the Matrox frame buffer driver 6 - info on the Matrox frame buffer driver
6 pvr2fb.txt 7 pvr2fb.txt
10 tgafb.txt 11 tgafb.txt
11 - info on the TGA (DECChip 21030) frame buffer driver 12 - info on the TGA (DECChip 21030) frame buffer driver
12 vesafb.txt 13 vesafb.txt
13diff --git a/Documentation/fb/splash.txt b/Documentation/fb/splash.txt 14diff --git a/Documentation/fb/splash.txt b/Documentation/fb/splash.txt
14new file mode 100644 15new file mode 100644
16index 0000000..5e3b009
15--- /dev/null 17--- /dev/null
16+++ b/Documentation/fb/splash.txt 18+++ b/Documentation/fb/splash.txt
17@@ -0,0 +1,207 @@ 19@@ -0,0 +1,207 @@
18+What is it? 20+What is it?
19+----------- 21+-----------
220+ Ken Wimer <wimer@suse.de>. 222+ Ken Wimer <wimer@suse.de>.
221+ 223+
222+Fbsplash, splash protocol design, current implementation & docs by: 224+Fbsplash, splash protocol design, current implementation & docs by:
223+ Michael Januszewski <spock@gentoo.org> 225+ Michael Januszewski <spock@gentoo.org>
224+ 226+
225diff --git a/drivers/Makefile b/drivers/Makefile
226--- a/drivers/Makefile
227+++ b/drivers/Makefile
228@@ -7,16 +7,15 @@
229
230 obj-$(CONFIG_PCI) += pci/
231 obj-$(CONFIG_PARISC) += parisc/
232+# char/ comes before serial/ etc so that the VT console is the boot-time
233+# default.
234+obj-y += char/
235 obj-y += video/
236 obj-$(CONFIG_ACPI) += acpi/
237 # PnP must come after ACPI since it will eventually need to check if acpi
238 # was used and do nothing if so
239 obj-$(CONFIG_PNP) += pnp/
240
241-# char/ comes before serial/ etc so that the VT console is the boot-time
242-# default.
243-obj-y += char/
244-
245 obj-$(CONFIG_CONNECTOR) += connector/
246
247 # i810fb and intelfb depend on char/agp/
248diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig 227diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
228index 25b6ca6..dac3de5 100644
249--- a/drivers/video/Kconfig 229--- a/drivers/video/Kconfig
250+++ b/drivers/video/Kconfig 230+++ b/drivers/video/Kconfig
251@@ -792,7 +792,6 @@ config FB_MATROX 231@@ -752,7 +752,6 @@ config FB_MATROX
232 select FB_CFB_FILLRECT
252 select FB_CFB_COPYAREA 233 select FB_CFB_COPYAREA
253 select FB_CFB_IMAGEBLIT 234 select FB_CFB_IMAGEBLIT
254 select FB_SOFT_CURSOR
255- select FB_TILEBLITTING 235- select FB_TILEBLITTING
256 select FB_MACMODES if PPC_PMAC 236 select FB_MACMODES if PPC_PMAC
257 ---help--- 237 ---help---
258 Say Y here if you have a Matrox Millennium, Matrox Millennium II, 238 Say Y here if you have a Matrox Millennium, Matrox Millennium II,
259@@ -1576,5 +1575,15 @@ if FB && SYSFS 239@@ -1468,5 +1467,15 @@ if FB && SYSFS
260 source "drivers/video/backlight/Kconfig" 240 source "drivers/video/backlight/Kconfig"
261 endif 241 endif
262 242
263-endmenu 243-endmenu
264+config FB_SPLASH 244+config FB_SPLASH
272+ to Documentation/fb/splash.txt for more information. 252+ to Documentation/fb/splash.txt for more information.
273 253
274+ If unsure, say N. 254+ If unsure, say N.
275+endmenu 255+endmenu
276diff --git a/drivers/video/Makefile b/drivers/video/Makefile 256diff --git a/drivers/video/Makefile b/drivers/video/Makefile
257index aa434e7..8a74fce 100644
277--- a/drivers/video/Makefile 258--- a/drivers/video/Makefile
278+++ b/drivers/video/Makefile 259+++ b/drivers/video/Makefile
279@@ -7,6 +7,7 @@ 260@@ -7,6 +7,7 @@
280 obj-$(CONFIG_VT) += console/ 261 obj-$(CONFIG_VT) += console/
281 obj-$(CONFIG_LOGO) += logo/ 262 obj-$(CONFIG_LOGO) += logo/
284 265
285 obj-$(CONFIG_FB) += fb.o 266 obj-$(CONFIG_FB) += fb.o
286 fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ 267 fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
287diff --git a/drivers/video/cfbsplash.c b/drivers/video/cfbsplash.c 268diff --git a/drivers/video/cfbsplash.c b/drivers/video/cfbsplash.c
288new file mode 100644 269new file mode 100644
270index 0000000..4adeb2e
289--- /dev/null 271--- /dev/null
290+++ b/drivers/video/cfbsplash.c 272+++ b/drivers/video/cfbsplash.c
291@@ -0,0 +1,472 @@ 273@@ -0,0 +1,472 @@
292+/* 274+/*
293+ * linux/drivers/video/cfbsplash.c -- Framebuffer splash render functions 275+ * linux/drivers/video/cfbsplash.c -- Framebuffer splash render functions
760+ fbsplash_clear_margins(vc, info, 0); 742+ fbsplash_clear_margins(vc, info, 0);
761+ } 743+ }
762+} 744+}
763+ 745+
764diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c 746diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
747index e65fc3e..b8fcb6e 100644
765--- a/drivers/video/console/bitblit.c 748--- a/drivers/video/console/bitblit.c
766+++ b/drivers/video/console/bitblit.c 749+++ b/drivers/video/console/bitblit.c
767@@ -18,6 +18,7 @@ 750@@ -18,6 +18,7 @@
768 #include <linux/console.h> 751 #include <linux/console.h>
769 #include <asm/types.h> 752 #include <asm/types.h>
770 #include "fbcon.h" 753 #include "fbcon.h"
771+#include "../fbsplash.h" 754+#include "../fbsplash.h"
772 755
773 /* 756 /*
774 * Accelerated handlers. 757 * Accelerated handlers.
775@@ -84,6 +85,13 @@ static void bit_bmove(struct vc_data *vc 758@@ -55,6 +56,13 @@ static void bit_bmove(struct vc_data *vc
776 area.height = height * vc->vc_font.height; 759 area.height = height * vc->vc_font.height;
777 area.width = width * vc->vc_font.width; 760 area.width = width * vc->vc_font.width;
778 761
779+ if (fbsplash_active(info, vc)) { 762+ if (fbsplash_active(info, vc)) {
780+ area.sx += vc->vc_splash.tx; 763+ area.sx += vc->vc_splash.tx;
784+ } 767+ }
785+ 768+
786 info->fbops->fb_copyarea(info, &area); 769 info->fbops->fb_copyarea(info, &area);
787 } 770 }
788 771
789@@ -408,7 +416,11 @@ static void bit_cursor(struct vc_data *v 772@@ -380,11 +388,15 @@ static void bit_cursor(struct vc_data *v
790 cursor.image.depth = 1; 773 cursor.image.depth = 1;
791 cursor.rop = ROP_XOR; 774 cursor.rop = ROP_XOR;
792 775
776- if (info->fbops->fb_cursor)
793- info->fbops->fb_cursor(info, &cursor); 777- err = info->fbops->fb_cursor(info, &cursor);
794+ if (fbsplash_active(info, vc)) { 778+ if (fbsplash_active(info, vc)) {
795+ fbsplash_cursor(info, &cursor); 779+ fbsplash_cursor(info, &cursor);
796+ } else { 780+ } else {
781+ if (info->fbops->fb_cursor)
797+ info->fbops->fb_cursor(info, &cursor); 782+ err = info->fbops->fb_cursor(info, &cursor);
783
784- if (err)
785- soft_cursor(info, &cursor);
786+ if (err)
787+ soft_cursor(info, &cursor);
798+ } 788+ }
799 789
800 ops->cursor_reset = 0; 790 ops->cursor_reset = 0;
801 } 791 }
802diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c 792diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
793index e7802ff..eeddc61 100644
803--- a/drivers/video/console/fbcon.c 794--- a/drivers/video/console/fbcon.c
804+++ b/drivers/video/console/fbcon.c 795+++ b/drivers/video/console/fbcon.c
805@@ -93,6 +93,7 @@ 796@@ -93,6 +93,7 @@
806 #endif 797 #endif
807 798
808 #include "fbcon.h" 799 #include "fbcon.h"
809+#include "../fbsplash.h" 800+#include "../fbsplash.h"
810 801
811 #ifdef FBCONDEBUG 802 #ifdef FBCONDEBUG
812 # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args) 803 # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
813@@ -107,7 +108,7 @@ enum { 804@@ -109,7 +110,7 @@ enum {
814 };
815
816 struct display fb_display[MAX_NR_CONSOLES]; 805 struct display fb_display[MAX_NR_CONSOLES];
806 EXPORT_SYMBOL(fb_display);
807
817-static signed char con2fb_map[MAX_NR_CONSOLES]; 808-static signed char con2fb_map[MAX_NR_CONSOLES];
818+signed char con2fb_map[MAX_NR_CONSOLES]; 809+signed char con2fb_map[MAX_NR_CONSOLES];
819 static signed char con2fb_map_boot[MAX_NR_CONSOLES]; 810 static signed char con2fb_map_boot[MAX_NR_CONSOLES];
820 static int logo_height; 811 static int logo_height;
821 static int logo_lines; 812 static int logo_lines;
822@@ -211,7 +212,7 @@ static inline int fbcon_is_inactive(stru 813@@ -299,7 +300,7 @@ static inline int fbcon_is_inactive(stru
823 vc->vc_mode != KD_TEXT || ops->graphics); 814 vc->vc_mode != KD_TEXT || ops->graphics);
824 } 815 }
825 816
826-static inline int get_color(struct vc_data *vc, struct fb_info *info, 817-static inline int get_color(struct vc_data *vc, struct fb_info *info,
827+inline int get_color(struct vc_data *vc, struct fb_info *info, 818+inline int get_color(struct vc_data *vc, struct fb_info *info,
828 u16 c, int is_fg) 819 u16 c, int is_fg)
829 { 820 {
830 int depth = fb_get_color_depth(&info->var, &info->fix); 821 int depth = fb_get_color_depth(&info->var, &info->fix);
831@@ -305,6 +306,7 @@ static void fb_flashcursor(void *private 822@@ -405,6 +406,7 @@ static void fb_flashcursor(void *private
832 CM_ERASE : CM_DRAW; 823 CM_ERASE : CM_DRAW;
833 ops->cursor(vc, info, p, mode, softback_lines, get_color(vc, info, c, 1), 824 ops->cursor(vc, info, p, mode, softback_lines, get_color(vc, info, c, 1),
834 get_color(vc, info, c, 0)); 825 get_color(vc, info, c, 0));
835+ 826+
836 release_console_sem(); 827 release_console_sem();
837 } 828 }
838 829
839@@ -461,6 +463,8 @@ static int fbcon_takeover(int show_logo) 830@@ -569,6 +571,8 @@ static int fbcon_takeover(int show_logo)
840 info_idx = -1; 831 info_idx = -1;
841 } 832 }
842 833
843+ fbsplash_init(); 834+ fbsplash_init();
844+ 835+
845 return err; 836 return err;
846 } 837 }
847 838
848@@ -847,6 +851,12 @@ static const char *fbcon_startup(void) 839@@ -978,6 +982,12 @@ static const char *fbcon_startup(void)
849 840 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
850 cols = info->var.xres / vc->vc_font.width; 841 cols /= vc->vc_font.width;
851 rows = info->var.yres / vc->vc_font.height; 842 rows /= vc->vc_font.height;
852+ 843+
853+ if (fbsplash_active(info, vc)) { 844+ if (fbsplash_active(info, vc)) {
854+ cols = vc->vc_splash.twidth / vc->vc_font.width; 845+ cols = vc->vc_splash.twidth / vc->vc_font.width;
855+ rows = vc->vc_splash.theight / vc->vc_font.height; 846+ rows = vc->vc_splash.theight / vc->vc_font.height;
856+ } 847+ }
857+ 848+
858 vc_resize(vc, cols, rows); 849 vc_resize(vc, cols, rows);
859 850
860 DPRINTK("mode: %s\n", info->fix.id); 851 DPRINTK("mode: %s\n", info->fix.id);
861@@ -929,7 +939,7 @@ static void fbcon_init(struct vc_data *v 852@@ -1060,7 +1070,7 @@ static void fbcon_init(struct vc_data *v
862 cap = info->flags; 853 cap = info->flags;
863 854
864 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || 855 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
865- (info->fix.type == FB_TYPE_TEXT)) 856- (info->fix.type == FB_TYPE_TEXT))
866+ (info->fix.type == FB_TYPE_TEXT) || fbsplash_active(info, vc)) 857+ (info->fix.type == FB_TYPE_TEXT) || fbsplash_active(info, vc))
867 logo = 0; 858 logo = 0;
868 859
869 info->var.xoffset = info->var.yoffset = p->yscroll = 0; /* reset wrap/pan */ 860 if (var_to_display(p, &info->var, info))
870@@ -1077,6 +1087,11 @@ static void fbcon_clear(struct vc_data * 861@@ -1200,6 +1210,11 @@ static void fbcon_clear(struct vc_data *
871 if (!height || !width) 862 if (!height || !width)
872 return; 863 return;
873 864
874+ if (fbsplash_active(info, vc)) { 865+ if (fbsplash_active(info, vc)) {
875+ fbsplash_clear(vc, info, sy, sx, height, width); 866+ fbsplash_clear(vc, info, sy, sx, height, width);
877+ } 868+ }
878+ 869+
879 /* Split blits that cross physical y_wrap boundary */ 870 /* Split blits that cross physical y_wrap boundary */
880 871
881 y_break = p->vrows - p->yscroll; 872 y_break = p->vrows - p->yscroll;
882@@ -1096,10 +1111,15 @@ static void fbcon_putcs(struct vc_data * 873@@ -1219,10 +1234,15 @@ static void fbcon_putcs(struct vc_data *
883 struct display *p = &fb_display[vc->vc_num]; 874 struct display *p = &fb_display[vc->vc_num];
884 struct fbcon_ops *ops = info->fbcon_par; 875 struct fbcon_ops *ops = info->fbcon_par;
885 876
886- if (!fbcon_is_inactive(vc, info)) 877- if (!fbcon_is_inactive(vc, info))
887- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, 878- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
897+ get_color(vc, info, scr_readw(s), 0)); 888+ get_color(vc, info, scr_readw(s), 0));
898+ } 889+ }
899 } 890 }
900 891
901 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) 892 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
902@@ -1115,8 +1135,13 @@ static void fbcon_clear_margins(struct v 893@@ -1238,8 +1258,13 @@ static void fbcon_clear_margins(struct v
903 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; 894 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
904 struct fbcon_ops *ops = info->fbcon_par; 895 struct fbcon_ops *ops = info->fbcon_par;
905 896
906- if (!fbcon_is_inactive(vc, info)) 897- if (!fbcon_is_inactive(vc, info))
907- ops->clear_margins(vc, info, bottom_only); 898- ops->clear_margins(vc, info, bottom_only);
913+ } 904+ }
914+ } 905+ }
915 } 906 }
916 907
917 static void fbcon_cursor(struct vc_data *vc, int mode) 908 static void fbcon_cursor(struct vc_data *vc, int mode)
918@@ -1601,7 +1626,7 @@ static int fbcon_scroll(struct vc_data * 909@@ -1719,7 +1744,7 @@ static int fbcon_scroll(struct vc_data *
919 count = vc->vc_rows; 910 count = vc->vc_rows;
920 if (softback_top) 911 if (softback_top)
921 fbcon_softback_note(vc, t, count); 912 fbcon_softback_note(vc, t, count);
922- if (logo_shown >= 0) 913- if (logo_shown >= 0)
923+ if (logo_shown >= 0 || fbsplash_active(info, vc)) 914+ if (logo_shown >= 0 || fbsplash_active(info, vc))
924 goto redraw_up; 915 goto redraw_up;
925 switch (p->scrollmode) { 916 switch (p->scrollmode) {
926 case SCROLL_MOVE: 917 case SCROLL_MOVE:
927@@ -1689,6 +1714,8 @@ static int fbcon_scroll(struct vc_data * 918@@ -1807,6 +1832,8 @@ static int fbcon_scroll(struct vc_data *
928 count = vc->vc_rows; 919 count = vc->vc_rows;
929 if (logo_shown >= 0) 920 if (logo_shown >= 0)
930 goto redraw_down; 921 goto redraw_down;
931+ if (fbsplash_active(info, vc)) 922+ if (fbsplash_active(info, vc))
932+ goto redraw_down; 923+ goto redraw_down;
933 switch (p->scrollmode) { 924 switch (p->scrollmode) {
934 case SCROLL_MOVE: 925 case SCROLL_MOVE:
935 ops->bmove(vc, info, t, 0, t + count, 0, 926 ops->bmove(vc, info, t, 0, t + count, 0,
936@@ -1831,6 +1858,13 @@ static void fbcon_bmove_rec(struct vc_da 927@@ -1949,6 +1976,13 @@ static void fbcon_bmove_rec(struct vc_da
937 } 928 }
938 return; 929 return;
939 } 930 }
940+ 931+
941+ if (fbsplash_active(info, vc) && sy == dy && height == 1) { 932+ if (fbsplash_active(info, vc) && sy == dy && height == 1) {
945+ } 936+ }
946+ 937+
947 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, 938 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
948 height, width); 939 height, width);
949 } 940 }
950@@ -1885,7 +1919,8 @@ static int fbcon_resize(struct vc_data * 941@@ -2018,8 +2052,9 @@ static int fbcon_resize(struct vc_data *
951 var.yres = height * fh; 942 var.yres = virt_h * virt_fh;
952 x_diff = info->var.xres - var.xres; 943 x_diff = info->var.xres - var.xres;
953 y_diff = info->var.yres - var.yres; 944 y_diff = info->var.yres - var.yres;
954- if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) { 945- if (x_diff < 0 || x_diff > virt_fw ||
946- y_diff < 0 || y_diff > virt_fh) {
955+ 947+
956+ if ((x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) && !vc->vc_splash.state) { 948+ if ((x_diff < 0 || x_diff > virt_fw ||
949+ y_diff < 0 || y_diff > virt_fh) && !vc->vc_splash.state) {
957 struct fb_videomode *mode; 950 struct fb_videomode *mode;
958 951
959 DPRINTK("attempting resize %ix%i\n", var.xres, var.yres); 952 DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
960@@ -1931,7 +1966,26 @@ static int fbcon_switch(struct vc_data * 953@@ -2055,7 +2090,26 @@ static int fbcon_switch(struct vc_data *
961 int i, prev_console;
962 954
963 info = registered_fb[con2fb_map[vc->vc_num]]; 955 info = registered_fb[con2fb_map[vc->vc_num]];
956 ops = info->fbcon_par;
964- 957-
965+ prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon; 958+ prev_console = ops->currcon;
966+ if (prev_console != -1) 959+ if (prev_console != -1)
967+ old_info = registered_fb[con2fb_map[prev_console]]; 960+ old_info = registered_fb[con2fb_map[prev_console]];
968+ 961+
969+ if (fbsplash_active_vc(vc)) { 962+ if (fbsplash_active_vc(vc)) {
970+ struct vc_data *vc_curr = vc_cons[prev_console].d; 963+ struct vc_data *vc_curr = vc_cons[prev_console].d;
981+ 0, info->var.yres * info->fix.line_length); 974+ 0, info->var.yres * info->fix.line_length);
982+ } 975+ }
983+ } 976+ }
984+ 977+
985 if (softback_top) { 978 if (softback_top) {
986 int l = fbcon_softback_size / vc->vc_size_row;
987 if (softback_lines) 979 if (softback_lines)
980 fbcon_set_origin(vc);
988@@ -1957,9 +2011,6 @@ static int fbcon_switch(struct vc_data * 981@@ -2073,9 +2127,6 @@ static int fbcon_switch(struct vc_data *
989 logo_shown = FBCON_LOGO_CANSHOW; 982 logo_shown = FBCON_LOGO_CANSHOW;
990 } 983 }
991 984
992- prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon; 985- prev_console = ops->currcon;
993- if (prev_console != -1) 986- if (prev_console != -1)
994- old_info = registered_fb[con2fb_map[prev_console]]; 987- old_info = registered_fb[con2fb_map[prev_console]];
995 /* 988 /*
996 * FIXME: If we have multiple fbdev's loaded, we need to 989 * FIXME: If we have multiple fbdev's loaded, we need to
997 * update all info->currcon. Perhaps, we can place this 990 * update all info->currcon. Perhaps, we can place this
998@@ -1994,6 +2045,11 @@ static int fbcon_switch(struct vc_data * 991@@ -2113,6 +2164,11 @@ static int fbcon_switch(struct vc_data *
999 fbcon_add_cursor_timer(info); 992 fbcon_add_cursor_timer(info);
1000 } 993 }
1001 994
1002+ if (fbsplash_active_nores(info, vc) && !fbsplash_active(info, vc)) { 995+ if (fbsplash_active_nores(info, vc) && !fbsplash_active(info, vc)) {
1003+ if (fbsplash_call_helper("modechange", vc->vc_num)) 996+ if (fbsplash_call_helper("modechange", vc->vc_num))
1004+ fbsplash_disable(vc, 0); 997+ fbsplash_disable(vc, 0);
1005+ } 998+ }
1006+ 999+
1007 set_blitting_type(vc, info, p); 1000 set_blitting_type(vc, info, p);
1008 ((struct fbcon_ops *)info->fbcon_par)->cursor_reset = 1; 1001 ops->cursor_reset = 1;
1009 1002
1010@@ -2074,8 +2130,12 @@ static int fbcon_blank(struct vc_data *v 1003@@ -2200,8 +2256,12 @@ static int fbcon_blank(struct vc_data *v
1011 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); 1004 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
1012 ops->cursor_flash = (!blank); 1005 ops->cursor_flash = (!blank);
1013 1006
1014- if (fb_blank(info, blank)) 1007- if (fb_blank(info, blank))
1015- fbcon_generic_blank(vc, info, blank); 1008- fbcon_generic_blank(vc, info, blank);
1020+ fbcon_generic_blank(vc, info, blank); 1013+ fbcon_generic_blank(vc, info, blank);
1021+ } 1014+ }
1022 } 1015 }
1023 1016
1024 if (!blank) 1017 if (!blank)
1025@@ -2233,8 +2293,14 @@ static int fbcon_do_set_font(struct vc_d 1018@@ -2359,13 +2419,22 @@ static int fbcon_do_set_font(struct vc_d
1019 }
1026 1020
1027 if (resize) { 1021 if (resize) {
1028 /* reset wrap/pan */ 1022+ /* reset wrap/pan */
1029- info->var.xoffset = info->var.yoffset = p->yscroll = 0; 1023 int cols, rows;
1030- vc_resize(vc, info->var.xres / w, info->var.yres / h); 1024
1031+ u32 xres = info->var.xres, yres = info->var.yres; 1025 cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
1026 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
1027+
1032+ info->var.xoffset = info->var.yoffset = p->yscroll = 0; 1028+ info->var.xoffset = info->var.yoffset = p->yscroll = 0;
1033+ if (fbsplash_active(info, vc)) { 1029+ if (fbsplash_active(info, vc)) {
1034+ xres = vc->vc_splash.twidth; 1030+ cols = vc->vc_splash.twidth;
1035+ yres = vc->vc_splash.theight; 1031+ rows = vc->vc_splash.theight;
1036+ } 1032+ }
1037+ vc_resize(vc, xres / w, yres / h); 1033 cols /= w;
1038+ 1034 rows /= h;
1035+
1036 vc_resize(vc, cols, rows);
1037+
1039 if (CON_IS_VISIBLE(vc) && softback_buf) { 1038 if (CON_IS_VISIBLE(vc) && softback_buf)
1040 int l = fbcon_softback_size / vc->vc_size_row; 1039 fbcon_update_softback(vc);
1041 if (l > 5) 1040 } else if (CON_IS_VISIBLE(vc)
1042@@ -2361,7 +2427,7 @@ static int fbcon_set_palette(struct vc_d 1041@@ -2483,7 +2552,7 @@ static int fbcon_set_palette(struct vc_d
1043 int i, j, k, depth; 1042 int i, j, k, depth;
1044 u8 val; 1043 u8 val;
1045 1044
1046- if (fbcon_is_inactive(vc, info)) 1045- if (fbcon_is_inactive(vc, info))
1047+ if (fbcon_is_inactive(vc, info) || vc->vc_num != fg_console) 1046+ if (fbcon_is_inactive(vc, info) || vc->vc_num != fg_console)
1048 return -EINVAL; 1047 return -EINVAL;
1049 1048
1050 if (!CON_IS_VISIBLE(vc)) 1049 if (!CON_IS_VISIBLE(vc))
1051@@ -2387,7 +2453,49 @@ static int fbcon_set_palette(struct vc_d 1050@@ -2509,7 +2578,49 @@ static int fbcon_set_palette(struct vc_d
1052 } else 1051 } else
1053 fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap); 1052 fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
1054 1053
1055- return fb_set_cmap(&palette_cmap, info); 1054- return fb_set_cmap(&palette_cmap, info);
1056+ if (fbsplash_active(info, vc_cons[fg_console].d) && 1055+ if (fbsplash_active(info, vc_cons[fg_console].d) &&
1097+ 1096+
1098+out: return fb_set_cmap(&palette_cmap, info); 1097+out: return fb_set_cmap(&palette_cmap, info);
1099 } 1098 }
1100 1099
1101 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) 1100 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
1102@@ -2608,7 +2716,14 @@ static void fbcon_modechanged(struct fb_ 1101@@ -2735,7 +2846,14 @@ static void fbcon_modechanged(struct fb_
1103 var_to_display(p, &info->var, info); 1102 rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
1104 cols = info->var.xres / vc->vc_font.width; 1103 cols /= vc->vc_font.width;
1105 rows = info->var.yres / vc->vc_font.height; 1104 rows /= vc->vc_font.height;
1106- vc_resize(vc, cols, rows); 1105- vc_resize(vc, cols, rows);
1107+ 1106+
1108+ if (!fbsplash_active_nores(info, vc)) { 1107+ if (!fbsplash_active_nores(info, vc)) {
1109+ vc_resize(vc, cols, rows); 1108+ vc_resize(vc, cols, rows);
1110+ } else { 1109+ } else {
1111+ if (fbsplash_call_helper("modechange", vc->vc_num)) 1110+ if (fbsplash_call_helper("modechange", vc->vc_num))
1112+ fbsplash_disable(vc, 0); 1111+ fbsplash_disable(vc, 0);
1113+ } 1112+ }
1114+ 1113+
1115 updatescrollmode(p, info, vc); 1114 updatescrollmode(p, info, vc);
1116 scrollback_max = 0; 1115 scrollback_max = 0;
1117 scrollback_current = 0; 1116 scrollback_current = 0;
1118diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c 1117diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
1118index c32a2a5..3a227fa 100644
1119--- a/drivers/video/fbcmap.c 1119--- a/drivers/video/fbcmap.c
1120+++ b/drivers/video/fbcmap.c 1120+++ b/drivers/video/fbcmap.c
1121@@ -16,6 +16,7 @@ 1121@@ -16,6 +16,7 @@
1122 #include <linux/tty.h> 1122 #include <linux/tty.h>
1123 #include <linux/fb.h> 1123 #include <linux/fb.h>
1156 if (cmap->start < 0 || (!info->fbops->fb_setcolreg && 1156 if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
1157 !info->fbops->fb_setcmap)) 1157 !info->fbops->fb_setcmap))
1158 return -EINVAL; 1158 return -EINVAL;
1159diff --git a/drivers/video/fbsplash.c b/drivers/video/fbsplash.c 1159diff --git a/drivers/video/fbsplash.c b/drivers/video/fbsplash.c
1160new file mode 100644 1160new file mode 100644
1161index 0000000..a12d5b8
1161--- /dev/null 1162--- /dev/null
1162+++ b/drivers/video/fbsplash.c 1163+++ b/drivers/video/fbsplash.c
1163@@ -0,0 +1,406 @@ 1164@@ -0,0 +1,406 @@
1164+/* 1165+/*
1165+ * linux/drivers/video/fbsplash.c -- Framebuffer splash routines 1166+ * linux/drivers/video/fbsplash.c -- Framebuffer splash routines
1567+} 1568+}
1568+ 1569+
1569+EXPORT_SYMBOL(fbsplash_path); 1570+EXPORT_SYMBOL(fbsplash_path);
1570diff --git a/drivers/video/fbsplash.h b/drivers/video/fbsplash.h 1571diff --git a/drivers/video/fbsplash.h b/drivers/video/fbsplash.h
1571new file mode 100644 1572new file mode 100644
1573index 0000000..211fa23
1572--- /dev/null 1574--- /dev/null
1573+++ b/drivers/video/fbsplash.h 1575+++ b/drivers/video/fbsplash.h
1574@@ -0,0 +1,76 @@ 1576@@ -0,0 +1,76 @@
1575+/* 1577+/*
1576+ * linux/drivers/video/fbsplash.h -- Framebuffer splash headers 1578+ * linux/drivers/video/fbsplash.h -- Framebuffer splash headers
1648+#endif /* CONFIG_FB_SPLASH */ 1650+#endif /* CONFIG_FB_SPLASH */
1649+ 1651+
1650+#endif /* __FB_SPLASH_H */ 1652+#endif /* __FB_SPLASH_H */
1651diff --git a/include/linux/console_splash.h b/include/linux/console_splash.h 1653diff --git a/include/linux/console_splash.h b/include/linux/console_splash.h
1652new file mode 100644 1654new file mode 100644
1655index 0000000..c448dd2
1653--- /dev/null 1656--- /dev/null
1654+++ b/include/linux/console_splash.h 1657+++ b/include/linux/console_splash.h
1655@@ -0,0 +1,13 @@ 1658@@ -0,0 +1,13 @@
1656+#ifndef _LINUX_CONSOLE_SPLASH_H_ 1659+#ifndef _LINUX_CONSOLE_SPLASH_H_
1657+#define _LINUX_CONSOLE_SPLASH_H_ 1 1660+#define _LINUX_CONSOLE_SPLASH_H_ 1
1665+ char* theme; 1668+ char* theme;
1666+}; 1669+};
1667+ 1670+
1668+#endif 1671+#endif
1669diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h 1672diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
1673index f8e5587..3e7f476 100644
1670--- a/include/linux/console_struct.h 1674--- a/include/linux/console_struct.h
1671+++ b/include/linux/console_struct.h 1675+++ b/include/linux/console_struct.h
1672@@ -12,6 +12,7 @@ 1676@@ -14,6 +14,7 @@
1673 struct vt_struct; 1677 struct vt_struct;
1674 1678
1675 #define NPAR 16 1679 #define NPAR 16
1676+#include <linux/console_splash.h> 1680+#include <linux/console_splash.h>
1677 1681
1678 struct vc_data { 1682 struct vc_data {
1679 unsigned short vc_num; /* Console number */ 1683 unsigned short vc_num; /* Console number */
1680@@ -95,6 +96,8 @@ struct vc_data { 1684@@ -97,6 +98,8 @@ struct vc_data {
1681 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ 1685 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
1682 unsigned long vc_uni_pagedir; 1686 unsigned long vc_uni_pagedir;
1683 unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */ 1687 unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
1684+ 1688+
1685+ struct vc_splash vc_splash; 1689+ struct vc_splash vc_splash;
1686 /* additional information is in vt_kern.h */ 1690 /* additional information is in vt_kern.h */
1687 }; 1691 };
1688 1692
1689diff --git a/include/linux/fb.h b/include/linux/fb.h 1693diff --git a/include/linux/fb.h b/include/linux/fb.h
1694index 04a58f3..b8b8fab 100644
1690--- a/include/linux/fb.h 1695--- a/include/linux/fb.h
1691+++ b/include/linux/fb.h 1696+++ b/include/linux/fb.h
1692@@ -8,6 +8,13 @@ 1697@@ -8,6 +8,13 @@
1693 #define FB_MAJOR 29 1698 #define FB_MAJOR 29
1694 #define FB_MAX 32 /* sufficient for now */ 1699 #define FB_MAX 32 /* sufficient for now */
1718+#define FB_SPLASH_IO_ORIG_KERNEL 0 /* Kernel ioctl origin */ 1723+#define FB_SPLASH_IO_ORIG_KERNEL 0 /* Kernel ioctl origin */
1719+#define FB_SPLASH_IO_ORIG_USER 1 /* User ioctl origin */ 1724+#define FB_SPLASH_IO_ORIG_USER 1 /* User ioctl origin */
1720 1725
1721 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ 1726 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
1722 #define FB_TYPE_PLANES 1 /* Non interleaved planes */ 1727 #define FB_TYPE_PLANES 1 /* Non interleaved planes */
1723@@ -737,6 +752,9 @@ struct fb_info { 1728@@ -751,6 +766,9 @@ struct fb_info {
1724 #define FBINFO_STATE_SUSPENDED 1 1729 #define FBINFO_STATE_SUSPENDED 1
1725 u32 state; /* Hardware state i.e suspend */ 1730 u32 state; /* Hardware state i.e suspend */
1726 void *fbcon_par; /* fbcon use-only private area */ 1731 void *fbcon_par; /* fbcon use-only private area */
1727+ 1732+
1728+ struct fb_image splash; 1733+ struct fb_image splash;
1729+ 1734+
1730 /* From here on everything is device dependent */ 1735 /* From here on everything is device dependent */
1731 void *par; 1736 void *par;
1732 }; 1737 };
1733diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h 1738diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
1739index 64f203c..143e3ed 100644
1734--- a/include/linux/sysctl.h 1740--- a/include/linux/sysctl.h
1735+++ b/include/linux/sysctl.h 1741+++ b/include/linux/sysctl.h
1736@@ -146,6 +146,7 @@ enum 1742@@ -147,6 +147,7 @@ enum
1737 KERN_RANDOMIZE=68, /* int: randomize virtual address space */ 1743 KERN_RANDOMIZE=68, /* int: randomize virtual address space */
1738 KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */ 1744 KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */
1739 KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ 1745 KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
1740+ KERN_FBSPLASH=71, /* string: path to fbsplash helper */ 1746+ KERN_FBSPLASH=71, /* string: path to fbsplash helper */
1741 }; 1747 };
1742 1748
1743 1749
1744diff --git a/kernel/sysctl.c b/kernel/sysctl.c 1750diff --git a/kernel/sysctl.c b/kernel/sysctl.c
1751index 9990e10..47a2552 100644
1745--- a/kernel/sysctl.c 1752--- a/kernel/sysctl.c
1746+++ b/kernel/sysctl.c 1753+++ b/kernel/sysctl.c
1747@@ -86,6 +86,9 @@ extern char modprobe_path[]; 1754@@ -86,6 +86,9 @@ extern char modprobe_path[];
1748 #ifdef CONFIG_HOTPLUG 1755 #ifdef CONFIG_HOTPLUG
1749 extern char hotplug_path[]; 1756 extern char hotplug_path[];

Legend:
Removed from v.212  
changed lines
  Added in v.213

  ViewVC Help
Powered by ViewVC 1.1.20