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

Diff of /genpatches-2.6/trunk/2.6.14-pre/4500_fbsplash-0.9.2-r4.patch

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

Revision 179 Revision 180
231 obj-$(CONFIG_PARISC) += parisc/ 231 obj-$(CONFIG_PARISC) += parisc/
232+# char/ comes before serial/ etc so that the VT console is the boot-time 232+# char/ comes before serial/ etc so that the VT console is the boot-time
233+# default. 233+# default.
234+obj-y += char/ 234+obj-y += char/
235 obj-y += video/ 235 obj-y += video/
236 obj-$(CONFIG_ACPI_BOOT) += acpi/ 236 obj-$(CONFIG_ACPI) += acpi/
237 # PnP must come after ACPI since it will eventually need to check if acpi 237 # PnP must come after ACPI since it will eventually need to check if acpi
238 # was used and do nothing if so 238 # was used and do nothing if so
239 obj-$(CONFIG_PNP) += pnp/ 239 obj-$(CONFIG_PNP) += pnp/
240 240
241-# char/ comes before serial/ etc so that the VT console is the boot-time 241-# char/ comes before serial/ etc so that the VT console is the boot-time
242-# default. 242-# default.
243-obj-y += char/ 243-obj-y += char/
244- 244-
245 obj-$(CONFIG_CONNECTOR) += connector/
246
245 # i810fb and intelfb depend on char/agp/ 247 # i810fb and intelfb depend on char/agp/
246 obj-$(CONFIG_FB_I810) += video/i810/
247 obj-$(CONFIG_FB_INTEL) += video/intelfb/
248diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig 248diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
249--- a/drivers/video/Kconfig 249--- a/drivers/video/Kconfig
250+++ b/drivers/video/Kconfig 250+++ b/drivers/video/Kconfig
251@@ -787,7 +787,6 @@ config FB_MATROX 251@@ -791,7 +791,6 @@ config FB_MATROX
252 select FB_CFB_COPYAREA 252 select FB_CFB_COPYAREA
253 select FB_CFB_IMAGEBLIT 253 select FB_CFB_IMAGEBLIT
254 select FB_SOFT_CURSOR 254 select FB_SOFT_CURSOR
255- select FB_TILEBLITTING 255- select FB_TILEBLITTING
256 select FB_MACMODES if PPC_PMAC 256 select FB_MACMODES if PPC_PMAC
257 ---help--- 257 ---help---
258 Say Y here if you have a Matrox Millennium, Matrox Millennium II, 258 Say Y here if you have a Matrox Millennium, Matrox Millennium II,
259@@ -1517,5 +1516,15 @@ if FB && SYSFS 259@@ -1575,5 +1574,15 @@ if FB && SYSFS
260 source "drivers/video/backlight/Kconfig" 260 source "drivers/video/backlight/Kconfig"
261 endif 261 endif
262 262
263-endmenu 263-endmenu
264+config FB_SPLASH 264+config FB_SPLASH
281 obj-$(CONFIG_LOGO) += logo/ 281 obj-$(CONFIG_LOGO) += logo/
282 obj-$(CONFIG_SYSFS) += backlight/ 282 obj-$(CONFIG_SYSFS) += backlight/
283+obj-$(CONFIG_FB_SPLASH) += fbsplash.o cfbsplash.o 283+obj-$(CONFIG_FB_SPLASH) += fbsplash.o cfbsplash.o
284 284
285 obj-$(CONFIG_FB) += fb.o 285 obj-$(CONFIG_FB) += fb.o
286 fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o modedb.o 286 fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
287diff --git a/drivers/video/cfbsplash.c b/drivers/video/cfbsplash.c 287diff --git a/drivers/video/cfbsplash.c b/drivers/video/cfbsplash.c
288new file mode 100644 288new file mode 100644
289--- /dev/null 289--- /dev/null
290+++ b/drivers/video/cfbsplash.c 290+++ b/drivers/video/cfbsplash.c
291@@ -0,0 +1,472 @@ 291@@ -0,0 +1,472 @@
784+ } 784+ }
785+ 785+
786 info->fbops->fb_copyarea(info, &area); 786 info->fbops->fb_copyarea(info, &area);
787 } 787 }
788 788
789@@ -368,7 +376,11 @@ static void bit_cursor(struct vc_data *v 789@@ -408,7 +416,11 @@ static void bit_cursor(struct vc_data *v
790 cursor.image.depth = 1; 790 cursor.image.depth = 1;
791 cursor.rop = ROP_XOR; 791 cursor.rop = ROP_XOR;
792 792
793- info->fbops->fb_cursor(info, &cursor); 793- info->fbops->fb_cursor(info, &cursor);
794+ if (fbsplash_active(info, vc)) { 794+ if (fbsplash_active(info, vc)) {
817-static signed char con2fb_map[MAX_NR_CONSOLES]; 817-static signed char con2fb_map[MAX_NR_CONSOLES];
818+signed char con2fb_map[MAX_NR_CONSOLES]; 818+signed char con2fb_map[MAX_NR_CONSOLES];
819 static signed char con2fb_map_boot[MAX_NR_CONSOLES]; 819 static signed char con2fb_map_boot[MAX_NR_CONSOLES];
820 static int logo_height; 820 static int logo_height;
821 static int logo_lines; 821 static int logo_lines;
822@@ -212,7 +213,7 @@ static inline int fbcon_is_inactive(stru 822@@ -211,7 +212,7 @@ static inline int fbcon_is_inactive(stru
823 vc->vc_mode != KD_TEXT || ops->graphics); 823 vc->vc_mode != KD_TEXT || ops->graphics);
824 } 824 }
825 825
826-static inline int get_color(struct vc_data *vc, struct fb_info *info, 826-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, 827+inline int get_color(struct vc_data *vc, struct fb_info *info,
828 u16 c, int is_fg) 828 u16 c, int is_fg)
829 { 829 {
830 int depth = fb_get_color_depth(&info->var); 830 int depth = fb_get_color_depth(&info->var, &info->fix);
831@@ -285,6 +287,7 @@ static void fb_flashcursor(void *private 831@@ -305,6 +306,7 @@ static void fb_flashcursor(void *private
832 CM_ERASE : CM_DRAW; 832 CM_ERASE : CM_DRAW;
833 ops->cursor(vc, info, p, mode, softback_lines, get_color(vc, info, c, 1), 833 ops->cursor(vc, info, p, mode, softback_lines, get_color(vc, info, c, 1),
834 get_color(vc, info, c, 0)); 834 get_color(vc, info, c, 0));
835+ 835+
836 release_console_sem(); 836 release_console_sem();
837 } 837 }
838 838
839@@ -412,6 +415,8 @@ static int fbcon_takeover(int show_logo) 839@@ -461,6 +463,8 @@ static int fbcon_takeover(int show_logo)
840 info_idx = -1; 840 info_idx = -1;
841 } 841 }
842 842
843+ fbsplash_init(); 843+ fbsplash_init();
844+ 844+
845 return err; 845 return err;
846 } 846 }
847 847
848@@ -816,6 +821,12 @@ static const char *fbcon_startup(void) 848@@ -847,6 +851,12 @@ static const char *fbcon_startup(void)
849 849
850 cols = info->var.xres / vc->vc_font.width; 850 cols = info->var.xres / vc->vc_font.width;
851 rows = info->var.yres / vc->vc_font.height; 851 rows = info->var.yres / vc->vc_font.height;
852+ 852+
853+ if (fbsplash_active(info, vc)) { 853+ if (fbsplash_active(info, vc)) {
856+ } 856+ }
857+ 857+
858 vc_resize(vc, cols, rows); 858 vc_resize(vc, cols, rows);
859 859
860 DPRINTK("mode: %s\n", info->fix.id); 860 DPRINTK("mode: %s\n", info->fix.id);
861@@ -914,7 +925,7 @@ static void fbcon_init(struct vc_data *v 861@@ -929,7 +939,7 @@ static void fbcon_init(struct vc_data *v
862 cap = info->flags; 862 cap = info->flags;
863 863
864 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || 864 if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
865- (info->fix.type == FB_TYPE_TEXT)) 865- (info->fix.type == FB_TYPE_TEXT))
866+ (info->fix.type == FB_TYPE_TEXT) || fbsplash_active(info, vc)) 866+ (info->fix.type == FB_TYPE_TEXT) || fbsplash_active(info, vc))
867 logo = 0; 867 logo = 0;
868 868
869 info->var.xoffset = info->var.yoffset = p->yscroll = 0; /* reset wrap/pan */ 869 info->var.xoffset = info->var.yoffset = p->yscroll = 0; /* reset wrap/pan */
870@@ -1062,6 +1073,11 @@ static void fbcon_clear(struct vc_data * 870@@ -1077,6 +1087,11 @@ static void fbcon_clear(struct vc_data *
871 if (!height || !width) 871 if (!height || !width)
872 return; 872 return;
873 873
874+ if (fbsplash_active(info, vc)) { 874+ if (fbsplash_active(info, vc)) {
875+ fbsplash_clear(vc, info, sy, sx, height, width); 875+ fbsplash_clear(vc, info, sy, sx, height, width);
877+ } 877+ }
878+ 878+
879 /* Split blits that cross physical y_wrap boundary */ 879 /* Split blits that cross physical y_wrap boundary */
880 880
881 y_break = p->vrows - p->yscroll; 881 y_break = p->vrows - p->yscroll;
882@@ -1081,10 +1097,15 @@ static void fbcon_putcs(struct vc_data * 882@@ -1096,10 +1111,15 @@ static void fbcon_putcs(struct vc_data *
883 struct display *p = &fb_display[vc->vc_num]; 883 struct display *p = &fb_display[vc->vc_num];
884 struct fbcon_ops *ops = info->fbcon_par; 884 struct fbcon_ops *ops = info->fbcon_par;
885 885
886- if (!fbcon_is_inactive(vc, info)) 886- if (!fbcon_is_inactive(vc, info))
887- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos, 887- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
897+ get_color(vc, info, scr_readw(s), 0)); 897+ get_color(vc, info, scr_readw(s), 0));
898+ } 898+ }
899 } 899 }
900 900
901 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) 901 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
902@@ -1100,8 +1121,13 @@ static void fbcon_clear_margins(struct v 902@@ -1115,8 +1135,13 @@ static void fbcon_clear_margins(struct v
903 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; 903 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
904 struct fbcon_ops *ops = info->fbcon_par; 904 struct fbcon_ops *ops = info->fbcon_par;
905 905
906- if (!fbcon_is_inactive(vc, info)) 906- if (!fbcon_is_inactive(vc, info))
907- ops->clear_margins(vc, info, bottom_only); 907- ops->clear_margins(vc, info, bottom_only);
913+ } 913+ }
914+ } 914+ }
915 } 915 }
916 916
917 static void fbcon_cursor(struct vc_data *vc, int mode) 917 static void fbcon_cursor(struct vc_data *vc, int mode)
918@@ -1581,7 +1607,7 @@ static int fbcon_scroll(struct vc_data * 918@@ -1601,7 +1626,7 @@ static int fbcon_scroll(struct vc_data *
919 count = vc->vc_rows; 919 count = vc->vc_rows;
920 if (softback_top) 920 if (softback_top)
921 fbcon_softback_note(vc, t, count); 921 fbcon_softback_note(vc, t, count);
922- if (logo_shown >= 0) 922- if (logo_shown >= 0)
923+ if (logo_shown >= 0 || fbsplash_active(info, vc)) 923+ if (logo_shown >= 0 || fbsplash_active(info, vc))
924 goto redraw_up; 924 goto redraw_up;
925 switch (p->scrollmode) { 925 switch (p->scrollmode) {
926 case SCROLL_MOVE: 926 case SCROLL_MOVE:
927@@ -1667,6 +1693,8 @@ static int fbcon_scroll(struct vc_data * 927@@ -1689,6 +1714,8 @@ static int fbcon_scroll(struct vc_data *
928 case SM_DOWN:
929 if (count > vc->vc_rows) /* Maximum realistic size */
930 count = vc->vc_rows; 928 count = vc->vc_rows;
929 if (logo_shown >= 0)
930 goto redraw_down;
931+ if (fbsplash_active(info, vc)) 931+ if (fbsplash_active(info, vc))
932+ goto redraw_down; 932+ goto redraw_down;
933 switch (p->scrollmode) { 933 switch (p->scrollmode) {
934 case SCROLL_MOVE: 934 case SCROLL_MOVE:
935 ops->bmove(vc, info, t, 0, t + count, 0, 935 ops->bmove(vc, info, t, 0, t + count, 0,
936@@ -1809,6 +1837,13 @@ static void fbcon_bmove_rec(struct vc_da 936@@ -1831,6 +1858,13 @@ static void fbcon_bmove_rec(struct vc_da
937 } 937 }
938 return; 938 return;
939 } 939 }
940+ 940+
941+ if (fbsplash_active(info, vc) && sy == dy && height == 1) { 941+ if (fbsplash_active(info, vc) && sy == dy && height == 1) {
945+ } 945+ }
946+ 946+
947 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx, 947 ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
948 height, width); 948 height, width);
949 } 949 }
950@@ -1863,7 +1898,8 @@ static int fbcon_resize(struct vc_data * 950@@ -1885,7 +1919,8 @@ static int fbcon_resize(struct vc_data *
951 var.yres = height * fh; 951 var.yres = height * fh;
952 x_diff = info->var.xres - var.xres; 952 x_diff = info->var.xres - var.xres;
953 y_diff = info->var.yres - var.yres; 953 y_diff = info->var.yres - var.yres;
954- if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) { 954- if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) {
955+ 955+
956+ if ((x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) && !vc->vc_splash.state) { 956+ if ((x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) && !vc->vc_splash.state) {
957 struct fb_videomode *mode; 957 struct fb_videomode *mode;
958 958
959 DPRINTK("attempting resize %ix%i\n", var.xres, var.yres); 959 DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
960@@ -1909,7 +1945,17 @@ static int fbcon_switch(struct vc_data * 960@@ -1931,7 +1966,26 @@ static int fbcon_switch(struct vc_data *
961 int i, prev_console; 961 int i, prev_console;
962 962
963 info = registered_fb[con2fb_map[vc->vc_num]]; 963 info = registered_fb[con2fb_map[vc->vc_num]];
964-
964+ prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon; 965+ prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon;
966+ if (prev_console != -1)
967+ old_info = registered_fb[con2fb_map[prev_console]];
965+ 968+
966+ if (fbsplash_active_vc(vc)) { 969+ if (fbsplash_active_vc(vc)) {
967+ struct vc_data *vc_curr = vc_cons[prev_console].d; 970+ struct vc_data *vc_curr = vc_cons[prev_console].d;
968
969+ if (!vc_curr->vc_splash.theme || strcmp(vc->vc_splash.theme, vc_curr->vc_splash.theme)) { 971+ if (!vc_curr->vc_splash.theme || strcmp(vc->vc_splash.theme, vc_curr->vc_splash.theme)) {
970+ if (fbsplash_call_helper("getpic", vc->vc_num)) 972+ if (fbsplash_call_helper("getpic", vc->vc_num))
971+ fbsplash_disable(vc, 0); 973+ fbsplash_disable(vc, 0);
972+ } 974+ }
975+ } else if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
976+ struct vc_data *vc_curr = vc_cons[prev_console].d;
977+ if (vc_curr && fbsplash_active_vc(vc_curr)) {
978+ /* Clear the screen to avoid displaying funky colors during
979+ * palette updates. */
980+ memset((u8*)info->screen_base + info->fix.line_length * info->var.yoffset,
981+ 0, info->var.yres * info->fix.line_length);
982+ }
973+ } 983+ }
974+ 984+
975 if (softback_top) { 985 if (softback_top) {
976 int l = fbcon_softback_size / vc->vc_size_row; 986 int l = fbcon_softback_size / vc->vc_size_row;
977 if (softback_lines) 987 if (softback_lines)
978@@ -1935,8 +1981,6 @@ static int fbcon_switch(struct vc_data * 988@@ -1957,9 +2011,6 @@ static int fbcon_switch(struct vc_data *
979 logo_shown = FBCON_LOGO_CANSHOW; 989 logo_shown = FBCON_LOGO_CANSHOW;
980 } 990 }
981 991
982- prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon; 992- prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon;
983- 993- if (prev_console != -1)
994- old_info = registered_fb[con2fb_map[prev_console]];
984 /* 995 /*
985 * FIXME: If we have multiple fbdev's loaded, we need to 996 * FIXME: If we have multiple fbdev's loaded, we need to
986 * update all info->currcon. Perhaps, we can place this 997 * update all info->currcon. Perhaps, we can place this
987@@ -1969,6 +2013,11 @@ static int fbcon_switch(struct vc_data * 998@@ -1994,6 +2045,11 @@ static int fbcon_switch(struct vc_data *
988 info->fbops->fb_set_par) 999 fbcon_add_cursor_timer(info);
989 info->fbops->fb_set_par(info); 1000 }
990 1001
991+ if (fbsplash_active_nores(info, vc) && !fbsplash_active(info, vc)) { 1002+ if (fbsplash_active_nores(info, vc) && !fbsplash_active(info, vc)) {
992+ if (fbsplash_call_helper("modechange", vc->vc_num)) 1003+ if (fbsplash_call_helper("modechange", vc->vc_num))
993+ fbsplash_disable(vc, 0); 1004+ fbsplash_disable(vc, 0);
994+ } 1005+ }
995+ 1006+
996 set_blitting_type(vc, info, p); 1007 set_blitting_type(vc, info, p);
997 ((struct fbcon_ops *)info->fbcon_par)->cursor_reset = 1; 1008 ((struct fbcon_ops *)info->fbcon_par)->cursor_reset = 1;
998 1009
999@@ -2049,7 +2098,9 @@ static int fbcon_blank(struct vc_data *v 1010@@ -2074,7 +2130,9 @@ static int fbcon_blank(struct vc_data *v
1000 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); 1011 fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
1001 ops->cursor_flash = (!blank); 1012 ops->cursor_flash = (!blank);
1002 1013
1003- if (fb_blank(info, blank)) 1014- if (fb_blank(info, blank))
1004+ if (fbsplash_active(info, vc)) 1015+ if (fbsplash_active(info, vc))
1005+ fbsplash_blank(vc, info, blank); 1016+ fbsplash_blank(vc, info, blank);
1006+ else 1017+ else
1007 fbcon_generic_blank(vc, info, blank); 1018 fbcon_generic_blank(vc, info, blank);
1008 } 1019 }
1009 1020
1010@@ -2203,8 +2254,14 @@ static int fbcon_do_set_font(struct vc_d 1021@@ -2233,8 +2291,14 @@ static int fbcon_do_set_font(struct vc_d
1011 1022
1012 if (resize) { 1023 if (resize) {
1013 /* reset wrap/pan */ 1024 /* reset wrap/pan */
1014- info->var.xoffset = info->var.yoffset = p->yscroll = 0; 1025- info->var.xoffset = info->var.yoffset = p->yscroll = 0;
1015- vc_resize(vc, info->var.xres / w, info->var.yres / h); 1026- vc_resize(vc, info->var.xres / w, info->var.yres / h);
1022+ vc_resize(vc, xres / w, yres / h); 1033+ vc_resize(vc, xres / w, yres / h);
1023+ 1034+
1024 if (CON_IS_VISIBLE(vc) && softback_buf) { 1035 if (CON_IS_VISIBLE(vc) && softback_buf) {
1025 int l = fbcon_softback_size / vc->vc_size_row; 1036 int l = fbcon_softback_size / vc->vc_size_row;
1026 if (l > 5) 1037 if (l > 5)
1027@@ -2331,7 +2388,7 @@ static int fbcon_set_palette(struct vc_d 1038@@ -2361,7 +2425,7 @@ static int fbcon_set_palette(struct vc_d
1028 int i, j, k, depth; 1039 int i, j, k, depth;
1029 u8 val; 1040 u8 val;
1030 1041
1031- if (fbcon_is_inactive(vc, info)) 1042- if (fbcon_is_inactive(vc, info))
1032+ if (fbcon_is_inactive(vc, info) || vc->vc_num != fg_console) 1043+ if (fbcon_is_inactive(vc, info) || vc->vc_num != fg_console)
1033 return -EINVAL; 1044 return -EINVAL;
1034 1045
1035 if (!CON_IS_VISIBLE(vc)) 1046 if (!CON_IS_VISIBLE(vc))
1036@@ -2357,7 +2414,49 @@ static int fbcon_set_palette(struct vc_d 1047@@ -2387,7 +2451,49 @@ static int fbcon_set_palette(struct vc_d
1037 } else 1048 } else
1038 fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap); 1049 fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
1039 1050
1040- return fb_set_cmap(&palette_cmap, info); 1051- return fb_set_cmap(&palette_cmap, info);
1041+ if (fbsplash_active(info, vc_cons[fg_console].d) && 1052+ if (fbsplash_active(info, vc_cons[fg_console].d) &&
1082+ 1093+
1083+out: return fb_set_cmap(&palette_cmap, info); 1094+out: return fb_set_cmap(&palette_cmap, info);
1084 } 1095 }
1085 1096
1086 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset) 1097 static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
1087@@ -2578,7 +2677,14 @@ static void fbcon_modechanged(struct fb_ 1098@@ -2608,7 +2714,14 @@ static void fbcon_modechanged(struct fb_
1088 var_to_display(p, &info->var, info); 1099 var_to_display(p, &info->var, info);
1089 cols = info->var.xres / vc->vc_font.width; 1100 cols = info->var.xres / vc->vc_font.width;
1090 rows = info->var.yres / vc->vc_font.height; 1101 rows = info->var.yres / vc->vc_font.height;
1091- vc_resize(vc, cols, rows); 1102- vc_resize(vc, cols, rows);
1092+ 1103+
1109 #include <linux/slab.h> 1120 #include <linux/slab.h>
1110+#include "fbsplash.h" 1121+#include "fbsplash.h"
1111 1122
1112 #include <asm/uaccess.h> 1123 #include <asm/uaccess.h>
1113 1124
1125@@ -235,14 +236,17 @@ int fb_set_cmap(struct fb_cmap *cmap, st
1126 if (transp)
1127 htransp = *transp++;
1128 if (info->fbops->fb_setcolreg(start++,
1129- hred, hgreen, hblue,
1130+ hred, hgreen, hblue,
1131 htransp, info))
1132 break;
1133 }
1134 }
1135- if (rc == 0)
1136+ if (rc == 0) {
1137 fb_copy_cmap(cmap, &info->cmap);
1138-
1139+ if (fbsplash_active(info, vc_cons[fg_console].d) &&
1140+ info->fix.visual == FB_VISUAL_DIRECTCOLOR)
1141+ fbsplash_fix_pseudo_pal(info, vc_cons[fg_console].d);
1142+ }
1143 return rc;
1144 }
1145
1146@@ -250,7 +254,7 @@ int fb_set_user_cmap(struct fb_cmap_user
1147 {
1148 int rc, size = cmap->len * sizeof(u16);
1149 struct fb_cmap umap;
1150-
1151+
1152 if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
1153 !info->fbops->fb_setcmap))
1154 return -EINVAL;
1114diff --git a/drivers/video/fbsplash.c b/drivers/video/fbsplash.c 1155diff --git a/drivers/video/fbsplash.c b/drivers/video/fbsplash.c
1115new file mode 100644 1156new file mode 100644
1116--- /dev/null 1157--- /dev/null
1117+++ b/drivers/video/fbsplash.c 1158+++ b/drivers/video/fbsplash.c
1118@@ -0,0 +1,406 @@ 1159@@ -0,0 +1,406 @@
1673+#define FB_SPLASH_IO_ORIG_KERNEL 0 /* Kernel ioctl origin */ 1714+#define FB_SPLASH_IO_ORIG_KERNEL 0 /* Kernel ioctl origin */
1674+#define FB_SPLASH_IO_ORIG_USER 1 /* User ioctl origin */ 1715+#define FB_SPLASH_IO_ORIG_USER 1 /* User ioctl origin */
1675 1716
1676 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ 1717 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
1677 #define FB_TYPE_PLANES 1 /* Non interleaved planes */ 1718 #define FB_TYPE_PLANES 1 /* Non interleaved planes */
1678@@ -732,6 +747,9 @@ struct fb_info { 1719@@ -737,6 +752,9 @@ struct fb_info {
1679 #define FBINFO_STATE_SUSPENDED 1 1720 #define FBINFO_STATE_SUSPENDED 1
1680 u32 state; /* Hardware state i.e suspend */ 1721 u32 state; /* Hardware state i.e suspend */
1681 void *fbcon_par; /* fbcon use-only private area */ 1722 void *fbcon_par; /* fbcon use-only private area */
1682+ 1723+
1683+ struct fb_image splash; 1724+ struct fb_image splash;
1686 void *par; 1727 void *par;
1687 }; 1728 };
1688diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h 1729diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
1689--- a/include/linux/sysctl.h 1730--- a/include/linux/sysctl.h
1690+++ b/include/linux/sysctl.h 1731+++ b/include/linux/sysctl.h
1691@@ -137,6 +137,7 @@ enum 1732@@ -146,6 +146,7 @@ enum
1692 KERN_RANDOMIZE=68, /* int: randomize virtual address space */ 1733 KERN_RANDOMIZE=68, /* int: randomize virtual address space */
1693 KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */ 1734 KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */
1694 KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ 1735 KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
1695+ KERN_FBSPLASH=71, /* string: path to fbsplash helper */ 1736+ KERN_FBSPLASH=71, /* string: path to fbsplash helper */
1696 }; 1737 };
1697 1738
1698 1739
1699diff --git a/kernel/sysctl.c b/kernel/sysctl.c 1740diff --git a/kernel/sysctl.c b/kernel/sysctl.c
1700--- a/kernel/sysctl.c 1741--- a/kernel/sysctl.c
1701+++ b/kernel/sysctl.c 1742+++ b/kernel/sysctl.c
1702@@ -85,6 +85,9 @@ extern char modprobe_path[]; 1743@@ -86,6 +86,9 @@ extern char modprobe_path[];
1703 #ifdef CONFIG_HOTPLUG 1744 #ifdef CONFIG_HOTPLUG
1704 extern char hotplug_path[]; 1745 extern char hotplug_path[];
1705 #endif 1746 #endif
1706+#ifdef CONFIG_FB_SPLASH 1747+#ifdef CONFIG_FB_SPLASH
1707+extern char fbsplash_path[]; 1748+extern char fbsplash_path[];
1708+#endif 1749+#endif
1709 #ifdef CONFIG_CHR_DEV_SG 1750 #ifdef CONFIG_CHR_DEV_SG
1710 extern int sg_big_buff; 1751 extern int sg_big_buff;
1711 #endif 1752 #endif
1712@@ -401,6 +404,17 @@ static ctl_table kern_table[] = { 1753@@ -404,6 +407,17 @@ static ctl_table kern_table[] = {
1713 .strategy = &sysctl_string, 1754 .strategy = &sysctl_string,
1714 }, 1755 },
1715 #endif 1756 #endif
1716+#ifdef CONFIG_FB_SPLASH 1757+#ifdef CONFIG_FB_SPLASH
1717+ { 1758+ {

Legend:
Removed from v.179  
changed lines
  Added in v.180

  ViewVC Help
Powered by ViewVC 1.1.20