Thread (28 messages) 28 messages, 10 authors, 2000-08-23

Re: Control fb problem on 8500

flat view

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2000-08-21 16:45:08

On Mon, 21 Aug 2000, Michel [iso-8859-1] Dänzer wrote:
Geert Uytterhoeven wrote:
quoted
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.
So the X server initializes the internal screen structures before it even knows
that it can use them later?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help