u-boot 16bpp frame buffer now without HWSWP

Werner Almesberger werner at openmoko.org
Sat Jan 5 19:30:09 CET 2008


In order to fix the character distortion bug in recent u-boot
http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1140
I committed a change that disables HWSWP (in u-boot only).

This makes the solution for the u-boot console a little simpler and
faster, but it also has the side-effect that splash images are now
distorted (you have to look carefully, though).

The reason is that the CFB driver in u-boot doesn't quite expect
the way the 32 bit accesses work on the 24xx if the pixels are
arranged linearly in 16bpp mode. This change makes the arrangement
32 bit friendly (so SHORTSWAP32 isn't needed), but in turns swaps
adjacent pixels if looking at the frame buffer as a byte stream.

I've added an option -swap to host/splash/splashimg.pl that does
this swapping to splash images.

The splash image can be updated as follows:

% wget http://wiki.openmoko.org/images/c/c2/System_boot.png
% splashimg.pl -swap System_boot.png | gzip -9 >splash.gz
% dfu-util -a splash -D splash.gz

Since the new image now compresses slightly worse, we also need to
increase the read size in the "splashimage" command (from 0x5000 to
0x5100):

GTA01Bv4 # setenv splashimage nand read.e 0x32000000 splash 0x5100\; unzip 0x32000000 0x33d00000 0x96000
GTA01Bv4 # saveenv

I'll update the devirginator later. There's a bunch of changes for
GTA02 support that need compatibility testing first.

Note that this does not affect the kernel, which still uses HWSWP in
16bpp mode, and no HWSWP in 32bpp mode.

- Werner



More information about the openmoko-uboot mailing list