framebuffer swap endianess
Hi, i'm angelo.
I have just create a framebuffer for an embedded system:
- powerpc (little endian) with a GPU (big endian).
I'm working on linux 2.6.22
When i try to execute Xfbdev, it starts but with wrong colors.
I need to swap the RGB format (RRRRRGGGGGGBBBBB) to BGR, respecting the endianess (GGGRRRRRBBBBBGGG).
I know that X loads with some ioctl, the principal settings through framebuffer. But i'm not sure if framebuffer can inform it on the RGB format.
I also tried to change something on cmap, but nothing changes on display;
So, i hope you can help me.
Many thanks.
---------------------------------
---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
Quoted 4 lines · On Tue, 22 Jan 2008 16:46:47 +0100 (CET) Angelo <[email protected]> wrote:
Hi, i'm angelo.
I have just create a framebuffer for an embedded system:
- powerpc (little endian) with a GPU (big endian).
I think you have those backwards? PowerPC is big-endian...
josh
Hello ANgelo,
Quoted 2 lines · On Tuesday 22 January 2008 16:46:47 Angelo wrote:
I have just create a framebuffer for an embedded system:
- powerpc (little endian) with a GPU (big endian).
Are you sure? Isn't it the other way around?
Quoted 3 lines
When i try to execute Xfbdev, it starts but with wrong colors. I need to swap the RGB format (RRRRRGGGGGGBBBBB) to BGR, respecting the endianess (GGGRRRRRBBBBBGGG).
We modified the X Server and swapped when transferring from the shadow buffer to the video buffer. That cured all our problems. This was on the 2.4.25 from DENX and with Xfree86.
Other modifications like changing the RGB masks for the display/screen only helped partwise, because some applications just ignored that when using some image formats.
Roman
=2D-=20
Roman Fietze Telemotive AG B=FCro M=FChlhausen
Quoted 8 lines · Roman Fietze
Hello ANgelo,
Quoted 2 lines · On Tuesday 22 January 2008 16:46:47 Angelo wrote:
I have just create a framebuffer for an embedded system:
- powerpc (little endian) with a GPU (big endian).Are you sure? Isn't it the other way around?
we are sure. Linux only supports PPC in big endian mode.
- k