Xorg on Fujitsu "Lime" with MPC5200b?

Michel Dänzer michel at daenzer.net
Fri Apr 16 18:30:23 EST 2010


On Fre, 2010-04-16 at 08:14 +0200, Roman Fietze wrote: 
> 
> On Thursday 15 April 2010 18:07:03 Bill Gatliff wrote:
> 
> > I would love it if you posted your code! Thanks!!
> 
> In this source file I just added my own routines:
> 
> Index: programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c
> ===================================================================
> --- programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c   (revision 6)
> +++ programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.c   (revision 7)
> @@ -139,8 +139,8 @@
>         "shadowInit",
>         "shadowSetup",
>         "shadowUpdatePacked",
> -       "shadowUpdatePackedSwapped16Weak",
> -       "shadowUpdatePackedSwapped32Weak",
> +       "shadowUpdatePackedSwapped16",
> +       "shadowUpdatePackedSwapped32",
>         "shadowUpdateRotatePacked",
>         NULL
>  };
> @@ -619,6 +619,7 @@
>         ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
>         FBDevPtr fPtr = FBDEVPTR(pScrn);
>         VisualPtr visual;
> +       ShadowUpdateProc pupdate;
>         int init_picture = 0;
>         int ret,flags,width,height;
>  
> @@ -794,7 +795,7 @@
>                 xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
>                            "RENDER extension initialisation failed.\n");
>  
> -       pupdate = pScrn->bitsPerPixel > 16 ? shadowUpdatePackedSwapped32Weak() :
>  shadowUpdatePackedSwapped16Weak();
> +       pupdate = pScrn->bitsPerPixel > 16 ? shadowUpdatePackedSwapped32 : shado
> wUpdatePackedSwapped16;
>  
>         if (fPtr->shadowFB && 
>             (!shadowSetup(pScreen) || !shadowAdd(pScreen, NULL,

I hope you're aware that this really just hacks around the kernel
framebuffer device not exposing the framebuffer to userspace according
to the fbdev interface (see struct fb_bitfield
in /usr/include/linux/fb.h), and this will affect everything else using
the framebuffer device as well.

It would be better to handle this in the kernel framebuffer device,
either via hardware byte swapping facilities if available, or otherwise
e.g. via FB_DEFERRED_IO.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the Linuxppc-dev mailing list