2.1.131: matroxfb boot logo hides important messages

Petr Vandrovec Ing. VTEI (VANDROVE@vc.cvut.cz)
Mon, 7 Dec 1998 17:29:22 MET-1


Hello Jamie,
on Mon, 7 Dec 1998, 03:14:04 +0000, you wrote:
> The first thing I noticed is the resolution is much lower than when I
> boot using the standard VGA console. Oh well, fair enough I have to set
> the resolution differently. I won't though, because I don't really use
> console mode for anything.
I choose default 640x480x8bpp. It is larger than default 80x25 - it is
80x28. I choose it because of there are monitors which are capable of
handling only 640x400 and 640x480 at 70 resp. 60 Hz. Nothing stops you
from specifying video=matrox:vesa:0x11C at boot commandline (or, if you
prefer text mode and you have access to not-yet-released driver version,
video=matrox:vesa:0x10C (for 132x60 textmode compatible with svgalib).
> The second thing is the boot logo. It is on the left, and obscures the
> first characters of the first three lines of messages. These three
> lines are the ones not scrolled while the rest of the messages scroll
> by.
There is (included) patch from Kurt Garloff which I'm using on my systems
(together with endian-swap for fonts wider than 8 pixels and some others).
(when applying, do not worry about line offsets, it is cut off from
larger patch).
> The first two lines are the pretty dull (but important) "booting
> linux-do_hdparm......." and something that really is dull.
There should be free space right to the logo. If there is such test, it
is bug.
> My opinion: Either put the messages to the right of the penguin, or put
> the penguin on the right hand side of the screen. I think I prefer the
> former (penguin on left, boot text and version number to right of him).
Patch moves penguin to the right side of screen. There is one penguin per
CPU, so it could cause major headache if you have (for example) 15 CPU -
each penguin consumes 5 character columns, whole it consumes 75 columns.
So 5 columns left here for text, if I understand you correctly.
> And maybe the non-scrolling all-important version message could have a
> line to itself, moving all the compiler-version, built-time etc. to the
> next line where it doesn't wrap 80 columns and can scroll away?
With patch, whole screen (except small right upper corner). It also enables
scrollback on boot messages. I posted it (together with Kurt) to Geert last
week, but I heard nothing from him until today.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

P.S.: I think that my mail client converts tabs into spaces, so if it does
not fit to your kernel, try "--ignore-whitespace" on patch commandline.
Full & working patch is available at
ftp://platan.vc.cvut.cz/pub/linux/*/widefont.gz, where "*" is 2.1.130-linus
or 2.1.130-cvs1202 or ... (you'll see).

--- 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/