aboutsummaryrefslogtreecommitdiff
path: root/hw/xenfb.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-02-20 09:37:12 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-21 16:34:00 -0600
commitb1424e0381a7f1c9969079eca4458d5f20bf1859 (patch)
treed5bcee64523767227188821b45364ccfd5898ace /hw/xenfb.c
parentba43da36983a0bff2778abfa2338697da129030c (diff)
downloadqemu-b1424e0381a7f1c9969079eca4458d5f20bf1859.zip
qemu-b1424e0381a7f1c9969079eca4458d5f20bf1859.tar.gz
qemu-b1424e0381a7f1c9969079eca4458d5f20bf1859.tar.bz2
vga: fix byteswapping.
In case host and guest endianness differ the vga code first creates a shared surface (using qemu_create_displaysurface_from), then goes patch the surface format to indicate that the bytes must be swapped. The switch to pixman broke that hack as the format patching isn't propagated into the pixman image, so ui code using the pixman image directly (such as vnc) uses the wrong format. Fix that by adding a byteswap parameter to qemu_create_displaysurface_from, so we'll use the correct format when creating the surface (and the pixman image) and don't have to patch the format afterwards. [ v2: unbreak xen build ] Cc: qemu-stable@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Cc: agraf@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1361349432-23884-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/xenfb.c')
-rw-r--r--hw/xenfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xenfb.c b/hw/xenfb.c
index 903efd3..7f1f6b4 100644
--- a/hw/xenfb.c
+++ b/hw/xenfb.c
@@ -756,7 +756,8 @@ static void xenfb_update(void *opaque)
qemu_free_displaysurface(xenfb->c.ds);
xenfb->c.ds->surface = qemu_create_displaysurface_from
(xenfb->width, xenfb->height, xenfb->depth,
- xenfb->row_stride, xenfb->pixels + xenfb->offset);
+ xenfb->row_stride, xenfb->pixels + xenfb->offset,
+ false);
break;
default:
/* we must convert stuff */