update to linux 2.6.29, evdev 2.2.1

This commit is contained in:
Stephan Raue 2009-03-24 18:12:21 +01:00
parent 428c84c17c
commit 6eafbf2336
7 changed files with 5 additions and 3821 deletions

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc8
# Linux kernel version: 2.6.29
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@ -510,6 +510,7 @@ CONFIG_NL80211=y
CONFIG_WIRELESS_EXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
CONFIG_LIB80211=m
# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=m
#
@ -735,6 +736,7 @@ CONFIG_MII=m
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_DNET is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
@ -1314,11 +1316,6 @@ CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_LOGO is not set
#
# Bootsplash configuration
#
# CONFIG_BOOTSPLASH is not set
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SND=m

File diff suppressed because it is too large Load Diff

View File

@ -1,981 +0,0 @@
diff -Naur linux-2.6.26-rc8.orig/drivers/char/n_tty.c linux-2.6.26-rc8/drivers/char/n_tty.c
--- linux-2.6.26-rc8.orig/drivers/char/n_tty.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/char/n_tty.c 2008-06-28 11:41:40.000000000 +0200
@@ -1325,15 +1325,6 @@
tty->minimum_to_wake = (minimum - (b - buf));
if (!input_available_p(tty, 0)) {
-#ifdef CONFIG_BOOTSPLASH
- if (file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,0) ||
- file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1) ||
- file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) ||
- file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,1)) {
- extern int splash_verbose(void);
- (void)splash_verbose();
- }
-#endif
if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
retval = -EIO;
break;
@@ -1350,6 +1341,17 @@
retval = -ERESTARTSYS;
break;
}
+
+#ifdef CONFIG_BOOTSPLASH
+ if (file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,0) ||
+ file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1) ||
+ file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) ||
+ file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,1)) {
+ extern int splash_verbose(void);
+ (void)splash_verbose();
+ }
+#endif
+
/* FIXME: does n_tty_set_room need locking ? */
n_tty_set_room(tty);
timeout = schedule_timeout(timeout);
diff -Naur linux-2.6.26-rc8.orig/drivers/char/vt.c linux-2.6.26-rc8/drivers/char/vt.c
--- linux-2.6.26-rc8.orig/drivers/char/vt.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/char/vt.c 2008-06-28 11:39:30.000000000 +0200
@@ -840,10 +840,6 @@
old_screen_size = vc->vc_screenbuf_size;
err = resize_screen(vc, new_cols, new_rows, user);
- if (err) {
- kfree(newscreen);
- return err;
- }
vc->vc_rows = new_rows;
vc->vc_cols = new_cols;
diff -Naur linux-2.6.26-rc8.orig/drivers/video/bootsplash/bootsplash.c linux-2.6.26-rc8/drivers/video/bootsplash/bootsplash.c
--- linux-2.6.26-rc8.orig/drivers/video/bootsplash/bootsplash.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/bootsplash/bootsplash.c 2008-06-28 11:39:30.000000000 +0200
@@ -30,7 +30,7 @@
/* extern struct fb_ops vesafb_ops; */
extern signed char con2fb_map[MAX_NR_CONSOLES];
-#define SPLASH_VERSION "3.1.6-2004/03/31"
+#define SPLASH_VERSION "3.1.7.4-geexbox"
/* These errors have to match fbcon-jpegdec.h */
static unsigned char *jpg_errors[] = {
@@ -113,7 +113,7 @@
return 12;
}
-static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num, int percent, int overpaint)
+static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num, int percent, int overpaint, int depth)
{
int x, y, i, p, doblend, r, g, b, a, add;
unsigned short data1[4];
@@ -121,7 +121,7 @@
unsigned short data2[4];
unsigned char cols2[16];
unsigned char *bufend;
- unsigned short *picp;
+ unsigned char *picp;
unsigned int stipple[32], sti, stin, stinn, stixs, stixe, stiys, stiye;
int xs, xe, ys, ye, xo, yo;
@@ -236,11 +236,11 @@
}
add = (xs & 1);
add ^= (add ^ y) & 1 ? 1 : 3; /* 2x2 ordered dithering */
- picp = (unsigned short *)(pic + xs * 2 + y * bytes);
+ picp = pic + xs * (depth>>3) + y * bytes;
for (x = xs; x <= xe; x++) {
if (!(sti & 0x80000000)) {
sti <<= 1;
- picp++;
+ picp += depth>>3;
add ^= 3;
continue;
}
@@ -255,18 +255,43 @@
r = cols2[0];
g = cols2[1];
b = cols2[2];
- if (a != 255) {
- i = *picp;
- r = ((i >> 8 & 0xf8) * (255 - a) + r * a) / 255;
- g = ((i >> 3 & 0xfc) * (255 - a) + g * a) / 255;
- b = ((i << 3 & 0xf8) * (255 - a) + b * a) / 255;
- }
#define CLAMP(x) ((x) >= 256 ? 255 : (x))
- i = ((CLAMP(r + add*2+1) & 0xf8) << 8) |
- ((CLAMP(g + add ) & 0xfc) << 3) |
- ((CLAMP(b + add*2+1) ) >> 3);
- *picp++ = i;
- add ^= 3;
+ switch (depth) {
+ case 16:
+ if (a != 255) {
+ i = *(unsigned short *)picp;
+ r = ((i >> 8 & 0xf8) * (255 - a) + r * a) / 255;
+ g = ((i >> 3 & 0xfc) * (255 - a) + g * a) / 255;
+ b = ((i << 3 & 0xf8) * (255 - a) + b * a) / 255;
+ }
+ i = ((CLAMP(r + add*2+1) & 0xf8) << 8) |
+ ((CLAMP(g + add ) & 0xfc) << 3) |
+ ((CLAMP(b + add*2+1) ) >> 3);
+ *((unsigned short *)picp)++ = i;
+ add ^= 3;
+ break;
+ case 24:
+ if (a != 255) {
+ b = (picp[0] * (255 - a) + b * a) / 255;
+ g = (picp[1] * (255 - a) + g * a) / 255;
+ r = (picp[2] * (255 - a) + r * a) / 255;
+ }
+ *picp++ = CLAMP(b);
+ *picp++ = CLAMP(g);
+ *picp++ = CLAMP(r);
+ break;
+ case 32:
+ if (a != 255) {
+ b = (picp[0] * (255 - a) + b * a) / 255;
+ g = (picp[1] * (255 - a) + g * a) / 255;
+ r = (picp[2] * (255 - a) + r * a) / 255;
+ }
+ *picp++ = CLAMP(b);
+ *picp++ = CLAMP(g);
+ *picp++ = CLAMP(r);
+ *picp++ = 0;
+ break;
+ }
}
}
}
@@ -382,7 +407,7 @@
pos[off] | pos[off + 1] << 8 | pos[off + 2] << 16 | pos[off + 3] << 24;
}
-static int splash_getraw(unsigned char *start, unsigned char *end, int *update)
+static int splash_getraw(unsigned char *start, unsigned char *end)
{
unsigned char *ndata;
int version;
@@ -399,10 +424,6 @@
struct fb_info *info;
struct splash_data *sd;
- if (update)
- *update = -1;
-
- if (!update || start[7] < '2' || start[7] > '3' || splash_geti(start, 12) != (int)0xffffffff)
printk(KERN_INFO "bootsplash %s: looking for picture...", SPLASH_VERSION);
for (ndata = start; ndata < end; ndata++) {
@@ -410,6 +431,7 @@
continue;
if (ndata[4] != 'S' || ndata[5] != 'P' || ndata[6] != 'L' || ndata[7] < '1' || ndata[7] > '3')
continue;
+ printk(".");
version = ndata[7] - '0';
offsets = splash_offsets[version - 1];
len = SPLASH_OFF_LEN;
@@ -417,7 +439,9 @@
if (unit >= MAX_NR_CONSOLES)
continue;
if (unit) {
+ acquire_console_sem();
vc_allocate(unit);
+ release_console_sem();
}
vc = vc_cons[unit].d;
info = registered_fb[(int)con2fb_map[unit]];
@@ -425,51 +449,20 @@
height = info->var.yres;
splash_size = splash_geti(ndata, SPLASH_OFF_SIZE);
if (splash_size == (int)0xffffffff && version > 1) {
+ printk(KERN_INFO " found, updating values.\n");
if ((sd = vc->vc_splash_data) != 0) {
- int up = 0;
i = splash_getb(ndata, SPLASH_OFF_STATE);
if (i != 255) {
sd->splash_state = i;
- up = -1;
}
i = splash_getb(ndata, SPLASH_OFF_FGCOL);
if (i != 255) {
sd->splash_fg_color = i;
- up = -1;
}
i = splash_getb(ndata, SPLASH_OFF_COL);
if (i != 255) {
sd->splash_color = i;
- up = -1;
- }
- boxcnt = sboxcnt = 0;
- if (ndata + len <= end) {
- boxcnt = splash_gets(ndata, SPLASH_OFF_BOXCNT);
- sboxcnt = splash_gets(ndata, SPLASH_OFF_SBOXCNT);
- }
- if (boxcnt) {
- i = splash_gets(ndata, len);
- if (boxcnt + i <= sd->splash_boxcount && ndata + len + 2 + boxcnt * 12 <= end) {
-
- if (splash_geti(ndata, len + 2) != 0x7ffd7fff || !memcmp(ndata + len + 2, sd->splash_boxes + i * 12, 8)) {
-
- memcpy(sd->splash_boxes + i * 12, ndata + len + 2, boxcnt * 12);
- up |= 1;
- }
- }
- len += boxcnt * 12 + 2;
- }
- if (sboxcnt) {
- i = splash_gets(ndata, len);
- if (sboxcnt + i <= sd->splash_sboxcount && ndata + len + 2 + sboxcnt * 12 <= end) {
- if (splash_geti(ndata, len + 2) != 0x7ffd7fff || !memcmp(ndata + len + 2, sd->splash_sboxes + i * 12, 8)) {
- memcpy(sd->splash_sboxes + i * 12, ndata + len + 2, sboxcnt * 12);
- up |= 2;
- }
- }
}
- if (update)
- *update = up;
}
return unit;
}
@@ -506,7 +499,7 @@
silentsize = 0;
}
sboxcnt = splash_gets(ndata, SPLASH_OFF_SBOXCNT);
- if (silentsize) {
+ if (silentsize > 12 * sboxcnt) {
unsigned char *simage = ndata + len + splash_size + 12 * sboxcnt;
if (!jpeg_check_size(simage, width, height) ||
splash_check_jpeg(simage, width, height, info->var.bits_per_pixel)) {
@@ -523,12 +516,12 @@
sd->splash_sboxes = 0;
sd->splash_sboxcount = 0;
if (silentsize) {
- sd->splash_silentjpeg = vmalloc(silentsize);
- if (sd->splash_silentjpeg) {
- memcpy(sd->splash_silentjpeg, ndata + len + splash_size, silentsize);
- sd->splash_sboxes = vc->vc_splash_data->splash_silentjpeg;
- sd->splash_silentjpeg += 12 * sboxcnt;
+ sd->splash_sboxes = vmalloc(silentsize);
+ if (sd->splash_sboxes) {
+ memcpy(sd->splash_sboxes, ndata + len + splash_size, silentsize);
sd->splash_sboxcount = sboxcnt;
+ if (silentsize > 12 * sboxcnt)
+ sd->splash_silentjpeg = sd->splash_sboxes + 12 * sboxcnt;
}
}
sd->splash_state = splash_getb(ndata, SPLASH_OFF_STATE);
@@ -577,6 +570,8 @@
sd->splash_palette = sd->splash_boxes + boxcnt * 12;
sd->splash_jpeg = sd->splash_palette + palcnt;
sd->splash_palcnt = palcnt / 3;
+ if (splash_usesilent && sd->splash_silentjpeg == 0)
+ sd->splash_silentjpeg = sd->splash_jpeg;
sd->splash_dosilent = sd->splash_silentjpeg != 0;
return unit;
}
@@ -604,7 +599,7 @@
info = registered_fb[(int)con2fb_map[0]];
if (!info->silent_screen_base)
return 0;
- splashcopy(info->silent_screen_base, info->screen_base, info->var.yres, info->var.xres, info->fix.line_length, info->fix.line_length);
+ splashcopy(info->silent_screen_base, info->screen_base, info->var.yres, info->var.xres, info->fix.line_length, info->fix.line_length, info->var.bits_per_pixel);
info->screen_base = info->silent_screen_base;
info->silent_screen_base = 0;
return 1;
@@ -638,7 +633,7 @@
width = info->var.xres;
height = info->var.yres;
depth = info->var.bits_per_pixel;
- if (depth != 16) { /* Other targets might need fixing */
+ if (depth < 16) {
splash_off(info);
return -2;
}
@@ -670,11 +665,11 @@
} else {
if (vc->vc_splash_data->splash_sboxcount)
boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_sboxes,
- vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 0);
+ vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 0, info->var.bits_per_pixel);
if (!info->silent_screen_base)
info->silent_screen_base = info->screen_base;
- splashcopy(info->silent_screen_base, info->splash_pic, info->var.yres, info->var.xres, info->fix.line_length, sbytes);
+ splashcopy(info->silent_screen_base, info->splash_pic, info->var.yres, info->var.xres, info->fix.line_length, sbytes, depth);
info->screen_base = info->silent_screen_base + info->fix.line_length * info->var.yres;
}
} else if (info->silent_screen_base)
@@ -689,7 +684,7 @@
info->splash_pic_size = size;
info->splash_bytes = sbytes;
if (vc->vc_splash_data->splash_boxcount)
- boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 0);
+ boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 0, info->var.bits_per_pixel);
if (vc->vc_splash_data->splash_state)
info->splash_data = vc->vc_splash_data;
else
@@ -736,6 +731,7 @@
splash_prepare(vc, info);
if (vc->vc_splash_data && vc->vc_splash_data->splash_state) {
con_remap_def_color(vc, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color);
+ acquire_console_sem();
/* vc_resize also calls con_switch which resets yscroll */
vc_resize(vc, vc->vc_splash_data->splash_text_wi / vc->vc_font.width, vc->vc_splash_data->splash_text_he / vc->vc_font.height);
if (fg_console == vc->vc_num) {
@@ -743,10 +739,13 @@
vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
splash_clear_margins(vc->vc_splash_data, vc, info, 0);
}
+ release_console_sem();
} else {
/* Switch bootsplash off */
con_remap_def_color(vc, 0x07);
+ acquire_console_sem();
vc_resize(vc, info->var.xres / vc->vc_font.width, info->var.yres / vc->vc_font.height);
+ release_console_sem();
}
return 0;
}
@@ -782,7 +781,6 @@
if (!buffer || !splash_default)
return count;
- acquire_console_sem();
if (!strncmp(buffer, "show", 4) || !strncmp(buffer, "hide", 4)) {
int pe, oldpe;
@@ -802,20 +800,13 @@
pe += pe > 32767;
if (vc->vc_splash_data && vc->vc_splash_data->splash_percent != pe) {
struct fb_info *info;
- struct fbcon_ops *ops;
oldpe = vc->vc_splash_data->splash_percent;
vc->vc_splash_data->splash_percent = pe;
if (fg_console != 0 || !vc->vc_splash_data->splash_state) {
- release_console_sem();
return count;
}
info = registered_fb[(int) con2fb_map[vc->vc_num]];
- ops = info->fbcon_par;
- if (ops->blank_state) {
- release_console_sem();
- return count;
- }
if (!vc->vc_splash_data->splash_overpaintok || pe == 65536 || pe < oldpe) {
if (splash_hasinter(vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount))
splash_status(vc);
@@ -823,11 +814,10 @@
splash_prepare(vc, info);
} else {
if (vc->vc_splash_data->splash_silentjpeg && vc->vc_splash_data->splash_dosilent && info->silent_screen_base)
- boxit(info->silent_screen_base, info->fix.line_length, vc->vc_splash_data->splash_sboxes, vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 1);
- boxit(info->screen_base, info->fix.line_length, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 1);
+ boxit(info->silent_screen_base, info->fix.line_length, vc->vc_splash_data->splash_sboxes, vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 1, info->var.bits_per_pixel);
+ boxit(info->screen_base, info->fix.line_length, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 1, info->var.bits_per_pixel);
}
}
- release_console_sem();
return count;
}
if (!strncmp(buffer,"silent\n",7) || !strncmp(buffer,"verbose\n",8)) {
@@ -838,7 +828,6 @@
splash_status(vc);
}
}
- release_console_sem();
return count;
}
if (!strncmp(buffer,"freesilent\n",11)) {
@@ -853,40 +842,24 @@
splash_status(vc);
vc->vc_splash_data->splash_dosilent = 0;
}
- release_console_sem();
return count;
}
if (!strncmp(buffer, "BOOTSPL", 7)) {
- int up = -1;
- unit = splash_getraw((unsigned char *)buffer, (unsigned char *)buffer + count, &up);
+ unit = splash_getraw((unsigned char *)buffer, (unsigned char *)buffer + count);
if (unit >= 0) {
vc = vc_cons[unit].d;
- if (up == -1)
- splash_status(vc);
- else {
- struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
- struct fbcon_ops *ops = info->fbcon_par;
- if (ops->blank_state)
- up = 0;
- if ((up & 2) != 0 && vc->vc_splash_data->splash_silentjpeg && vc->vc_splash_data->splash_dosilent && info->silent_screen_base)
- boxit(info->silent_screen_base, info->fix.line_length, vc->vc_splash_data->splash_sboxes, vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 1);
- if ((up & 1) != 0)
- boxit(info->screen_base, info->fix.line_length, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 1);
- }
+ splash_status(vc);
}
- release_console_sem();
return count;
}
vc = vc_cons[0].d;
if (!vc->vc_splash_data) {
- release_console_sem();
return count;
}
if (buffer[0] == 't') {
vc->vc_splash_data->splash_state ^= 1;
splash_status(vc);
- release_console_sem();
return count;
}
new = simple_strtoul(buffer, NULL, 0);
@@ -901,7 +874,6 @@
vc->vc_splash_data->splash_state = new & 1;
splash_status(vc);
}
- release_console_sem();
return count;
}
@@ -939,7 +911,7 @@
return;
vc = vc_cons[0].d;
info = registered_fb[0];
- if (!vc || !info || info->var.bits_per_pixel != 16)
+ if (!vc || !info || info->var.bits_per_pixel < 16)
return;
#ifdef CONFIG_PROC_FS
splash_proc_register();
@@ -969,10 +941,8 @@
mem = vmalloc(len);
if (mem) {
- acquire_console_sem();
- if ((int)sys_read(fd, mem, len) == len && splash_getraw((unsigned char *)mem, (unsigned char *)mem + len, (int *)0) == 0 && vc->vc_splash_data)
+ if ((int)sys_read(fd, mem, len) == len && splash_getraw((unsigned char *)mem, (unsigned char *)mem + len) == 0 && vc->vc_splash_data)
vc->vc_splash_data->splash_state = splash_default & 1;
- release_console_sem();
vfree(mem);
}
sys_close(fd);
diff -Naur linux-2.6.26-rc8.orig/drivers/video/bootsplash/bootsplash.h linux-2.6.26-rc8/drivers/video/bootsplash/bootsplash.h
--- linux-2.6.26-rc8.orig/drivers/video/bootsplash/bootsplash.h 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/bootsplash/bootsplash.h 2008-06-28 11:39:30.000000000 +0200
@@ -22,14 +22,14 @@
const unsigned short *s, int count, int ypos, int xpos);
extern void splash_putc(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
int c, int ypos, int xpos);
-extern void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes);
+extern void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes, int depth);
extern void splash_clear(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width);
extern void splash_bmove(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width);
extern void splash_clear_margins(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
int bottom_only);
-extern int splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor);
+extern void splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor);
extern void splash_bmove_redraw(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
int y, int sx, int dx, int width);
extern void splash_blank(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
diff -Naur linux-2.6.26-rc8.orig/drivers/video/bootsplash/decode-jpg.c linux-2.6.26-rc8/drivers/video/bootsplash/decode-jpg.c
--- linux-2.6.26-rc8.orig/drivers/video/bootsplash/decode-jpg.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/bootsplash/decode-jpg.c 2008-06-28 11:39:30.000000000 +0200
@@ -86,6 +86,7 @@
static void col221111 __P((int *, unsigned char *, int));
static void col221111_16 __P((int *, unsigned char *, int));
+static void col221111_32 __P((int *, unsigned char *, int));
/*********************************/
@@ -261,7 +262,7 @@
int mcusx, mcusy, mx, my;
int max[6];
- if (!decdata || !buf || !pic)
+ if (!decdata)
return -1;
datap = buf;
if (getbyte() != 0xff)
@@ -369,6 +370,9 @@
idct(decdata->dcts + 320, decdata->out + 320, decdata->dquant[2], IFIX(0.5), max[5]);
switch (depth) {
+ case 32:
+ col221111_32(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 4, mcusx * 16 * 4);
+ break;
case 24:
col221111(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 3, mcusx * 16 * 3);
break;
@@ -843,9 +847,9 @@
#define PIC(yin, xin, p, xout) \
( \
y = outy[(yin) * 8 + xin], \
- STORECLAMP(p[(xout) * 3 + 0], y + cr), \
+ STORECLAMP(p[(xout) * 3 + 0], y + cb), \
STORECLAMP(p[(xout) * 3 + 1], y - cg), \
- STORECLAMP(p[(xout) * 3 + 2], y + cb) \
+ STORECLAMP(p[(xout) * 3 + 2], y + cr) \
)
#ifdef __LITTLE_ENDIAN
@@ -882,6 +886,15 @@
#endif
#endif
+#define PIC_32(yin, xin, p, xout) \
+( \
+ y = outy[(yin) * 8 + xin], \
+ STORECLAMP(p[(xout) * 4 + 0], y + cb), \
+ STORECLAMP(p[(xout) * 4 + 1], y - cg), \
+ STORECLAMP(p[(xout) * 4 + 2], y + cr), \
+ STORECLAMP(p[(xout) * 4 + 3], 0) \
+)
+
#define PIC221111(xin) \
( \
CBCRCG(0, xin), \
@@ -900,6 +913,15 @@
PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2) \
)
+#define PIC221111_32(xin) \
+( \
+ CBCRCG(0, xin), \
+ PIC_32(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \
+ PIC_32(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \
+ PIC_32(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \
+ PIC_32(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \
+)
+
static void col221111(out, pic, width)
int *out;
unsigned char *pic;
@@ -955,3 +977,31 @@
outy += 64 * 2 - 16 * 4;
}
}
+
+static void col221111_32(out, pic, width)
+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_32(k);
+ }
+ outc += 8;
+ outy += 16;
+ pic0 += 2 * width;
+ pic1 += 2 * width;
+ }
+ outy += 64 * 2 - 16 * 4;
+ }
+}
diff -Naur linux-2.6.26-rc8.orig/drivers/video/bootsplash/Kconfig linux-2.6.26-rc8/drivers/video/bootsplash/Kconfig
--- linux-2.6.26-rc8.orig/drivers/video/bootsplash/Kconfig 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/bootsplash/Kconfig 2008-06-28 11:39:30.000000000 +0200
@@ -6,7 +6,7 @@
config BOOTSPLASH
bool "Bootup splash screen"
- depends on FRAMEBUFFER_CONSOLE && FB_VESA
+ depends on FRAMEBUFFER_CONSOLE=y && BLK_DEV_INITRD=y
default n
---help---
This option enables the Linux bootsplash screen. For more
diff -Naur linux-2.6.26-rc8.orig/drivers/video/bootsplash/render.c linux-2.6.26-rc8/drivers/video/bootsplash/render.c
--- linux-2.6.26-rc8.orig/drivers/video/bootsplash/render.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/bootsplash/render.c 2008-06-28 11:39:30.000000000 +0200
@@ -20,7 +20,7 @@
int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
u8 *src;
u8 *dst, *splashsrc;
- unsigned int d, x, y;
+ unsigned int d, x, y, Bpp = info->var.bits_per_pixel >> 3;
u32 dd, fgx, bgx;
u16 c = scr_readw(s);
@@ -30,8 +30,8 @@
transparent = sd->splash_color == bg_color;
xpos = xpos * vc->vc_font.width + sd->splash_text_xo;
ypos = ypos * vc->vc_font.height + sd->splash_text_yo;
- splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * 2);
- dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * 2);
+ splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * Bpp);
+ dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * Bpp);
fgx = ((u32 *)info->pseudo_palette)[fg_color];
if (transparent && sd->splash_color == 15) {
@@ -50,28 +50,42 @@
src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * ((vc->vc_font.width + 7) >> 3);
for (y = 0; y < vc->vc_font.height; y++) {
- for (x = 0; x < vc->vc_font.width; x += 2) {
+ for (x = 0; x < vc->vc_font.width; x++) {
if ((x & 7) == 0)
d = *src++;
- if (d & 0x80)
- dd = fgx;
- else
- dd = transparent ? *(u16 *)splashsrc : bgx;
- splashsrc += 2;
- if (d & 0x40)
- dd |= fgx << 16;
- else
- dd |= (transparent ? *(u16 *)splashsrc : bgx) << 16;
- splashsrc += 2;
- d <<= 2;
- fb_writel(dd, dst);
- dst += 4;
+ switch (info->var.bits_per_pixel) {
+ case 16:
+ if (d & 0x80)
+ dd = fgx;
+ else
+ dd = transparent ? *(u16 *)splashsrc : bgx;
+ fb_writew(dd, dst);
+ break;
+ case 24:
+ if (d & 0x80)
+ dd = fgx;
+ else
+ dd = transparent ? *(u32 *)splashsrc >> 8 : bgx;
+ fb_writeb(dd >> 16, dst);
+ fb_writew(dd & 0xFFFF, dst+1);
+ break;
+ case 32:
+ if (d & 0x80)
+ dd = fgx;
+ else
+ dd = transparent ? *(u32 *)splashsrc : bgx;
+ fb_writel(dd, dst);
+ break;
+ }
+ splashsrc += Bpp;
+ dst += Bpp;
+ d <<= 1;
}
- dst += info->fix.line_length - vc->vc_font.width * 2;
- splashsrc += info->splash_bytes - vc->vc_font.width * 2;
+ dst += info->fix.line_length - vc->vc_font.width * Bpp;
+ splashsrc += info->splash_bytes - vc->vc_font.width * Bpp;
}
- dst -= info->fix.line_length * vc->vc_font.height - vc->vc_font.width * 2;
- splashsrc -= info->splash_bytes * vc->vc_font.height - vc->vc_font.width * 2;
+ dst -= info->fix.line_length * vc->vc_font.height - vc->vc_font.width * Bpp;
+ splashsrc -= info->splash_bytes * vc->vc_font.height - vc->vc_font.width * Bpp;
}
}
@@ -80,10 +94,10 @@
int transparent = sd->splash_color == bg_color;
u32 dd, fgx, bgx;
u8 *dst, *splashsrc;
- unsigned int d, x, y;
+ unsigned int d, x, y, Bpp = info->var.bits_per_pixel >> 3;
- splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * 2);
- dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * 2);
+ splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * Bpp);
+ dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * Bpp);
fgx = ((u32 *)info->pseudo_palette)[fg_color];
if (transparent && sd->splash_color == 15) {
if (fgx == 0xffea)
@@ -96,25 +110,39 @@
bgx = ((u32 *)info->pseudo_palette)[bg_color];
d = 0;
for (y = 0; y < height; y++) {
- for (x = 0; x < width; x += 2) {
+ for (x = 0; x < width; x++) {
if ((x & 7) == 0)
d = *src++;
- if (d & 0x80)
- dd = fgx;
- else
- dd = transparent ? *(u16 *)splashsrc : bgx;
- splashsrc += 2;
- if (d & 0x40)
- dd |= fgx << 16;
- else
- dd |= (transparent ? *(u16 *)splashsrc : bgx) << 16;
- splashsrc += 2;
- d <<= 2;
- fb_writel(dd, dst);
- dst += 4;
+ switch (info->var.bits_per_pixel) {
+ case 16:
+ if (d & 0x80)
+ dd = fgx;
+ else
+ dd = transparent ? *(u16 *)splashsrc : bgx;
+ fb_writew(dd, dst);
+ break;
+ case 24:
+ if (d & 0x80)
+ dd = fgx;
+ else
+ dd = transparent ? *(u32 *)splashsrc >> 8 : bgx;
+ fb_writeb(dd >> 16, dst);
+ fb_writew(dd & 0xFFFF, dst+1);
+ break;
+ case 32:
+ if (d & 0x80)
+ dd = fgx;
+ else
+ dd = transparent ? *(u32 *)splashsrc : bgx;
+ fb_writel(dd, dst);
+ break;
+ }
+ splashsrc += Bpp;
+ dst += Bpp;
+ d <<= 1;
}
- dst += info->fix.line_length - width * 2;
- splashsrc += info->splash_bytes - width * 2;
+ dst += info->fix.line_length - width * Bpp;
+ splashsrc += info->splash_bytes - width * Bpp;
}
}
@@ -130,21 +158,20 @@
splash_renderc(sd, info, attr_fgcol(fgshift, c), attr_bgcol(bgshift, c), src, ypos, xpos, vc->vc_font.height, vc->vc_font.width);
}
-void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes)
+void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes, int depth)
{
int i;
while (height-- > 0) {
u32 *p = (u32 *)dst;
u32 *q = (u32 *)src;
- for (i=0; i < width/4; i++) {
- fb_writel(*q++,p++);
- fb_writel(*q++,p++);
- }
- if (width & 2)
+ u8 *r, *s;
+ for (i=0; i < (depth>>3)*width/4; i++)
fb_writel(*q++,p++);
- if (width & 1)
- fb_writew(*(u16*)q,(u16*)p);
+ r = (u8 *)p;
+ s = (u8 *)q;
+ for (i=0; i < (depth>>3)*(width&3); i++)
+ fb_writeb(*s++,r++);
dst += dstbytes;
src += srcbytes;
}
@@ -169,7 +196,7 @@
}
static void splashfill(struct fb_info *info, int sy, int sx, int height, int width) {
- splashcopy((u8 *)(info->screen_base + sy * info->fix.line_length + sx * 2), (u8 *)(info->splash_pic + sy * info->splash_bytes + sx * 2), height, width, info->fix.line_length, info->splash_bytes);
+ splashcopy((u8 *)(info->screen_base + sy * info->fix.line_length + sx * (info->var.bits_per_pixel>>3)), (u8 *)(info->splash_pic + sy * info->splash_bytes + sx * (info->var.bits_per_pixel>>3)), height, width, info->fix.line_length, info->splash_bytes, info->var.bits_per_pixel);
}
void splash_clear(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy,
@@ -189,7 +216,7 @@
splashfill(info, sy, sx, height, width);
return;
}
- dst = (u8 *)(info->screen_base + sy * info->fix.line_length + sx * 2);
+ dst = (u8 *)(info->screen_base + sy * info->fix.line_length + sx * (info->var.bits_per_pixel>>3));
bgx = ((u32 *)info->pseudo_palette)[bg_color];
splashset(dst, height, width, info->fix.line_length, bgx);
}
@@ -231,38 +258,53 @@
splashfill(info, sd->splash_text_yo + th, 0, info->var.yres - sd->splash_text_yo - th, info->var.xres);
}
-int splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor)
+void splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor)
{
int i;
unsigned int dsize, s_pitch;
- if (info->state != FBINFO_STATE_RUNNING)
- return 0;
-
- s_pitch = (cursor->image.width + 7) >> 3;
+ if (cursor->set & FB_CUR_SETSIZE) {
+ info->cursor.image.height = cursor->image.height;
+ info->cursor.image.width = cursor->image.width;
+ }
+ if (cursor->set & FB_CUR_SETPOS) {
+ info->cursor.image.dx = cursor->image.dx;
+ info->cursor.image.dy = cursor->image.dy;
+ }
+ if (cursor->set & FB_CUR_SETHOT)
+ info->cursor.hot = cursor->hot;
+ if (cursor->set & FB_CUR_SETCMAP) {
+ if (cursor->image.depth == 1) {
+ info->cursor.image.bg_color = cursor->image.bg_color;
+ info->cursor.image.fg_color = cursor->image.fg_color;
+ } else if (cursor->image.cmap.len) {
+ fb_copy_cmap(&cursor->image.cmap, &info->cursor.image.cmap);
+ }
+ info->cursor.image.depth = cursor->image.depth;
+ }
+ s_pitch = (info->cursor.image.width + 7) >> 3;
dsize = s_pitch * cursor->image.height;
- if (cursor->enable) {
- switch (cursor->rop) {
+ if (info->cursor.enable) {
+ switch (info->cursor.rop) {
case ROP_XOR:
for (i = 0; i < dsize; i++)
- info->fb_cursordata[i] = cursor->image.data[i] ^ cursor->mask[i];
+ info->fb_cursordata[i] = cursor->image.data[i] ^ info->cursor.mask[i];
break;
case ROP_COPY:
default:
for (i = 0; i < dsize; i++)
- info->fb_cursordata[i] = cursor->image.data[i] & cursor->mask[i];
+ info->fb_cursordata[i] = cursor->image.data[i] & info->cursor.mask[i];
break;
}
} else if (info->fb_cursordata != cursor->image.data)
memcpy(info->fb_cursordata, cursor->image.data, dsize);
- cursor->image.data = info->fb_cursordata;
- splash_renderc(sd, info, cursor->image.fg_color, cursor->image.bg_color, (u8 *)info->fb_cursordata, cursor->image.dy + sd->splash_text_yo, cursor->image.dx + sd->splash_text_xo, cursor->image.height, cursor->image.width);
- return 0;
+ info->cursor.image.data = info->fb_cursordata;
+ splash_renderc(sd, info, info->cursor.image.fg_color, info->cursor.image.bg_color, (u8 *)info->fb_cursordata, info->cursor.image.dy + sd->splash_text_yo, info->cursor.image.dx + sd->splash_text_xo, info->cursor.image.height, info->cursor.image.width);
}
void splash_bmove_redraw(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width)
{
- unsigned short *d = (unsigned short *) (vc->vc_origin + vc->vc_size_row * y + dx * 2);
+ unsigned short *d = (unsigned short *) (vc->vc_origin + vc->vc_size_row * y + dx * (info->var.bits_per_pixel>>3));
unsigned short *s = d + (dx - sx);
unsigned short *start = d;
unsigned short *ls = d;
diff -Naur linux-2.6.26-rc8.orig/drivers/video/console/bitblit.c linux-2.6.26-rc8/drivers/video/console/bitblit.c
--- linux-2.6.26-rc8.orig/drivers/video/console/bitblit.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/console/bitblit.c 2008-06-28 11:39:30.000000000 +0200
@@ -388,6 +388,10 @@
switch (mode) {
case CM_ERASE:
ops->cursor_state.enable = 0;
+#ifdef CONFIG_BOOTSPLASH
+ if (info->splash_data)
+ splash_cursor(info->splash_data, info, &cursor);
+#endif
break;
case CM_DRAW:
case CM_MOVE:
diff -Naur linux-2.6.26-rc8.orig/drivers/video/console/fbcon.c linux-2.6.26-rc8/drivers/video/console/fbcon.c
--- linux-2.6.26-rc8.orig/drivers/video/console/fbcon.c 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/drivers/video/console/fbcon.c 2008-06-28 11:39:30.000000000 +0200
@@ -417,6 +417,14 @@
return;
}
+#ifdef CONFIG_BOOTSPLASH
+ if (info->splash_data) {
+ splash_cursor(info->splash_data, info, &info->cursor);
+ release_console_sem();
+ return;
+ }
+#endif
+
p = &fb_display[vc->vc_num];
c = scr_readw((u16 *) vc->vc_pos);
mode = (!ops->cursor_flash || ops->cursor_state.enable) ?
@@ -1111,7 +1119,11 @@
struct vc_data **default_mode = vc->vc_display_fg;
struct vc_data *svc = *default_mode;
struct display *t, *p = &fb_display[vc->vc_num];
+#ifdef CONFIG_BOOTSPLASH
+ int logo = 0, new_rows, new_cols, rows, cols, charcnt = 256;
+#else
int logo = 1, new_rows, new_cols, rows, cols, charcnt = 256;
+#endif
int cap;
if (info_idx == -1 || info == NULL)
@@ -1348,6 +1360,12 @@
struct display *p = &fb_display[vc->vc_num];
struct fbcon_ops *ops = info->fbcon_par;
+#ifdef CONFIG_BOOTSPLASH
+ if (info->splash_data) {
+ splash_putcs(info->splash_data, vc, info, s, count, ypos, xpos);
+ return;
+ }
+#endif
if (!fbcon_is_inactive(vc, info))
ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
get_color(vc, info, scr_readw(s), 1),
@@ -1396,6 +1414,14 @@
y = 0;
}
+#ifdef CONFIG_BOOTSPLASH
+ if (info->splash_data) {
+ splash_cursor(info->splash_data, info, &info->cursor);
+ vbl_cursor_cnt = CURSOR_DRAW_DELAY;
+ return;
+ }
+#endif
+
ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1),
get_color(vc, info, c, 0));
vbl_cursor_cnt = CURSOR_DRAW_DELAY;
diff -Naur linux-2.6.26-rc8.orig/include/linux/fb.h linux-2.6.26-rc8/include/linux/fb.h
--- linux-2.6.26-rc8.orig/include/linux/fb.h 2008-06-28 11:37:36.000000000 +0200
+++ linux-2.6.26-rc8/include/linux/fb.h 2008-06-28 11:39:30.000000000 +0200
@@ -808,6 +808,7 @@
struct fb_var_screeninfo var; /* Current var */
struct fb_fix_screeninfo fix; /* Current fix */
struct fb_monspecs monspecs; /* Current Monitor specs */
+ struct fb_cursor cursor; /* Current cursor */
struct work_struct queue; /* Framebuffer event queue */
struct fb_pixmap pixmap; /* Image hardware mapper */
struct fb_pixmap sprite; /* Cursor hardware mapper */
diff -Naur linux-2.6.26-rc8.orig/kernel/panic.c linux-2.6.26-rc8/kernel/panic.c
--- linux-2.6.26-rc8.orig/kernel/panic.c 2008-06-28 11:36:27.000000000 +0200
+++ linux-2.6.26-rc8/kernel/panic.c 2008-06-28 11:39:30.000000000 +0200
@@ -109,6 +109,12 @@
* We can't use the "normal" timers since we just panicked..
*/
printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
+#ifdef CONFIG_BOOTSPLASH
+ {
+ extern int splash_verbose(void);
+ (void)splash_verbose();
+ }
+#endif
for (i = 0; i < panic_timeout*1000; ) {
touch_nmi_watchdog();
i += panic_blink(i);
@@ -133,6 +139,12 @@
disabled_wait(caller);
#endif
local_irq_enable();
+#ifdef CONFIG_BOOTSPLASH
+ {
+ extern int splash_verbose(void);
+ (void)splash_verbose();
+ }
+#endif
for (i = 0;;) {
touch_softlockup_watchdog();
i += panic_blink(i);

View File

@ -1,21 +0,0 @@
* allow bootsplash to work on non-vesa fb drivers
but check we have valid vc pointer.
Index: linux-2.6.16/drivers/video/bootsplash/bootsplash.c
===================================================================
--- linux-2.6.16.orig/drivers/video/bootsplash/bootsplash.c 2006-03-20 18:43:54.000000000 +0100
+++ linux-2.6.16/drivers/video/bootsplash/bootsplash.c 2006-03-20 18:46:53.000000000 +0100
@@ -548,11 +548,11 @@
printk(KERN_INFO " found, but has oversized text area!\n");
return -1;
}
-/* if (!vc_cons[unit].d || info->fbops != &vesafb_ops) {
+ if (!vc_cons[unit].d) {
splash_free(vc, info);
printk(KERN_INFO " found, but framebuffer can't handle it!\n");
return -1;
- } */
+ }
printk(KERN_INFO "...found (%dx%d, %d bytes, v%d).\n", width, height, splash_size, version);
if (version == 1) {
printk(KERN_WARNING "bootsplash: Using deprecated v1 header. Updating your splash utility recommended.\n");

View File

@ -1,16 +0,0 @@
* fix gcc4 compliation - "error: invalid lvalue in increment"
Index: linux-2.6.16/drivers/video/bootsplash/bootsplash.c
===================================================================
--- linux-2.6.16.orig/drivers/video/bootsplash/bootsplash.c 2006-03-20 18:46:53.000000000 +0100
+++ linux-2.6.16/drivers/video/bootsplash/bootsplash.c 2006-03-20 18:46:57.000000000 +0100
@@ -268,7 +268,8 @@
i = ((CLAMP(r + add*2+1) & 0xf8) << 8) |
((CLAMP(g + add ) & 0xfc) << 3) |
((CLAMP(b + add*2+1) ) >> 3);
- *((unsigned short *)picp)++ = i;
+ *((unsigned short *)picp) = i;
+ picp = (unsigned char *)((unsigned short *)picp + 1);
add ^= 3;
break;
case 24:

View File

@ -1 +1 @@
http://eu.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.29-rc8.tar.bz2
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.tar.bz2

View File

@ -1 +1 @@
http://xorg.freedesktop.org/releases/individual/driver/xf86-input-evdev-2.1.99.1.tar.bz2
http://xorg.freedesktop.org/archive/individual/driver/xf86-input-evdev-2.2.1.tar.bz2