I have a question about:ppc pci and frame_buffer

Erik Christiansen erik at dd.nec.com.au
Thu Jul 26 19:11:10 EST 2007


On Thu, Jul 26, 2007 at 03:58:04PM +0800, ???? ?? wrote:
>   here below is what i want :
>   #################################################
>   0..................7  8............15 16..............24 25.................31 
>            B                    G                   R                TRANS
>   now it is this:
>   #################################################
>   0..................7  8............15 16..............24 25.................31 
>         TRANS               R                   G                   B

In U-boot, there is what you might do yourself, perhaps:

#define LONGSWAP(x) ((((x) & 0x000000ff) << 24) | (((x) & 0x0000ff00) << 8)|\
           (((x) & 0x00ff0000) >>  8) | (((x) & 0xff000000) >> 24) )
#define PCISWAP(x)   LONGSWAP(x)

Any good for your purpose?

Erik


More information about the Linuxppc-embedded mailing list