* i have a question about:ppc pci and frame_buffer
@ 2007-07-26 7:58 利平 张
2007-07-26 9:11 ` I " Erik Christiansen
0 siblings, 1 reply; 2+ messages in thread
From: 利平 张 @ 2007-07-26 7:58 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
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附件!
[-- Attachment #2: Type: text/html, Size: 1876 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: I have a question about:ppc pci and frame_buffer
2007-07-26 7:58 i have a question about:ppc pci and frame_buffer 利平 张
@ 2007-07-26 9:11 ` Erik Christiansen
0 siblings, 0 replies; 2+ messages in thread
From: Erik Christiansen @ 2007-07-26 9:11 UTC (permalink / raw)
To: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-26 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 7:58 i have a question about:ppc pci and frame_buffer 利平 张
2007-07-26 9:11 ` I " Erik Christiansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox