On  29 Aug, this message from Michel Dänzer echoed through cyberspace:
> On Die, 2002-08-27 at 21:46, Michel Lanners wrote:
>> On  20 Aug, this message from Michel Dänzer echoed through cyberspace:
>> > This is probably a bug related to framebuffer offset and/or line length.
>> > Someone with unusual hardware (like you :) will have to debug that code.
>> > Maybe 4.2.0 works better though, you could try Branden's pre-packages.
>> 
>> Sorry for being lazy on this :-), but did you integrate my proposed
>> patch regarding a comparable issue with 'control' anywhere?
> 
> I seem to have lost it. Do you want to submit it, or resend it to me so
> I can?

I'd rather see you submit them, since you are more involved with X's
framebuffer stuff :-). I only sent the idea last time; a real patch is
attached below this time. It's 4.2 against a 4.1 version (so line
numbers may be off a bit...), but the important change is there :-)

For those that didn't follow the original discussion, this fixes 24 bpp
displays on the fbdev driver when not using shadowfb.

>> I said I'd do some more testing, but didn't come around to that....
> 
> It's not too late yet, is it? :)

No, but time is scarce still....

Cheers

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   [EMAIL PROTECTED]            |
http://www.cpu.lu/~mlan        |                     Learn Always. "
--- 
4.1.0-17/xfree86-4.1.0/build-tree/xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c
      Thu Jun 13 21:53:22 2002
+++ 
xfree86-4.2.0/build-tree/xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c   
    Thu Aug 29 21:18:34 2002
@@ -506,10 +522,13 @@
 
        if (fPtr->shadowFB)
                pScrn->displayWidth = pScrn->virtualX;  /* ShadowFB handles 
this correctly */
-       else
+       else {
+               int fbbpp;
                /* FIXME: this doesn't work for all cases, e.g. when each 
scanline
                        has a padding which is independent from the depth 
(controlfb) */
-               pScrn->displayWidth = 
fbdevHWGetLineLength(pScrn)/(fbdevHWGetDepth(pScrn) >> 3);
+               fbdevHWGetDepth(pScrn,&fbbpp);
+               pScrn->displayWidth = fbdevHWGetLineLength(pScrn)/(fbbpp >> 3);
+       }
 
        xf86PrintModes(pScrn);
 

Reply via email to