Re: Penguin logo and scrollback

Kurt Garloff (garloff@kg1.ping.de)
Tue, 24 Nov 1998 10:16:50 +0100


--vtzGhvizbBRQ85DL
Content-Type: text/plain; charset=us-ascii

On Tue, Nov 17, 1998 at 06:53:56PM +0000, Petr Vandrovec Ing. VTEI wrote:
> > I created a patch to fix this, some time ago. I posted it to Linux-Kernel,
> > but to my great astonishment, no one answered.
> OK... My comments are following:
> ...
> Except one problem above it works for me.

Hi Petr,

Thanks for your comments again.
I created a new version to meet your critisizm. Maybe you want to have a
look at it?

-- 
Kurt Garloff <K.Garloff@ping.de>  (Dortmund, FRG)
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff

--vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Description: 21129-logo-scroll.diff Content-Disposition: attachment; filename="21129-logo-scroll.diff"

--- linux/drivers/video/fbcon.c.orig Fri Oct 16 00:24:18 1998 +++ linux/drivers/video/fbcon.c Tue Nov 24 10:10:16 1998 @@ -942,6 +942,7 @@ int unit = conp->vc_num; struct display *p = &fb_display[unit]; int is_txt = (p->type == FB_TYPE_TEXT); + int logos_left = 0; int logos_width = conp->vc_cols; if (!p->can_soft_blank && console_blanked) return 0; @@ -959,22 +960,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); @@ -988,10 +1001,9 @@ case __SCROLL_YPAN: if (( is_txt && (b-t == conp->vc_rows)) || - (!is_txt && (b-t-count > 3*conp->vc_rows>>2))) { + (!is_txt && (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, @@ -1659,8 +1671,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)

--vtzGhvizbBRQ85DL--

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