Re: vesafb scrolling weirdness

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Sat, 11 Jul 1998 18:16:47 +0200 (MET DST)


> Have this one here to with the new 108b patches. Older versions work
> fine.
>
> vesafb does scrolling by redrawing the the whole screen from the
> shadow screen. Becauce most of the time the whole screen is scrolled
> and reading from video memory is slow, this works faster than memmove.
>
> It is possible to switch to memmove with "video=vesa:memmove" on the
> kernel command line. This fixes the problem, but slows down the console.
>
> The release notes for the patch list some "smart redraw scrolling",
> which probably does something like vesafb too. Seems these two
> optimations don't like each other...
>
> Maybe the generic fbcon code calles driver's scroll first and updates
> the shadow screen later on sometimes? Just a guess, hav'nt checked
> the code yet.

Yes, that is how is it done currently. The con_scroll routine is called
before the data is moved in the shadow memory, and it returns whether the
shadow memory should be scrolled afterwards or whether it has done it
itself.
I'm terribly sorry I forgot you do update_screen in bmove (which is not
right anyway, as bmove is used for insert_char and delete_char as well).
Does the following patch cure the problems you are seeing?
In fact, vesafb_bmove might be desirable to implement, but as update of the
region which is being moved only. I might implement some generic
fbcon_bmove_redraw, which drivers could use...

--- drivers/video/vesafb.c.jj Mon Jul 6 18:13:24 1998
+++ drivers/video/vesafb.c Sat Jul 11 18:08:27 1998
@@ -99,17 +99,6 @@
#define USE_MEMMOVE 2

static vesafb_scroll = USE_REDRAW;
-static struct display_switch vesafb_sw;
-
-void vesafb_bmove(struct display *p, int sy, int sx, int dy, int dx,
- int height, int width)
-{
- /*
- * this is really faster than memmove (at least with my box)
- * read access to video memory is slow...
- */
- update_screen(currcon);
-}

/* --------------------------------------------------------------------- */

@@ -209,6 +198,7 @@

vesafb_get_fix(&fix, con, 0);

+ memset(display, 0, sizeof(struct display));
display->screen_base = video_vbase;
display->visual = fix.visual;
display->type = fix.type;
@@ -241,11 +231,8 @@
display->dispsw = NULL;
break;
}
- if (vesafb_scroll == USE_REDRAW) {
- memcpy(&vesafb_sw,display->dispsw,sizeof(vesafb_sw));
- vesafb_sw.bmove = vesafb_bmove;
- display->dispsw = &vesafb_sw;
- }
+ if (vesafb_scroll == USE_REDRAW)
+ display->scrollmode = SCROLL_YREDRAW;
}

static int vesafb_set_var(struct fb_var_screeninfo *var, int con,

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.1.107 on a sparc64 machine (498.80 BogoMips).
___________________________________________________________________

-
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.altern.org/andrebalsa/doc/lkml-faq.html