Geert Uytterhoeven wrote:
On Mon, 21 Aug 2000, Michel [iso-8859-1] Dänzer wrote:
quoted
That's not even needed, the fbdev driver is just broken. Line 430:
pScrn->displayWidth = pScrn->virtualX; /* FIXME: might be wrong */
is indeed wrong. virtualX is obvious, but displayWidth should be the
memory pitch of a scanline.
Now you just have to find out where to get the correct value for
displayWidth.
I suppose
if (fix.line_length)
pScrn->displayWidth = fix.line_length*8/var.bits_per_pixel;
else
pScrn->displayWidth = var.xres_virtual;
should work fine, except on hardware were
fix.line_length*8/var.bits_per_pixel might not be integer (e.g. if
1280x1024x24 mode requires a line_length of 4096).
I've thought of this as well. The problem is that the mode hasn't been
initialized when displayWidth is set and used.
The best I can think of ATM is the attached patch. This should make it work
with ShadowFB, which is on by default anyway.
Michel
--
Earthling Michel Dänzer (MrCooper) \ CS student and free software enthusiast
Debian GNU/Linux (powerpc,i386) user \ member of XFree86 and The DRI Project