Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2011-08-18 11:38:15 +0200
committerEgbert Eich <eich@suse.de>2011-08-18 11:38:15 +0200
commitf25ce3ee68e7642e2394493bc6385e018dee1030 (patch)
tree1d1b633c1331c20fba40316a762aaae6a65315eb
parent934d81a098b3dc1c892e6f993957d5d2e8a39afe (diff)
* Refresh patches.suse/SUSE-bootsplash.rpm-3.0.0-4
* Fix bootsplash code for 15bpp framebuffers. These framebuffers are rare these days, the legendary and still popular server chipset Radeon ES1000 supports it, though.
-rw-r--r--patches.suse/SUSE-bootsplash470
1 files changed, 318 insertions, 152 deletions
diff --git a/patches.suse/SUSE-bootsplash b/patches.suse/SUSE-bootsplash
index 98a651b8cd..7d92e5e100 100644
--- a/patches.suse/SUSE-bootsplash
+++ b/patches.suse/SUSE-bootsplash
@@ -13,6 +13,10 @@ References: bnc#669777, bnc#570082, bnc#595657, bnc#594209, bnc#544645
* Fix race where the struct fb_info may be missing when
proc_read() is called: bnc#669777.
+ * Fix bootsplash code for 15bpp framebuffers.
+ These framebuffers are rare these days, the legendary and still
+ popular server chipset Radeon ES1000 supports it, though.
+
Signed-off-by: Egbert Eich <eich@suse.de>
---
drivers/tty/n_tty.c | 11
@@ -41,8 +45,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
create mode 100644 drivers/video/bootsplash/render.c
create mode 100644 include/linux/bootsplash.h
---- a/drivers/tty/n_tty.c
-+++ b/drivers/tty/n_tty.c
+Index: linux-3.0-master/drivers/tty/n_tty.c
+===================================================================
+--- linux-3.0-master.orig/drivers/tty/n_tty.c
++++ linux-3.0-master/drivers/tty/n_tty.c
@@ -50,6 +50,8 @@
#include <linux/uaccess.h>
#include <linux/module.h>
@@ -52,7 +58,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
#include <asm/system.h>
/* number of characters left in xmit buffer before select has we have room */
-@@ -1796,6 +1798,15 @@
+@@ -1796,6 +1798,15 @@ do_it_again:
tty->minimum_to_wake = (minimum - (b - buf));
if (!input_available_p(tty, 0)) {
@@ -68,8 +74,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
retval = -EIO;
break;
---- a/drivers/tty/vt/keyboard.c
-+++ b/drivers/tty/vt/keyboard.c
+Index: linux-3.0-master/drivers/tty/vt/keyboard.c
+===================================================================
+--- linux-3.0-master.orig/drivers/tty/vt/keyboard.c
++++ linux-3.0-master/drivers/tty/vt/keyboard.c
@@ -43,6 +43,8 @@
#include <linux/notifier.h>
#include <linux/jiffies.h>
@@ -79,7 +87,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
extern void ctrl_alt_del(void);
/*
-@@ -1201,6 +1203,13 @@
+@@ -1201,6 +1203,13 @@ static void kbd_keycode(unsigned int key
pr_warning("can't emulate rawmode for keycode %d\n",
keycode);
@@ -93,9 +101,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
#ifdef CONFIG_SPARC
if (keycode == KEY_A && sparc_l1_a_state) {
sparc_l1_a_state = false;
---- a/drivers/tty/vt/vt.c
-+++ b/drivers/tty/vt/vt.c
-@@ -4204,6 +4204,35 @@
+Index: linux-3.0-master/drivers/tty/vt/vt.c
+===================================================================
+--- linux-3.0-master.orig/drivers/tty/vt/vt.c
++++ linux-3.0-master/drivers/tty/vt/vt.c
+@@ -4204,6 +4204,35 @@ void vcs_scr_updated(struct vc_data *vc)
notify_update(vc);
}
@@ -131,9 +141,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
/*
* Visible symbols for modules
*/
---- a/drivers/video/Kconfig
-+++ b/drivers/video/Kconfig
-@@ -2397,4 +2397,8 @@
+Index: linux-3.0-master/drivers/video/Kconfig
+===================================================================
+--- linux-3.0-master.orig/drivers/video/Kconfig
++++ linux-3.0-master/drivers/video/Kconfig
+@@ -2397,4 +2397,8 @@ if FB || SGI_NEWPORT_CONSOLE
source "drivers/video/logo/Kconfig"
endif
@@ -142,9 +154,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+endif
+
endmenu
---- a/drivers/video/Makefile
-+++ b/drivers/video/Makefile
-@@ -14,6 +14,7 @@
+Index: linux-3.0-master/drivers/video/Makefile
+===================================================================
+--- linux-3.0-master.orig/drivers/video/Makefile
++++ linux-3.0-master/drivers/video/Makefile
+@@ -14,6 +14,7 @@ fb-objs := $(f
obj-$(CONFIG_VT) += console/
obj-$(CONFIG_LOGO) += logo/
obj-y += backlight/ display/
@@ -152,8 +166,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o
+Index: linux-3.0-master/drivers/video/bootsplash/Kconfig
+===================================================================
--- /dev/null
-+++ b/drivers/video/bootsplash/Kconfig
++++ linux-3.0-master/drivers/video/bootsplash/Kconfig
@@ -0,0 +1,17 @@
+#
+# Bootsplash configuration
@@ -172,17 +188,21 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ If you are unsure, say N
+endmenu
+
+Index: linux-3.0-master/drivers/video/bootsplash/Makefile
+===================================================================
--- /dev/null
-+++ b/drivers/video/bootsplash/Makefile
++++ linux-3.0-master/drivers/video/bootsplash/Makefile
@@ -0,0 +1,5 @@
+# Makefile for the Linux bootsplash
+
+obj-$(CONFIG_BOOTSPLASH) += bootsplash.o
+obj-$(CONFIG_BOOTSPLASH) += decode-jpg.o
+obj-$(CONFIG_BOOTSPLASH) += render.o
+Index: linux-3.0-master/drivers/video/bootsplash/bootsplash.c
+===================================================================
--- /dev/null
-+++ b/drivers/video/bootsplash/bootsplash.c
-@@ -0,0 +1,2416 @@
++++ linux-3.0-master/drivers/video/bootsplash/bootsplash.c
+@@ -0,0 +1,2486 @@
+/*
+ * linux/drivers/video/bootsplash/bootsplash.c -
+ * splash screen handling functions.
@@ -251,7 +271,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+static unsigned long splash_default = 0xf01;
+
+static int jpeg_get(unsigned char *buf, unsigned char *pic,
-+ int width, int height, int depth,
++ int width, int height, enum splash_color_format cf,
+ struct jpeg_decdata *decdata);
+static int splash_look_for_jpeg(struct vc_data *vc, int width, int height);
+
@@ -270,7 +290,9 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ if (!strncmp("verbose", options, 7)) {
+ printk(KERN_INFO "bootsplash: verbose mode.\n");
+ splash_usesilent = 0;
-+ return 0;
++ if (strlen(options) == 7)
++ return 0;
++ options += 8;
+ }
+ if (strict_strtoul(options, 0, &splash_default) == -EINVAL)
+ splash_default = 0;
@@ -315,7 +337,8 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num,
-+ int percent, int xoff, int yoff, int overpaint, int octpp)
++ int percent, int xoff, int yoff, int overpaint,
++ enum splash_color_format cf)
+{
+ int x, y, p, doblend, r, g, b, a, add;
+ unsigned int i = 0;
@@ -327,6 +350,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ union pt picp;
+ unsigned int stipple[32], sti, stin, stinn, stixs, stixe, stiys, stiye;
+ int xs, xe, ys, ye, xo, yo;
++ int octpp = splash_octpp(cf);
+
+ SPLASH_DEBUG();
+ if (num == 0 || percent < -1)
@@ -494,8 +518,23 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ b = cols2[2];
+#define CLAMP(x) ((x) >= 256 ? 255 : (x))
+#define BLEND(x, v, a) ((x * (255 - a) + v * a) / 255)
-+ switch (octpp) {
-+ case 2:
++ switch (cf) {
++ case SPLASH_DEPTH_15:
++ if (a != 255) {
++ i = *picp.us;
++ r = BLEND((i>>7 & 0xf8), r, a);
++ g = BLEND((i>>2 & 0xf8), g, a);
++ b = BLEND((i<<3 & 0xf8), b, a);
++ }
++ r += add * 2 + 1;
++ g += add;
++ b += add * 2 + 1;
++ i = ((CLAMP(r) & 0xf8) << 7) |
++ ((CLAMP(g) & 0xf8) << 2) |
++ ((CLAMP(b)) >> 3);
++ *(picp.us++) = i;
++ break;
++ case SPLASH_DEPTH_16:
+ if (a != 255) {
+ i = *picp.us;
+ r = BLEND((i>>8 & 0xf8), r, a);
@@ -505,12 +544,12 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ r += add * 2 + 1;
+ g += add;
+ b += add * 2 + 1;
-+ i = ((CLAMP(r) & 0xf8) << 8) |
-+ ((CLAMP(g) & 0xfc) << 3) |
-+ ((CLAMP(b)) >> 3);
++ i = ((CLAMP(r) & 0xf8) << 8) |
++ ((CLAMP(g) & 0xfc) << 3) |
++ ((CLAMP(b)) >> 3);
+ *(picp.us++) = i;
+ break;
-+ case 3:
++ case SPLASH_DEPTH_24_PACKED:
+ if (a != 255) {
+ i = *picp.ub;
+ r = BLEND((i & 0xff), r, a);
@@ -522,9 +561,8 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ *(picp.ub++) = CLAMP(r);
+ *(picp.ub++) = CLAMP(g);
+ *(picp.ub++) = CLAMP(b);
-+ picp.ub += 3;
+ break;
-+ case 4:
++ case SPLASH_DEPTH_24:
+ if (a != 255) {
+ i = *picp.ul;
+ r = BLEND((i>>16 & 0xff), r, a);
@@ -536,6 +574,8 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ | (CLAMP(b)));
+ *(picp.ul++) = i;
+ break;
++ default:
++ break;
+ }
+ add ^= 3;
+ }
@@ -692,15 +732,14 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+static int splash_check_jpeg(unsigned char *jpeg,
-+ int width, int height, int depth)
++ int width, int height)
+{
+ int size, err;
+ unsigned char *mem;
+ struct jpeg_decdata *decdata; /* private decoder data */
+
+
-+ size = ((width + 15) & ~15) * ((height + 15) & ~15)
-+ * ((depth + 1) >> 3);
++ size = ((width + 15) & ~15) * ((height + 15) & ~15) * 2;
+ mem = vmalloc(size);
+ if (!mem) {
+ printk(KERN_INFO "bootsplash: no memory for decoded picture.\n");
@@ -712,8 +751,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ vfree(mem);
+ return -1;
+ }
++ /* test decode: use fixed depth of 16 */
+ err = jpeg_decode(jpeg, mem,
-+ ((width + 15) & ~15), ((height + 15) & ~15), depth,
++ ((width + 15) & ~15), ((height + 15) & ~15),
++ SPLASH_DEPTH_16,
+ decdata);
+ if (err)
+ printk(KERN_INFO "bootsplash: "
@@ -1115,8 +1156,8 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ jpeg_get_size(ndata + len + boxcnt * 12 + palcnt,
+ &imgd->splash_width, &imgd->splash_height);
+ if (splash_check_jpeg(ndata + len + boxcnt * 12 + palcnt,
-+ imgd->splash_width, imgd->splash_height,
-+ info ? info->var.bits_per_pixel : 16)) {
++ imgd->splash_width,
++ imgd->splash_height)) {
+ ndata += len + splash_size - 1;
+ vfree(imgd);
+ vfree(sd);
@@ -1146,7 +1187,6 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ imgd->splash_text_he *= 16;
+ imgd->splash_color = (splash_default >> 8) & 0x0f;
+ imgd->splash_fg_color = (splash_default >> 4) & 0x0f;
-+ sd->splash_state = splash_default & 1; /*@!@*/
+ }
+
+ /* fake penguin box for older formats */
@@ -1414,7 +1454,8 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+int splash_prepare(struct vc_data *vc, struct fb_info *info)
+{
+ int err;
-+ int width, height, depth, octpp, size, sbytes;
++ int width, height, octpp, size, sbytes;
++ enum splash_color_format cf = SPLASH_DEPTH_UNKNOWN;
+ int pic_update = 0;
+ struct jpeg_decdata *decdata; /* private decoder data */
+
@@ -1436,13 +1477,30 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+
+ width = info->var.xres;
+ height = info->var.yres;
-+ depth = info->var.bits_per_pixel;
-+ octpp = (depth + 1) >> 3;
-+
-+ if (depth == 24 || depth < 15) { /* Other targets might need fixing */
++ switch (info->var.bits_per_pixel) {
++ case 16:
++ if ((info->var.red.length +
++ info->var.green.length +
++ info->var.blue.length) == 15)
++ cf = SPLASH_DEPTH_15;
++ else
++ cf = SPLASH_DEPTH_16;
++ break;
++ case 24:
++ cf = SPLASH_DEPTH_24_PACKED;
++ break;
++ case 32:
++ cf = SPLASH_DEPTH_24;
++ break;
++ }
++ if (cf == SPLASH_DEPTH_UNKNOWN) {
++ printk(KERN_INFO "bootsplash: unsupported pixel format: %i\n",
++ info->var.bits_per_pixel);
+ splash_off(vc, info);
+ return -2;
+ }
++ octpp = splash_octpp(cf);
++
+ if (splash_look_for_jpeg(vc, width, height) < 0) {
+ printk(KERN_INFO "bootsplash: no matching splash %dx%d\n",
+ width, height);
@@ -1488,7 +1546,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ pic_update = 1;
+ err = jpeg_get(vc->vc_splash_data->imgd->splash_silentjpeg,
+ vc->vc_splash_data->pic->splash_pic,
-+ width, height, depth, decdata);
++ width, height, cf, decdata);
+ if (err) {
+ printk(KERN_INFO "bootsplash: "
+ "error while decompressing silent picture: "
@@ -1506,7 +1564,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ vc->vc_splash_data->splash_sboxes_yoff,
+ vc->vc_splash_data->splash_percent < 0 ?
+ 1 : 0,
-+ octpp);
++ cf);
+ splashcopy(info->screen_base,
+ vc->vc_splash_data->pic->splash_pic,
+ info->var.yres,
@@ -1520,7 +1578,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ if (pic_update) {
+ err = jpeg_get(vc->vc_splash_data->imgd->splash_jpeg,
+ vc->vc_splash_data->pic->splash_pic,
-+ width, height, depth, decdata);
++ width, height, cf, decdata);
+ if (err) {
+ printk(KERN_INFO "bootsplash: "
+ "error while decompressing picture: %s (%d) .\n",
@@ -1544,7 +1602,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ vc->vc_splash_data->splash_boxes_xoff,
+ vc->vc_splash_data->splash_boxes_yoff,
+ 0,
-+ octpp);
++ cf);
+ if (vc->vc_splash_data->splash_state) {
+ int cols = vc->vc_splash_data->splash_vc_text_wi
+ / vc->vc_font.width;
@@ -1559,6 +1617,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ if (!vc->vc_splash_data->color_set)
+ splash_recolor(vc, NULL);
+ } else {
++ SPLASH_DEBUG("Splash Status is off\n");
+ splash_off(vc, info);
+ return -5;
+ }
@@ -1750,9 +1809,26 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ } else
+ splash_prepare(vc, info);
+ } else {
-+ int octpp = (info->var.bits_per_pixel + 1) >> 3;
+ struct splash_data *splash_data = info->splash_data;
-+
++ enum splash_color_format cf = SPLASH_DEPTH_UNKNOWN;
++ switch (info->var.bits_per_pixel) {
++ case 16:
++ if ((info->var.red.length +
++ info->var.green.length +
++ info->var.blue.length) == 15)
++ cf = SPLASH_DEPTH_15;
++ else
++ cf = SPLASH_DEPTH_16;
++ break;
++ case 24:
++ cf = SPLASH_DEPTH_24_PACKED;
++ break;
++ case 32:
++ cf = SPLASH_DEPTH_24;
++ break;
++ }
++ if (cf == SPLASH_DEPTH_UNKNOWN)
++ return;
+ if (splash_data) {
+ if (splash_data->imgd->splash_silentjpeg
+ && splash_data->splash_dosilent)
@@ -1764,19 +1840,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ splash_data->splash_sboxes_xoff,
+ splash_data->splash_sboxes_yoff,
+ 1,
-+ octpp);
-+#if 0
-+ if (!info->splash_dosilent)
-+ boxit(info->screen_base,
-+ info->fix.line_length,
-+ splash_data->imgd->splash_boxes,
-+ splash_data->imgd->splash_boxcount,
-+ splash_data->splash_percent,
-+ splash_data->splash_boxes_xoff,
-+ splash_data->splash_boxes_yoff,
-+ 1,
-+ octpp);
-+#endif
++ cf);
+ }
+ }
+}
@@ -1937,7 +2001,26 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ struct splash_data *splash_data
+ = info->splash_data;
+ struct fbcon_ops *ops = info->fbcon_par;
-+ int octpp = (info->var.bits_per_pixel + 1) >> 3;
++ enum splash_color_format cf = SPLASH_DEPTH_UNKNOWN;
++
++ switch (info->var.bits_per_pixel) {
++ case 16:
++ if ((info->var.red.length +
++ info->var.green.length +
++ info->var.blue.length) == 15)
++ cf = SPLASH_DEPTH_15;
++ else
++ cf = SPLASH_DEPTH_16;
++ break;
++ case 24:
++ cf = SPLASH_DEPTH_24_PACKED;
++ break;
++ case 32:
++ cf = SPLASH_DEPTH_24;
++ break;
++ }
++ if (cf == SPLASH_DEPTH_UNKNOWN)
++ up = 0;
+ if (ops->blank_state ||
+ !vc_splash_data ||
+ !splash_data)
@@ -1953,7 +2036,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ splash_data->splash_sboxes_xoff,
+ splash_data->splash_sboxes_yoff,
+ 1,
-+ octpp);
++ cf);
+ } else if ((up & 1) != 0) {
+ boxit(info->screen_base,
+ info->fix.line_length,
@@ -1963,7 +2046,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ splash_data->splash_boxes_xoff,
+ splash_data->splash_boxes_yoff,
+ 1,
-+ octpp);
++ cf);
+ }
+ }
+ }
@@ -2032,8 +2115,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ info = registered_fb[(int)con2fb_map[INIT_CONSOLE]];
+ if (!vc
+ || !info
-+ || info->var.bits_per_pixel == 24 /* not tested */
-+ || info->var.bits_per_pixel < 15) /* not supported */
++ || info->var.bits_per_pixel < 16) /* not supported */
+ return;
+#ifdef CONFIG_PROC_FS
+ splash_proc_register();
@@ -2182,59 +2264,63 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ u32 blue;
+};
+
-+#define put_pixel(pix, buf, depth) \
-+ switch (depth) { \
-+ case 15: \
++#define put_pixel(pix, buf, cf) \
++ switch (cf) { \
++ case SPLASH_DEPTH_15: \
+ *(u16 *)(buf) = (u16)((pix).red << 10 | \
+ (pix).green << 5 | (pix).blue); \
+ (buf) += 2; \
+ break; \
-+ case 16: \
++ case SPLASH_DEPTH_16: \
+ *(u16 *)(buf) = (u16)((pix).red << 11 | \
+ (pix).green << 5 | (pix).blue); \
+ (buf) += 2; \
+ break; \
-+ case 24: \
++ case SPLASH_DEPTH_24_PACKED: \
+ *(u16 *)(buf) = (u16)((pix).red << 8 | (pix).green); \
+ buf += 2; \
+ *((buf)++) = (pix).blue; \
+ break; \
-+ case 32: \
++ case SPLASH_DEPTH_24: \
+ *(u32 *)(buf) = (u32)((pix).red << 16 | \
+ (pix).green << 8 | (pix).blue); \
+ (buf) += 4; \
+ break; \
++ case SPLASH_DEPTH_UNKNOWN: \
++ break; \
+ }
+
+#define get_pixel(pix, buf, depth) \
+ switch (depth) { \
-+ case 15: \
++ case SPLASH_DEPTH_15: \
+ (pix).red = ((*(u16 *)(buf)) >> 10) & 0x1f; \
+ (pix).green = ((*(u16 *)(buf)) >> 5) & 0x1f; \
+ (pix).blue = (*(u16 *)(buf)) & 0x1f; \
+ (buf) += 2; \
+ break; \
-+ case 16: \
++ case SPLASH_DEPTH_16: \
+ (pix).red = ((*(u16 *)(buf)) >> 11) & 0x1f; \
+ (pix).green = ((*(u16 *)(buf)) >> 5) & 0x3f; \
+ (pix).blue = (*(u16 *)(buf)) & 0x1f; \
+ (buf) += 2; \
+ break; \
-+ case 24: \
++ case SPLASH_DEPTH_24_PACKED: \
+ (pix).blue = *(((buf))++); \
+ (pix).green = *(((buf))++); \
+ (pix).red = *(((buf))++); \
+ break; \
-+ case 32: \
++ case SPLASH_DEPTH_24: \
+ (pix).blue = *(((buf))++); \
+ (pix).green = *(((buf))++); \
+ (pix).red = *(((buf))++); \
+ (buf)++; \
+ break; \
++ case SPLASH_DEPTH_UNKNOWN: \
++ break; \
+ }
+
+static inline void
-+scale_x_down(int depth, int src_w,
++scale_x_down(enum splash_color_format cf, int src_w,
+ unsigned char **src_p, u32 *x_coeff,
+ u32 x_shift, u32 y_coeff, struct pixel *row_buffer)
+{
@@ -2249,7 +2335,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+
+ for (i = 0; i < src_w; ) {
+ curr_x_coeff = 1;
-+ get_pixel(tmp_pixel, *src_p, depth);
++ get_pixel(tmp_pixel, *src_p, cf);
+ i++;
+ for (l = 0; l < x_array_size; l++) {
+ x_column_num = x_coeff[curr_x_coeff++];
@@ -2264,7 +2350,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ curr_pixel.blue += tmp_pixel.blue
+ * x_coeff[curr_x_coeff];
+ curr_x_coeff++;
-+ get_pixel(tmp_pixel, *src_p, depth);
++ get_pixel(tmp_pixel, *src_p, cf);
+ i++;
+ }
+ curr_pixel.red += tmp_pixel.red * x_coeff[curr_x_coeff];
@@ -2285,7 +2371,8 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+static inline void
-+scale_x_up(int depth, int src_w, unsigned char **src_p, u32 *x_coeff,
++scale_x_up(enum splash_color_format cf, int src_w,
++ unsigned char **src_p, u32 *x_coeff,
+ u32 x_shift, u32 y_coeff, struct pixel *row_buffer)
+{
+ u32 curr_x_coeff = 1;
@@ -2299,7 +2386,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+
+ for (i = 0; i < src_w;) {
+ curr_x_coeff = 1;
-+ get_pixel(tmp_pixel, *src_p, depth);
++ get_pixel(tmp_pixel, *src_p, cf);
+ i++;
+ for (l = 0; l < x_array_size - 1; l++) {
+ x_column_num = x_coeff[curr_x_coeff++];
@@ -2314,7 +2401,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ * x_coeff[curr_x_coeff];
+ curr_pixel.blue = tmp_pixel.blue * x_coeff[curr_x_coeff];
+ curr_x_coeff++;
-+ get_pixel(tmp_pixel, *src_p, depth);
++ get_pixel(tmp_pixel, *src_p, cf);
+ i++;
+ row_buffer[k].red += ((curr_pixel.red
+ + (tmp_pixel.red
@@ -2341,9 +2428,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+static int scale_y_down(unsigned char *src, unsigned char *dst,
-+ int depth, int src_w, int src_h, int dst_w, int dst_h)
++ enum splash_color_format cf,
++ int src_w, int src_h, int dst_w, int dst_h)
+{
-+ int octpp = (depth + 1) >> 3;
++ int octpp = splash_octpp(cf);
+ int src_x_bytes = octpp * ((src_w + SPLASH_ALIGN) & ~SPLASH_ALIGN);
+ int dst_x_bytes = octpp * ((dst_w + SPLASH_ALIGN) & ~SPLASH_ALIGN);
+ int j;
@@ -2389,11 +2477,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ }
+ src_p = src_p_line;
+ if (xup)
-+ scale_x_up(depth, src_w, &src_p, x_coeff,
++ scale_x_up(cf, src_w, &src_p, x_coeff,
+ x_shift, y_coeff[curr_y_coeff],
+ row_buffer);
+ else
-+ scale_x_down(depth, src_w, &src_p, x_coeff,
++ scale_x_down(cf, src_w, &src_p, x_coeff,
+ x_shift, y_coeff[curr_y_coeff],
+ row_buffer);
+ curr_y_coeff++;
@@ -2401,12 +2489,12 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ src_p = src_p_line = src_p_line + src_x_bytes;
+ j++;
+ if (xup)
-+ scale_x_up(depth, src_w, &src_p,
++ scale_x_up(cf, src_w, &src_p,
+ x_coeff, x_shift,
+ y_coeff[curr_y_coeff],
+ row_buffer);
+ else
-+ scale_x_down(depth, src_w, &src_p,
++ scale_x_down(cf, src_w, &src_p,
+ x_coeff, x_shift,
+ y_coeff[curr_y_coeff],
+ row_buffer);
@@ -2420,7 +2508,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ >> y_shift;
+ row_buffer[k].blue = (row_buffer[k].blue + rnd)
+ >> y_shift;
-+ put_pixel(row_buffer[k], dst, depth);
++ put_pixel(row_buffer[k], dst, cf);
+ }
+ dst = dst_p_line = dst_p_line + dst_x_bytes;
+ }
@@ -2434,9 +2522,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+static int scale_y_up(unsigned char *src, unsigned char *dst,
-+ int depth, int src_w, int src_h, int dst_w, int dst_h)
++ enum splash_color_format cf,
++ int src_w, int src_h, int dst_w, int dst_h)
+{
-+ int octpp = (depth + 1) >> 3;
++ int octpp = splash_octpp(cf);
+ int src_x_bytes = octpp * ((src_w + SPLASH_ALIGN) & ~SPLASH_ALIGN);
+ int dst_x_bytes = octpp * ((dst_w + SPLASH_ALIGN) & ~SPLASH_ALIGN);
+ int j;
@@ -2486,10 +2575,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ * (dst_w + 1)));
+ curr_y_coeff = 1;
+ if (xup)
-+ scale_x_up(depth, src_w, &src_p, x_coeff,
++ scale_x_up(cf, src_w, &src_p, x_coeff,
+ x_shift, 1, row_buffer);
+ else
-+ scale_x_down(depth, src_w, &src_p, x_coeff, x_shift, 1,
++ scale_x_down(cf, src_w, &src_p, x_coeff, x_shift, 1,
+ row_buffer);
+ src_p = src_p_line = src_p_line + src_x_bytes;
+ j++;
@@ -2500,7 +2589,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ y_column_num = y_coeff[curr_y_coeff];
+ for (s = 0; s < y_column_num; s++) {
+ for (k = 0; k < dst_w; k++)
-+ put_pixel(row_buffer[k], dst, depth);
++ put_pixel(row_buffer[k], dst, cf);
+ dst = dst_p_line = dst_p_line + dst_x_bytes;
+ writes++;
+ }
@@ -2508,10 +2597,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ row_buffer = row_buf_list[(bi++) % 2];
+ prev_y_coeff_val = y_coeff[curr_y_coeff++];
+ if (xup)
-+ scale_x_up(depth, src_w, &src_p, x_coeff,
++ scale_x_up(cf, src_w, &src_p, x_coeff,
+ x_shift, 1, row_buffer);
+ else
-+ scale_x_down(depth, src_w, &src_p, x_coeff,
++ scale_x_down(cf, src_w, &src_p, x_coeff,
+ x_shift, 1, row_buffer);
+ src_p = src_p_line = src_p_line + src_x_bytes;
+ j++;
@@ -2535,7 +2624,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ old_row_buffer[k].red = 0;
+ old_row_buffer[k].green = 0;
+ old_row_buffer[k].blue = 0;
-+ put_pixel(pix, dst, depth);
++ put_pixel(pix, dst, cf);
+ }
+ dst = dst_p_line = dst_p_line + dst_x_bytes;
+ writes++;
@@ -2543,7 +2632,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ }
+ for (r = 0; r < y_coeff[curr_y_coeff]; r++) {
+ for (k = 0; k < dst_w; k++)
-+ put_pixel(row_buffer[k], dst, depth);
++ put_pixel(row_buffer[k], dst, cf);
+
+ dst = dst_p_line = dst_p_line + dst_x_bytes;
+ writes++;
@@ -2557,22 +2646,23 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+static int jpeg_get(unsigned char *buf, unsigned char *pic,
-+ int width, int height, int depth,
++ int width, int height, enum splash_color_format cf,
+ struct jpeg_decdata *decdata)
+{
+ int my_width, my_height;
+ int err;
++ int octpp = splash_octpp(cf);
+
+ jpeg_get_size(buf, &my_width, &my_height);
+
+ if (my_height != height || my_width != width) {
+ int my_size = ((my_width + 15) & ~15)
-+ * ((my_height + 15) & ~15) * ((depth + 1) >> 3);
++ * ((my_height + 15) & ~15) * octpp;
+ unsigned char *mem = vmalloc(my_size);
+ if (!mem)
+ return 17;
+ err = jpeg_decode(buf, mem, ((my_width + 15) & ~15),
-+ ((my_height + 15) & ~15), depth, decdata);
++ ((my_height + 15) & ~15), cf, decdata);
+ if (err) {
+ vfree(mem);
+ return err;
@@ -2581,11 +2671,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ "bootsplash: scaling image from %dx%d to %dx%d\n",
+ my_width, my_height, width, height);
+ if (my_height <= height)
-+ err = scale_y_up(mem, pic, depth, my_width, my_height,
++ err = scale_y_up(mem, pic, cf, my_width, my_height,
+ ((width + 15) & ~15),
+ ((height + 15) & ~15));
+ else
-+ err = scale_y_down(mem, pic, depth, my_width, my_height,
++ err = scale_y_down(mem, pic, cf, my_width, my_height,
+ ((width + 15) & ~15),
+ ((height + 15) & ~15));
+ vfree(mem);
@@ -2593,15 +2683,17 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ return 17;
+ } else {
+ err = jpeg_decode(buf, pic, ((width + 15) & ~15),
-+ ((height + 15) & ~15), depth, decdata);
++ ((height + 15) & ~15), cf, decdata);
+ if (err)
+ return err;
+ }
+ return 0;
+}
+Index: linux-3.0-master/drivers/video/bootsplash/decode-jpg.c
+===================================================================
--- /dev/null
-+++ b/drivers/video/bootsplash/decode-jpg.c
-@@ -0,0 +1,998 @@
++++ linux-3.0-master/drivers/video/bootsplash/decode-jpg.c
+@@ -0,0 +1,1045 @@
+/*
+ * linux/drivers/video/bootsplash/decode-jpg.c - a tiny jpeg decoder.
+ *
@@ -2611,7 +2703,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+
+#include <linux/string.h>
+#include <asm/byteorder.h>
-+
++#include <linux/bootsplash.h>
+#include "decode-jpg.h"
+
+#define ISHIFT 11
@@ -2684,9 +2776,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+
+static void initcol(PREC[][64]);
+
-+static void col221111(int *, unsigned char *, int);
-+static void col221111_16(int *, unsigned char *, int);
-+static void col221111_32(int *, unsigned char *, int);
++static void col221111(int *out, unsigned char *pic, int width);
++static void col221111_15(int *out, unsigned char *pic, int width);
++static void col221111_16(int *out, unsigned char *pic, int width);
++static void col221111_32(int *out, unsigned char *pic, int width);
+
+/*********************************/
+
@@ -2854,7 +2947,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+}
+
+int jpeg_decode(unsigned char *buf, unsigned char *pic,
-+ int width, int height, int depth,
++ int width, int height, enum splash_color_format cf,
+ struct jpeg_decdata *decdata)
+{
+ int i, j, m, tac, tdc;
@@ -2981,24 +3074,29 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ decdata->out + 320,
+ decdata->dquant[2], IFIX(0.5), max[5]);
+
-+ switch (depth) {
-+ case 32:
++ switch (cf) {
++ case SPLASH_DEPTH_24:
+ col221111_32(decdata->out,
+ (pic + (my * 16 * mcusx + mx)
+ * 16 * 4),
+ mcusx * 16 * 4);
+ break;
-+ case 24:
++ case SPLASH_DEPTH_24_PACKED:
+ col221111(decdata->out,
+ (pic + (my * 16 * mcusx + mx)
+ * 16 * 3),
+ mcusx * 16 * 3);
+ break;
-+ case 16:
++ case SPLASH_DEPTH_16:
+ col221111_16(decdata->out,
+ (pic + (my * 16 * mcusx + mx)
+ * 16 * 2), mcusx * 16 * 2);
+ break;
++ case SPLASH_DEPTH_15:
++ col221111_15(decdata->out,
++ (pic + (my * 16 * mcusx + mx)
++ * 16 * 2), mcusx * 16 * 2);
++ break;
+ default:
+ return ERR_DEPTH_MISMATCH;
+ break;
@@ -3460,6 +3558,16 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ )
+
+#ifdef __LITTLE_ENDIAN
++#define PIC_15(yin, xin, p, xout, add) \
++ ( \
++ y = outy[(yin) * 8 + xin], \
++ y = ((CLAMP(y + cr + add * 2 + 1) & 0xf8) << 7) | \
++ ((CLAMP(y - cg + add * 2 + 1) & 0xf8) << 2) | \
++ ((CLAMP(y + cb + add * 2 + 1)) >> 3), \
++ p[(xout) * 2 + 0] = y & 0xff, \
++ p[(xout) * 2 + 1] = y >> 8 \
++ )
++
+#define PIC_16(yin, xin, p, xout, add) \
+ ( \
+ y = outy[(yin) * 8 + xin], \
@@ -3470,8 +3578,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ p[(xout) * 2 + 1] = y >> 8 \
+ )
+#else
-+#ifdef CONFIG_PPC
-+#define PIC_16(yin, xin, p, xout, add) \
++#define PIC_15(yin, xin, p, xout, add) \
+ ( \
+ y = outy[(yin) * 8 + xin], \
+ y = ((CLAMP(y + cr + add * 2 + 1) & 0xf8) << 7) | \
@@ -3480,7 +3587,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ p[(xout) * 2 + 0] = y >> 8, \
+ p[(xout) * 2 + 1] = y & 0xff \
+ )
-+#else
++
+#define PIC_16(yin, xin, p, xout, add) \
+ ( \
+ y = outy[(yin) * 8 + xin], \
@@ -3491,7 +3598,6 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ p[(xout) * 2 + 1] = y & 0xff \
+ )
+#endif
-+#endif
+
+#define PIC_32(yin, xin, p, xout) \
+ ( \
@@ -3511,6 +3617,15 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \
+ )
+
++#define PIC221111_15(xin) \
++ ( \
++ CBCRCG(0, xin), \
++ PIC_15(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0, 3), \
++ PIC_15(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1, 0), \
++ PIC_15(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0, 1), \
++ PIC_15(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2) \
++ )
++
+#define PIC221111_16(xin) \
+ ( \
+ CBCRCG(0, xin), \
@@ -3553,6 +3668,30 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ }
+}
+
++static void col221111_15(int *out, unsigned char *pic, int width)
++{
++ int i, j, k;
++ unsigned char *pic0, *pic1;
++ int *outy, *outc;
++ int cr, cg, cb, y;
++
++ pic0 = pic;
++ pic1 = pic + width;
++ outy = out;
++ outc = out + 64 * 4;
++ for (i = 2; i > 0; i--) {
++ for (j = 4; j > 0; j--) {
++ for (k = 0; k < 8; k++)
++ PIC221111_15(k);
++ outc += 8;
++ outy += 16;
++ pic0 += 2 * width;
++ pic1 += 2 * width;
++ }
++ outy += 64 * 2 - 16 * 4;
++ }
++}
++
+static void col221111_16(int *out, unsigned char *pic, int width)
+{
+ int i, j, k;
@@ -3600,9 +3739,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ outy += 64 * 2 - 16 * 4;
+ }
+}
+Index: linux-3.0-master/drivers/video/bootsplash/decode-jpg.h
+===================================================================
--- /dev/null
-+++ b/drivers/video/bootsplash/decode-jpg.h
-@@ -0,0 +1,36 @@
++++ linux-3.0-master/drivers/video/bootsplash/decode-jpg.h
+@@ -0,0 +1,37 @@
+/*
+ * linux/drivers/video/bootsplash/decode-jpg.h - a tiny jpeg decoder.
+ *
@@ -3634,13 +3775,16 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ int dquant[3][64];
+};
+
-+extern int jpeg_decode(unsigned char *, unsigned char *, int, int, int,
++extern int jpeg_decode(unsigned char *buf, unsigned char *pic,
++ int width, int height, enum splash_color_format cf,
+ struct jpeg_decdata *);
+extern void jpeg_get_size(unsigned char *, int *, int *);
+
+#endif
+Index: linux-3.0-master/drivers/video/bootsplash/render.c
+===================================================================
--- /dev/null
-+++ b/drivers/video/bootsplash/render.c
++++ linux-3.0-master/drivers/video/bootsplash/render.c
@@ -0,0 +1,491 @@
+/*
+ * linux/drivers/video/bootsplash/render.c - splash screen render functions.
@@ -4133,8 +4277,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ /* update_screen(vc->vc_num); */
+ }
+}
---- a/drivers/video/console/bitblit.c
-+++ b/drivers/video/console/bitblit.c
+Index: linux-3.0-master/drivers/video/console/bitblit.c
+===================================================================
+--- linux-3.0-master.orig/drivers/video/console/bitblit.c
++++ linux-3.0-master/drivers/video/console/bitblit.c
@@ -19,6 +19,9 @@
#include <asm/types.h>
#include "fbcon.h"
@@ -4145,7 +4291,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
/*
* Accelerated handlers.
*/
-@@ -48,6 +51,12 @@
+@@ -48,6 +51,12 @@ static void bit_bmove(struct vc_data *vc
{
struct fb_copyarea area;
@@ -4158,7 +4304,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
area.sx = sx * vc->vc_font.width;
area.sy = sy * vc->vc_font.height;
area.dx = dx * vc->vc_font.width;
-@@ -64,6 +73,12 @@
+@@ -64,6 +73,12 @@ static void bit_clear(struct vc_data *vc
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
struct fb_fillrect region;
@@ -4171,7 +4317,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
region.color = attr_bgcol_ec(bgshift, vc, info);
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
-@@ -161,6 +176,11 @@
+@@ -161,6 +176,11 @@ static void bit_putcs(struct vc_data *vc
image.height = vc->vc_font.height;
image.depth = 1;
@@ -4183,7 +4329,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
if (attribute) {
buf = kmalloc(cellsize, GFP_KERNEL);
if (!buf)
-@@ -214,6 +234,11 @@
+@@ -214,6 +234,11 @@ static void bit_clear_margins(struct vc_
unsigned int bs = info->var.yres - bh;
struct fb_fillrect region;
@@ -4195,7 +4341,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
region.color = attr_bgcol_ec(bgshift, vc, info);
region.rop = ROP_COPY;
-@@ -380,6 +405,12 @@
+@@ -380,6 +405,12 @@ static void bit_cursor(struct vc_data *v
cursor.image.depth = 1;
cursor.rop = ROP_XOR;
@@ -4208,8 +4354,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
if (info->fbops->fb_cursor)
err = info->fbops->fb_cursor(info, &cursor);
---- a/drivers/video/console/fbcon.c
-+++ b/drivers/video/console/fbcon.c
+Index: linux-3.0-master/drivers/video/console/fbcon.c
+===================================================================
+--- linux-3.0-master.orig/drivers/video/console/fbcon.c
++++ linux-3.0-master/drivers/video/console/fbcon.c
@@ -80,6 +80,7 @@
#include <asm/system.h>
@@ -4218,7 +4366,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
#ifdef FBCONDEBUG
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
-@@ -95,7 +96,11 @@
+@@ -95,7 +96,11 @@ enum {
static struct display fb_display[MAX_NR_CONSOLES];
@@ -4230,7 +4378,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
static signed char con2fb_map_boot[MAX_NR_CONSOLES];
static int logo_lines;
-@@ -536,6 +541,8 @@
+@@ -536,6 +541,8 @@ static int fbcon_takeover(int show_logo)
for (i = first_fb_vc; i <= last_fb_vc; i++)
con2fb_map[i] = info_idx;
@@ -4239,7 +4387,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
err = take_over_console(&fb_con, first_fb_vc, last_fb_vc,
fbcon_is_default);
-@@ -1099,6 +1106,21 @@
+@@ -1099,6 +1106,21 @@ static void fbcon_init(struct vc_data *v
new_cols /= vc->vc_font.width;
new_rows /= vc->vc_font.height;
@@ -4261,7 +4409,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
/*
* We must always set the mode. The mode of the previous console
* driver could be in the same resolution but we are using different
-@@ -1800,6 +1822,8 @@
+@@ -1800,6 +1822,8 @@ static int fbcon_scroll(struct vc_data *
fbcon_softback_note(vc, t, count);
if (logo_shown >= 0)
goto redraw_up;
@@ -4270,7 +4418,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
switch (p->scrollmode) {
case SCROLL_MOVE:
fbcon_redraw_blit(vc, info, p, t, b - t - count,
-@@ -1891,6 +1915,8 @@
+@@ -1891,6 +1915,8 @@ static int fbcon_scroll(struct vc_data *
count = vc->vc_rows;
if (logo_shown >= 0)
goto redraw_down;
@@ -4279,7 +4427,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
switch (p->scrollmode) {
case SCROLL_MOVE:
fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
-@@ -2039,6 +2065,12 @@
+@@ -2039,6 +2065,12 @@ static void fbcon_bmove_rec(struct vc_da
}
return;
}
@@ -4292,7 +4440,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
height, width);
}
-@@ -2147,6 +2179,23 @@
+@@ -2147,6 +2179,23 @@ static int fbcon_switch(struct vc_data *
info = registered_fb[con2fb_map[vc->vc_num]];
ops = info->fbcon_par;
@@ -4316,7 +4464,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
if (softback_top) {
if (softback_lines)
fbcon_set_origin(vc);
-@@ -2280,6 +2329,11 @@
+@@ -2280,6 +2329,11 @@ static void fbcon_generic_blank(struct v
{
struct fb_event event;
@@ -4328,7 +4476,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
if (blank) {
unsigned short charmask = vc->vc_hi_font_mask ?
0x1ff : 0xff;
-@@ -2505,6 +2559,10 @@
+@@ -2505,6 +2559,10 @@ static int fbcon_do_set_font(struct vc_d
cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
@@ -4339,8 +4487,10 @@ Signed-off-by: Egbert Eich <eich@suse.de>
cols /= w;
rows /= h;
vc_resize(vc, cols, rows);
---- a/drivers/video/console/fbcon.h
-+++ b/drivers/video/console/fbcon.h
+Index: linux-3.0-master/drivers/video/console/fbcon.h
+===================================================================
+--- linux-3.0-master.orig/drivers/video/console/fbcon.h
++++ linux-3.0-master/drivers/video/console/fbcon.h
@@ -25,6 +25,53 @@
* low-level frame buffer device
*/
@@ -4395,9 +4545,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
struct display {
/* Filled in by the low-level console driver */
const u_char *fontdata;
+Index: linux-3.0-master/include/linux/bootsplash.h
+===================================================================
--- /dev/null
-+++ b/include/linux/bootsplash.h
-@@ -0,0 +1,76 @@
++++ linux-3.0-master/include/linux/bootsplash.h
+@@ -0,0 +1,86 @@
+/*
+ * linux/drivers/video/bootsplash/bootsplash.h - splash screen definition.
+ *
@@ -4420,6 +4572,16 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ u8 *ub;
+};
+
++enum splash_color_format {
++ SPLASH_DEPTH_UNKNOWN = 0,
++ SPLASH_DEPTH_15 = 15,
++ SPLASH_DEPTH_16 = 16,
++ SPLASH_DEPTH_24_PACKED = 24,
++ SPLASH_DEPTH_24 = 32
++};
++
++#define splash_octpp(cf) (((int)cf + 1) >> 3)
++
+struct vc_data;
+struct fb_info;
+struct fb_cursor;
@@ -4435,7 +4597,7 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+ const unsigned short *s, int count,
+ int ypos, int xpos);
+extern void splashcopy(u8 *dst, u8 *src, int height, int width,
-+ int dstbytes, int srcbytes, int depth);
++ int dstbytes, int srcbytes, int octpp);
+extern void splash_clear(struct vc_data *vc, struct fb_info *info, int sy,
+ int sx, int height, int width);
+extern void splash_bmove(struct vc_data *vc, struct fb_info *info, int sy,
@@ -4474,9 +4636,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
+# endif
+
+#endif
---- a/include/linux/console_struct.h
-+++ b/include/linux/console_struct.h
-@@ -107,6 +107,9 @@
+Index: linux-3.0-master/include/linux/console_struct.h
+===================================================================
+--- linux-3.0-master.orig/include/linux/console_struct.h
++++ linux-3.0-master/include/linux/console_struct.h
+@@ -107,6 +107,9 @@ struct vc_data {
unsigned long vc_uni_pagedir;
unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
bool vc_panic_force_write; /* when oops/panic this VC can accept forced output/blanking */
@@ -4486,9 +4650,11 @@ Signed-off-by: Egbert Eich <eich@suse.de>
/* additional information is in vt_kern.h */
};
---- a/include/linux/fb.h
-+++ b/include/linux/fb.h
-@@ -878,6 +878,10 @@
+Index: linux-3.0-master/include/linux/fb.h
+===================================================================
+--- linux-3.0-master.orig/include/linux/fb.h
++++ linux-3.0-master/include/linux/fb.h
+@@ -878,6 +878,10 @@ struct fb_info {
void *fbcon_par; /* fbcon use-only private area */
/* From here on everything is device dependent */
void *par;