On 4/14/15, Denis Kirjanov <kirjanov@xxxxxxxxx> wrote: > On 4/14/15, Denis Kirjanov <kirjanov@xxxxxxxxx> wrote: >> On 4/14/15, Gerd Hoffmann <kraxel@xxxxxxxxxx> wrote: >>> Denis Kirjanov is busy getting spice run on ppc64 and trapped into this >>> one. Spice wire format is little endian, so we have to explicitly say >>> we want little endian when letting pixman convert the data for us. >>> >>> Reported-by: Denis Kirjanov <kirjanov@xxxxxxxxx> >>> Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx> >>> --- >> Yeah, that fixes the issue. Thanks Gerd! > > Looks like that the patch fixes the half of the problem: the inverted > colors appear on client reconnect to vm Program received signal SIGSEGV, Segmentation fault. 0x00007ffff4e10258 in ?? () from /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (gdb) bt #0 0x00007ffff4e10258 in ?? () from /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 #1 0x00007ffff4e10239 in pixman_image_unref () from /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 #2 0x00007ffff78e4117 in canvas_get_quic (canvas=canvas@entry=0x7ceb80, image=image@entry=0xae2720, want_original=want_original@entry=0) at ../spice-common/common/canvas_base.c:390 #3 0x00007ffff78e686d in canvas_get_image_internal (canvas=canvas@entry=0x7ceb80, image=0xae2720, want_original=want_original@entry=0, real_get=real_get@entry=1) at ../spice-common/common/canvas_base.c:1146 #4 0x00007ffff78e83fd in canvas_get_image (want_original=0, image=<optimized out>, canvas=0x7ceb80) at ../spice-common/common/canvas_base.c:1309 #5 canvas_draw_copy (spice_canvas=0x7ceb80, bbox=0xae26c4, clip=<optimized out>, copy=0xae26e8) at ../spice-common/common/canvas_base.c:2281 #6 0x00007ffff78c98db in display_handle_draw_copy (channel=0x7c59b0, in=0x841f00) at channel-display.c:1563 #7 0x00007ffff78bfe7c in spice_channel_handle_msg (channel=0x7c59b0, msg=0x841f00) at spice-channel.c:2858 #8 0x00007ffff78bce6c in spice_channel_recv_msg (channel=0x7c59b0, msg_handler=0x7ffff78bfd9f <spice_channel_handle_msg>, data=0x0) at spice-channel.c:1869 #9 0x00007ffff78bd4f3 in spice_channel_iterate_read (channel=0x7c59b0) at spice-channel.c:2106 #10 0x00007ffff78bd6fd in spice_channel_iterate (channel=0x7c59b0) at spice-channel.c:2144 #11 0x00007ffff78be4ad in spice_channel_coroutine (data=0x7c59b0) at spice-channel.c:2430 #12 0x00007ffff78ea6ff in coroutine_trampoline (cc=0x7c5058) at coroutine_ucontext.c:63 #13 0x00007ffff78ea4c9 in continuation_trampoline (i0=<optimized out>, i1=<optimized out>) at continuation.c:55 #14 0x00007ffff63278b0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #15 0x00000000007c5420 in ?? () #16 0x0000000000000000 in ?? () >>> include/ui/qemu-pixman.h | 2 ++ >>> ui/spice-display.c | 2 +- >>> 2 files changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h >>> index 5d7a9ac..e34c4ef 100644 >>> --- a/include/ui/qemu-pixman.h >>> +++ b/include/ui/qemu-pixman.h >>> @@ -35,6 +35,7 @@ >>> # define PIXMAN_BE_r8g8b8a8 PIXMAN_r8g8b8a8 >>> # define PIXMAN_BE_x8b8g8r8 PIXMAN_x8b8g8r8 >>> # define PIXMAN_BE_a8b8g8r8 PIXMAN_a8b8g8r8 >>> +# define PIXMAN_LE_x8r8g8b8 PIXMAN_b8g8r8x8 >>> #else >>> # define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8 >>> # define PIXMAN_BE_x8r8g8b8 PIXMAN_b8g8r8x8 >>> @@ -45,6 +46,7 @@ >>> # define PIXMAN_BE_r8g8b8a8 PIXMAN_a8b8g8r8 >>> # define PIXMAN_BE_x8b8g8r8 PIXMAN_r8g8b8x8 >>> # define PIXMAN_BE_a8b8g8r8 PIXMAN_r8g8b8a8 >>> +# define PIXMAN_LE_x8r8g8b8 PIXMAN_x8r8g8b8 >>> #endif >>> >>> /* -------------------------------------------------------------------- >>> */ >>> diff --git a/ui/spice-display.c b/ui/spice-display.c >>> index 1644185..1a64e07 100644 >>> --- a/ui/spice-display.c >>> +++ b/ui/spice-display.c >>> @@ -178,7 +178,7 @@ static void >>> qemu_spice_create_one_update(SimpleSpiceDisplay *ssd, >>> image->bitmap.palette = 0; >>> image->bitmap.format = SPICE_BITMAP_FMT_32BIT; >>> >>> - dest = pixman_image_create_bits(PIXMAN_x8r8g8b8, bw, bh, >>> + dest = pixman_image_create_bits(PIXMAN_LE_x8r8g8b8, bw, bh, >>> (void *)update->bitmap, bw * 4); >>> pixman_image_composite(PIXMAN_OP_SRC, ssd->surface, NULL, >>> ssd->mirror, >>> rect->left, rect->top, 0, 0, >>> -- >>> 1.8.3.1 >>> >>> _______________________________________________ >>> Spice-devel mailing list >>> Spice-devel@xxxxxxxxxxxxxxxxxxxxx >>> http://lists.freedesktop.org/mailman/listinfo/spice-devel >>> >> >> >> -- >> Regards, >> Denis >> > > > -- > Regards, > Denis > -- Regards, Denis _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel