* [U-Boot-Users] [PATCH] VIDEO_FB_LITTLE_ENDIAN name confusion
@ 2007-04-16 17:09 Andrew Dyer
2007-04-17 20:46 ` Rodolfo Giometti
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Dyer @ 2007-04-16 17:09 UTC (permalink / raw)
To: u-boot
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>
--
Hardware, n.:
The parts of a computer system that can be kicked.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-cfb-little-endian.patch
Type: text/x-diff
Size: 3101 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070416/bb4aa02c/attachment.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot-Users] [PATCH] VIDEO_FB_LITTLE_ENDIAN name confusion
2007-04-16 17:09 [U-Boot-Users] [PATCH] VIDEO_FB_LITTLE_ENDIAN name confusion Andrew Dyer
@ 2007-04-17 20:46 ` Rodolfo Giometti
0 siblings, 0 replies; 2+ messages in thread
From: Rodolfo Giometti @ 2007-04-17 20:46 UTC (permalink / raw)
To: u-boot
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
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-17 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-16 17:09 [U-Boot-Users] [PATCH] VIDEO_FB_LITTLE_ENDIAN name confusion Andrew Dyer
2007-04-17 20:46 ` Rodolfo Giometti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox