[U-Boot-Users] [PATCH] VIDEO_FB_LITTLE_ENDIAN name confusion

I've noticed that VIDEO_FB_LITTLE_ENDIAN in drivers/cfb_console.c is not really well named. What it does is swap bytes around if the frame buffer has a /different/ endianness from the host. If you start with a little endian host and frame buffer and define VIDEO_FB_LITTLE_ENDIAN the drawn colors get incorrectly byte swapped.
the attached patch changes VIDEO_FB_LITTLE_ENDIAN to VIDEO_FB_OTHER_ENDIAN to make it clearer what it does.
Signed-off-by: Andrew Dyer amdyer@gmail.com

On Mon, Apr 16, 2007 at 12:09:14PM -0500, Andrew Dyer wrote:
I've noticed that VIDEO_FB_LITTLE_ENDIAN in drivers/cfb_console.c is not really well named. What it does is swap bytes around if the frame buffer has a /different/ endianness from the host. If you start with a little endian host and frame buffer and define VIDEO_FB_LITTLE_ENDIAN the drawn colors get incorrectly byte swapped.
I think that the right thing to do is to avoid that the byte are swapped if the CPU and framebuffer endianess are the same.
However the patchg reduces possible misunderstanding...
Ciao,
Rodolfo
participants (2)
-
Andrew Dyer
-
Rodolfo Giometti