diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-07-22 13:19:33 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2011-08-17 23:01:11 +0000 |
commit | 4fbf55568bb53a27a8c6270f1d3e2f6daf05c705 (patch) | |
tree | cfbed1d1fca2fdc815c7a7f3ba16454a9e5663b2 /hw/syborg_fb.c | |
parent | 8b2a04eeb95212305d3a39170e1c4bc3dbe45e8a (diff) |
hw/pl110: Model the PL111 CLCD controller
Model the PL111 CLCD controller. This is a minor variation
on the PL110; the major programmer visible differences are
support for hardware cursor (unimplemented) and two new
pixel formats.
Since syborg_fb.c borrows the pl11x pixel drawing routines,
we also update it to cope with the new slightly larger array
of function pointers.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/syborg_fb.c')
-rw-r--r-- | hw/syborg_fb.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/hw/syborg_fb.c b/hw/syborg_fb.c index 7e37364540..ae3e0ebc64 100644 --- a/hw/syborg_fb.c +++ b/hw/syborg_fb.c @@ -217,15 +217,24 @@ static void syborg_fb_update_display(void *opaque) } if (s->rgb) { - bpp_offset = 18; + bpp_offset = 24; } else { bpp_offset = 0; } if (s->endian) { + bpp_offset += 8; + } + /* Our bpp constants mostly match the PL110/PL111 but + * not for the 16 bit case + */ + switch (s->bpp) { + case BPP_SRC_16: bpp_offset += 6; + break; + default: + bpp_offset += s->bpp; } - - fn = fntable[s->bpp + bpp_offset]; + fn = fntable[bpp_offset]; if (s->pitch) { src_width = s->pitch; |