summaryrefslogtreecommitdiffstats
path: root/hw/syborg_fb.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-08-22 01:34:33 +0200
committerAnthony Liguori2011-08-22 01:34:33 +0200
commitf1a7104a5f435a1bf2a1158e6f737dbd89e8c153 (patch)
tree6c5e617e82055e38848db1bf7be9fdff7da900ea /hw/syborg_fb.c
parentguest agent: remove uneeded dependencies (diff)
parenthw/stellaris: Add support for RCC2 register (diff)
downloadqemu-f1a7104a5f435a1bf2a1158e6f737dbd89e8c153.tar.gz
qemu-f1a7104a5f435a1bf2a1158e6f737dbd89e8c153.tar.xz
qemu-f1a7104a5f435a1bf2a1158e6f737dbd89e8c153.zip
Merge remote-tracking branch 'pmaydell/armhw-for-upstream' into staging
Diffstat (limited to 'hw/syborg_fb.c')
-rw-r--r--hw/syborg_fb.c15
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;