nanogui: framebuffer endianess
Subject:
Re: [nanogui] framebuffer endianess
From:
Matthias Fuchs ####@####.####
Date:
21 Jan 2008 13:00:20 -0000
Message-Id: <200801211359.05014.matthias.fuchs@esd-electronics.com>
On Friday 18 January 2008 21:03, Daniel Nyström wrote:
> You've got a "BIGENDIAN" choice in config-file. Tried that?
I set that to 'Y'.
For testing I modified the swapping macro from include/swap.h (to not do any swapping).
It has no impact on the colors on the framebuffer screen.
I grep'ed over the complete code and did not find a place where wswap is used
to swap any access to the framebuffer. The swapping macros are only used when
handling .bmp images.
For further testing I wrote a little tool that maps the framebuffer memory
and runs over every pixel, does a 16bit read, swaps the pixel and writes it back.
In the end my colors look as expected. So it's definetely a swapping issue.
Matthias
>
> Matthias Fuchs wrote:
> > Hi,
> >
> > is there any simple way to change the byteorder for the Linux framebuffer access?
> >
> > I am trying to run nano-x on a powerpc system (big endian) with a little endian
> > framebuffer. The framebuffer is setup for 16bpp, so I need to find the place where
> > the final write to the framebuffer memory takes place in the nano-x code.
> >
> > Any idea about a good place to add this simple swapping?
> >
> > Matthias