i have a question about:ppc pci and frame_buffer

2 messages, 2 authors, 2007-07-26 · open the first message on its own page

i have a question about:ppc pci and frame_buffer

From: 利平 张 <hidden>
Date: 2007-07-26 08:04:45

now i have a question:
  i know ppc is big_endian and pci bus is little_endian.i made a graphics pci card use big_endian.
  when i use graphics card to show QT 's picture through VGA ,the color is not what i wanted, it's inversed ,others are in right position.
  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
  #################################################
   
  through mmap, the ppc display the screen color through direct pci bus control ,how can i change it?? 
  change kernel?? (i don't know where to change)
  or change others?? 

       
---------------------------------
抢注雅虎免费邮箱3.5G容量,20M附件! 

Re: I have a question about:ppc pci and frame_buffer

From: Erik Christiansen <hidden>
Date: 2007-07-26 09:03:39

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help