summary refs log tree commit diff stats
path: root/hw/syborg_fb.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2011-08-22 14:41:12 +0400
committermalc <av1474@comtv.ru>2011-08-22 14:41:12 +0400
commit1afa194a0a3384c5a8fd150e4335d332c22883cf (patch)
tree87d1ca2dbfb03128e628e344a713297131bad7f7 /hw/syborg_fb.c
parent157f2662fb4dd8f02885027e47f79fbee83c7b94 (diff)
parentf1a7104a5f435a1bf2a1158e6f737dbd89e8c153 (diff)
downloadfocaccia-qemu-1afa194a0a3384c5a8fd150e4335d332c22883cf.tar.gz
focaccia-qemu-1afa194a0a3384c5a8fd150e4335d332c22883cf.zip
Merge branch 'master' of git://git.qemu.org/qemu
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;