--- vger/drivers/video/fbcon.c Wed Dec 2 12:41:05 1998
+++ linux/drivers/video/fbcon.c Fri Dec 4 23:08:30 1998
@@ -945,6 +945,7 @@
int unit = conp->vc_num;
struct display *p = &fb_display[unit];
int scroll_partial = !(p->scrollmode & __SCROLL_YNOPARTIAL);
+ int logos_left = 0; int logos_width = conp->vc_cols;
if (!p->can_soft_blank && console_blanked)
return 0;
@@ -962,22 +963,34 @@
switch (dir) {
case SM_UP:
+ /* K.Garloff@ping.de, 98/10/21: If logo is diplayed, only save logo
+ * and not the hole top region. In combination with the logo being
+ * displayed on the right side, this allows scrollback feature
+ * when bootlogo is displayed. */
+ if (t != 0 && logo_shown == fg_console) {
+ struct display *p = &fb_display[unit];
+ int lw = (smp_num_cpus * (LOGO_W + 8) - 7) / fontwidth(p) + 1;
+ logos_left = conp->vc_cols - lw;
+ while (logos_left < 0) logos_left += (LOGO_W + 8 - 7) / fontwidth(p);
+ logos_width = conp->vc_cols - logos_left;
+ }
if (count > conp->vc_rows) /* Maximum realistic size */
count = conp->vc_rows;
switch (p->scrollmode & __SCROLL_YMASK) {
case __SCROLL_YMOVE:
- p->dispsw->bmove(p, t+count, 0, t, 0, b-t-count,
+ if (t > 0) p->dispsw->bmove(p, 0, logos_left, count,
+ logos_left, t, logos_width);
+ p->dispsw->bmove(p, count, 0, 0, 0, b-count,
conp->vc_cols);
- p->dispsw->clear(conp, p, b-count, 0, count,
+ p->dispsw->clear(conp, p, b-count, 0, count,
conp->vc_cols);
break;
case __SCROLL_YWRAP:
- if (b-t-count > 3*conp->vc_rows>>2) {
+ if (b-t-count > 2*conp->vc_rows/3) {
if (t > 0)
- fbcon_bmove(conp, 0, 0, count, 0, t,
- conp->vc_cols);
- ywrap_up(unit, conp, p, count);
+ fbcon_bmove(conp, 0, logos_left, count, logos_left, t, logos_width);
+ ywrap_up(unit, conp, p, count);
if (conp->vc_rows-b > 0)
fbcon_bmove(conp, b-count, 0, b, 0,
conp->vc_rows-b, conp->vc_cols);
@@ -991,10 +1004,10 @@
case __SCROLL_YPAN:
if (( !scroll_partial && (b-t == conp->vc_rows)) ||
- ( scroll_partial && (b-t-count > 3*conp->vc_rows>>2))) {
+ ( scroll_partial && (b-t-count > 2*conp->vc_rows/3))) {
if (t > 0)
- fbcon_bmove(conp, 0, 0, count, 0, t,
- conp->vc_cols);
+ fbcon_bmove(conp, 0, logos_left, count, logos_left, t,
+ logos_width);
ypan_up(unit, conp, p, count);
if (conp->vc_rows-b > 0)
fbcon_bmove(conp, b-count, 0, b, 0,
@@ -1664,8 +1659,8 @@
logo_depth = 1;
}
- for (x = 0; x < smp_num_cpus * (LOGO_W + 8) &&
- x < p->var.xres - (LOGO_W + 8); x += (LOGO_W + 8)) {
+ for (x = p->var.xres - LOGO_W; x > 0 && x > (int)p->var.xres
+ - smp_num_cpus * (LOGO_W + 8); x -= (LOGO_W + 8)) {
#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB24) || \
defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FB_SBUS)
@@ -1768,6 +1763,20 @@
done = 1;
}
#endif
+#if defined(CONFIG_FBCON_CFB4)
+ if (depth == 4 && p->type == FB_TYPE_PACKED_PIXELS) {
+ src = logo;
+ for( y1 = 0; y1 < LOGO_H; y1++) {
+ dst = fb + y1*line + x/2;
+ for( x1 = 0; x1 < LOGO_W/2; x1++) {
+ u8 q = *src++;
+ q = (q << 4) | (q >> 4);
+ *dst++ = q;
+ }
+ }
+ done = 1;
+ }
+#endif
#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FB_SBUS)
if (depth == 8 && p->type == FB_TYPE_PACKED_PIXELS) {
/* depth 8 or more, packed, with color registers */
@@ -1862,6 +1871,9 @@
/* Modes not yet supported: packed pixels with depth != 8 (does such a
* thing exist in reality?) */
+ /* logo palette is shared with console palette if depth <= 4 */
+ if (done && (depth == 4))
+ mdelay(20000);
return done ? (LOGO_H + fontheight(p) - 1) / fontheight(p) : 0 ;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/