thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
9ae3a8
From b01048102e5cc91d484d23531799a130a49d723a Mon Sep 17 00:00:00 2001
9ae3a8
From: Tarun Gupta <tgupta@redhat.com>
9ae3a8
Date: Wed, 20 Jun 2018 18:54:16 +0200
9ae3a8
Subject: [PATCH 08/17] spice: fix simple display on bigendian hosts
9ae3a8
9ae3a8
RH-Author: Tarun Gupta <tgupta@redhat.com>
9ae3a8
Message-id: <1529520865-18127-3-git-send-email-tgupta@redhat.com>
9ae3a8
Patchwork-id: 80907
9ae3a8
O-Subject: [RHEL7.6 qemu-kvm PATCH v3 02/11] spice: fix simple display on bigendian hosts
9ae3a8
Bugzilla: 1555246
9ae3a8
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
9ae3a8
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
Denis Kirjanov is busy getting spice run on ppc64 and trapped into this
9ae3a8
one.  Spice wire format is little endian, so we have to explicitly say
9ae3a8
we want little endian when letting pixman convert the data for us.
9ae3a8
9ae3a8
Reported-by: Denis Kirjanov <kirjanov@gmail.com>
9ae3a8
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
9ae3a8
(cherry picked from c1d37cd353be3ea4c5773fc227ba8459c1f20470)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 include/ui/qemu-pixman.h | 2 ++
9ae3a8
 ui/spice-display.c       | 2 +-
9ae3a8
 2 files changed, 3 insertions(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
9ae3a8
index ba970f8..500725c 100644
9ae3a8
--- a/include/ui/qemu-pixman.h
9ae3a8
+++ b/include/ui/qemu-pixman.h
9ae3a8
@@ -27,8 +27,10 @@
9ae3a8
 
9ae3a8
 #ifdef HOST_WORDS_BIGENDIAN
9ae3a8
 # define PIXMAN_BE_r8g8b8     PIXMAN_r8g8b8
9ae3a8
+# define PIXMAN_LE_x8r8g8b8   PIXMAN_b8g8r8x8
9ae3a8
 #else
9ae3a8
 # define PIXMAN_BE_r8g8b8     PIXMAN_b8g8r8
9ae3a8
+# define PIXMAN_LE_x8r8g8b8   PIXMAN_x8r8g8b8
9ae3a8
 #endif
9ae3a8
 
9ae3a8
 /* -------------------------------------------------------------------- */
9ae3a8
diff --git a/ui/spice-display.c b/ui/spice-display.c
9ae3a8
index e2c24a9..8b73e5a 100644
9ae3a8
--- a/ui/spice-display.c
9ae3a8
+++ b/ui/spice-display.c
9ae3a8
@@ -178,7 +178,7 @@ static void qemu_spice_create_one_update(SimpleSpiceDisplay *ssd,
9ae3a8
     image->bitmap.palette = 0;
9ae3a8
     image->bitmap.format = SPICE_BITMAP_FMT_32BIT;
9ae3a8
 
9ae3a8
-    dest = pixman_image_create_bits(PIXMAN_x8r8g8b8, bw, bh,
9ae3a8
+    dest = pixman_image_create_bits(PIXMAN_LE_x8r8g8b8, bw, bh,
9ae3a8
                                     (void *)update->bitmap, bw * 4);
9ae3a8
     pixman_image_composite(PIXMAN_OP_SRC, ssd->surface, NULL, ssd->mirror,
9ae3a8
                            rect->left, rect->top, 0, 0,
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8