Xorg on Fujitsu "Lime" with MPC5200b?

Bill Gatliff bgat at billgatliff.com
Fri Apr 16 12:51:38 EST 2010

Roman Fietze wrote:
> Yes. I added a routine like
> /* Swap frame buffer bytes in 32 bit value.  */
> static __inline unsigned int
> fbbits_swap32(unsigned int __bsx)
> {
>     return ((((__bsx) & 0xff000000) >> 8) | (((__bsx) & 0x00ff0000) << 8) |
> 	    (((__bsx) & 0x0000ff00) >> 8) | (((__bsx) & 0x000000ff) << 8));
> }

I baked the above code into shadowUpdatePacked(), and it didn't seem to
help anything--- my icewm mouse cursor was still quite jagged, as was
all the text on the screen (clock widget, etc).  So I replaced the above
code with a return 0, and the icewm desktop went completely black--- and
everything else remained unchanged.

Apparently, there are several similar modifications that need to be
made, i.e. the shadowUpdatePacked() function isn't the only way to the
framebuffer memory?  I'm really looking forward to seeing your code, as
I have no idea how to even identify the places that need hacking.  I
understand the utility of the hack, however.

Makes me think that we're all just soldering this chip down to the wrong
data lines, and makes me wonder if there isn't an "endianness bit" in
the memory bus controller that can undo this damage for us.  I know I've
seen such a bit in other SoCs...



Bill Gatliff
bgat at billgatliff.com

More information about the Linuxppc-dev mailing list