Re: [Qemu-devel] [PATCH 07/23] console: switch color_table_rgb to pixman_color_t

2013-03-20 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: @@ -255,7 +250,10 @@ enum color_names { }; #endif -static const uint32_t color_table_rgb[2][8] = { +#define QEMU_RGB(r, g, b) \ +{ .red = r 8, .green = g 8, .blue = b 8, .alpha = 0 } Are you

Re: [Qemu-devel] [PATCH 01/15] pixman: add qemu_pixman_color()

2013-03-18 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: Helper function to map qemu colors (32bit integer + matching PixelFormat) into pixman_color_t. Are qemu colors premultiplied? If not, this function should probably premultiply before returning the color. Søren

Re: [Qemu-devel] [PATCH] Require spice-server 0.12.0 and spice-protocol 0.12.2

2012-10-05 Thread Søren Sandmann
Paolo Bonzini pbonz...@redhat.com writes: Nice cleanup, thanks! As a followup, there is some confusion between values of the revision property (1-4) and PCI device revisions (QXL_REVISION_STABLE_Vxy). They are the same right now, but this means that you can do one of the following: 1) if

Re: [Qemu-devel] [PATCH] qxl: Default to PCI revision 4 when spice-server is new enough

2012-10-04 Thread Søren Sandmann
Paolo Bonzini pbonz...@redhat.com writes: Il 03/10/2012 19:57, Søren Sandmann ha scritto: From: Søren Sandmann Pedersen s...@redhat.com When spice-server is newer than 0.12.0, the default revision should be QXL_REVISION_STABLE_V12. Signed-off-by: Soren Sandmann s...@redhat.com --- hw

[Qemu-devel] [PATCH] Require spice-server 0.12.0 and spice-protocol 0.12.2

2012-10-04 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Set the default PCI revision to QXL_REVISION_STABLE_V12, and remove the various #ifs on various subversions of spice-server 0.11.x. Also set the revision to 3 for the PC 1.2 machine for compatibility. Signed-off-by: Soren Sandmann s...@redhat.com

[Qemu-devel] [PATCH] qxl: Default to PCI revision 4 when spice-server is new enough

2012-10-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com When spice-server is newer than 0.12.0, the default revision should be QXL_REVISION_STABLE_V12. Signed-off-by: Soren Sandmann s...@redhat.com --- hw/qxl.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/qxl.h b/hw/qxl.h

[Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Apparently GCC 4.5 still warns about value computed not used even with __attribute__((unused)). Fix this by only doing the compile time check on gcc 4.5. Signed-off-by: Soren Sandmann s...@redhat.com --- I need this patch to get qemu to compile

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Stefan Weil s...@weilnetz.de writes: I don't see any warnings with gcc Debian 4.4.5-8. Could you please provide more information on your environment and the warnings which you get? Here is a macro which simplifies the version check: #if QEMU_GNUC_PREREQ(4, 6) Regards Stefan Weil With

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Richard Henderson r...@twiddle.net writes: diff --git a/osdep.h b/osdep.h index cb213e0..df89552 100644 --- a/osdep.h +++ b/osdep.h @@ -41,8 +41,9 @@ typedef signed int int_fast16_t; #endif /* Convert from a base type to a parent type, with compile time checking. */

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Stefan Weil s...@weilnetz.de writes: That's strange. The lines which cause compiler errors look like this: vfio_eoi(DO_UPCAST(VFIODevice, bars[bar-nr], bar)); There are more uses of DO_UPCAST without any compiler error: VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev);

Re: [Qemu-devel] [RfC] using pixman in qemu for raster ops

2012-09-25 Thread Søren Sandmann
Peter Maydell peter.mayd...@linaro.org writes: On 25 September 2012 09:47, Gerd Hoffmann kra...@redhat.com wrote: Even though pixman is used by core linux packages it is still a young project. On older distros (RHEL-5 for example) it isn't included and must be compiled manually. For me not

Re: [Qemu-devel] [RfC] using pixman in qemu for raster ops

2012-09-25 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: Pixman was actually included in RHEL 5.8 which was released in February this year. Where is it? 'yum list pixman' returns nothing ... I don't have an installation of 5.8 so I don't know why yum list doesn't return anything, but pixman-0.22.0 certainly

Re: [Qemu-devel] [RfC] using pixman in qemu for raster ops

2012-09-25 Thread Søren Sandmann
Markus Armbruster arm...@redhat.com writes: sandm...@cs.au.dk (Søren Sandmann) writes: Gerd Hoffmann kra...@redhat.com writes: Pixman was actually included in RHEL 5.8 which was released in February this year. Where is it? 'yum list pixman' returns nothing ... I don't have

Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman

2012-09-18 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: +static pixman_image_t *pixman_from_displaystate(DisplayState *ds) +{ +PixelFormat *pf = ds-surface-pf; +pixman_format_code_t format; +pixman_image_t *image; +int type; + +type = pixman_shifts_to_type(pf-rshift, pf-gshift,

[Qemu-devel] [PATCH 2/2] Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPP

2012-09-04 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com We require spice = 0.8 now, so this flag is always present. Signed-off-by: Soren Sandmann s...@redhat.com --- hw/qxl.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 572daa9..57e6536 100644

[Qemu-devel] [PATCH 1/2] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-04 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change

Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client

2012-09-03 Thread Søren Sandmann
Alon Levy al...@redhat.com writes: --- server/red_worker.c | 2 ++ spice-common| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 843f559..23f3464 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@

Re: [Qemu-devel] [Spice-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-03 Thread Søren Sandmann
Søren Sandmann Pedersen s...@redhat.com writes: @@ -1292,7 +1315,7 @@ static void qxl_set_mode(PCIQXLDevice *d, int modenr, int loadvm) d-mode = QXL_MODE_COMPAT; d-cmdflags = QXL_COMMAND_FLAG_COMPAT; -#ifdef QXL_COMMAND_FLAG_COMPAT_16BPP /* new in spice 0.6.1

[Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change

Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client

2012-09-03 Thread Søren Sandmann
Søren Sandmann sandm...@cs.au.dk writes: Alon Levy al...@redhat.com writes: --- server/red_worker.c | 2 ++ spice-common| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 843f559..23f3464 100644 --- a/server

[Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com --- client/display_channel.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/display_channel.cpp b/client/display_channel.cpp index d08072d..49a4c6a 100644 --- a/client/display_channel.cpp +++ b/client

[Qemu-devel] [PATCH 5/5] Bump spice.h version number to 0.11.4

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com No new symbols are added, but there is an addition to QXLInterface: void (*set_client_capabilities)(QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); --- server

[Qemu-devel] [PATCH 2/5] Add new set_client_capabilities() interface to QXLInstance

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com A new interface set_client_capabilities (QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); is added to QXLInstance, and spice server is changed to call it whenever a client connects

[Qemu-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com When a new client connects, there may be commands in the ring that it can't understand, so we need to process these before forwarding new commands to the client. By doing this after changing the capability bits we ensure that the new client will never

[Qemu-devel] [PATCH 4/5] Set a8 capability in the QXL device if supported by the client

2012-09-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com --- server/red_worker.c |2 ++ spice-common|2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index f87967c..17d9ef8 100644 --- a/server/red_worker.c +++ b/server

[Qemu-devel] [PATCH-v2 spice-protocol 1/2] Add A8 surface capability

2012-09-02 Thread Søren Sandmann Pedersen
Even though the ability to handle a8 surfaces was added at the same time as the composite command, they are logically separate, so add a capability bit to indicate the presence of a8 surfaces. --- spice/protocol.h | 1 + 1 file changed, 1 insertion(+) diff --git a/spice/protocol.h

[Qemu-devel] New patches to add capabilities to spice and qxl

2012-09-02 Thread Søren Sandmann Pedersen
Hi, Here are new revisions of the capabilities patches. Also included here is a new SPICE_DISPLAY_CAP_A8_SURFACE capability since this is logically distinct from the composite command. Thanks, Soren

[Qemu-devel] [PATCH-v2 spice-gtk] Advertise SPICE_DISPLAY_CAP_A8_SURFACE

2012-09-02 Thread Søren Sandmann Pedersen
--- gtk/channel-display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/channel-display.c b/gtk/channel-display.c index 99fe9c9..326ad22 100644 --- a/gtk/channel-display.c +++ b/gtk/channel-display.c @@ -682,6 +682,7 @@ static void spice_display_channel_reset_capabilities(SpiceChannel

[Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface

2012-09-02 Thread Søren Sandmann Pedersen
This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change, the QXL_INTERRUPT_CLIENT interrupt is generated. Signed-off-by:

[Qemu-devel] [PATCH-v2 spice 2/2] Bump spice.h version number to 0.11.4

2012-09-02 Thread Søren Sandmann Pedersen
No new symbols are added, but there is an addition to QXLInterface: void (*set_client_capabilities)(QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); --- server/spice.h | 2 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PATCH-v2 spice-protocol 2/2] Add new client_present and client capabilities fields to QXLRom

2012-09-02 Thread Søren Sandmann Pedersen
The client_present field is a byte that is set of non-zero when a client is connected and to zero when no client is connected. The client_capabilities[58] array contains 464 bits that indicate the capabilities of the client. Each bit corresponds to a SPICE_DISPLAY_CAP_* capability. In particular,

[Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client

2012-09-02 Thread Søren Sandmann Pedersen
--- server/red_worker.c | 2 ++ spice-common| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 843f559..23f3464 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -10377,6 +10377,8 @@ static void

Re: [Qemu-devel] [Spice-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom

2012-08-30 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: The scheme I had in mind was this: - When a new non-a8-capable client appears, don't send it any of the a8 surfaces - If the client doesn't understand a8 surfaces, - keep all a8 surfaces rendered on the server side

Re: [Qemu-devel] [Spice-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom

2012-08-29 Thread Søren Sandmann
Alon Levy al...@redhat.com writes: Good question. I don't know of a good way to deal with the situation where the new client is unable to handle existing surfaces. I suppose in principle spice-server could emulate their existence, sending them as images, but I'm not familiar enough with

Re: [Qemu-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom

2012-08-29 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: I don't know of a good way to deal with the situation where the new client is unable to handle existing surfaces. We need a sensible solution here. If we can't handle capability downgrade at runtime the capability negotiation between guest and client

Re: [Qemu-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom

2012-08-28 Thread Søren Sandmann
Gerd Hoffmann kra...@redhat.com writes: On 08/27/12 19:20, Søren Sandmann Pedersen wrote: From: Søren Sandmann Pedersen s...@redhat.com The client_present field is a byte that is set of non-zero when a client is connected and to zero when no client is connected. The client_capabilities

[Qemu-devel] [PATCH 1/2] spice: Change NUM_SURFACES to 4096

2012-08-27 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com It's not uncommon for an X workload to have more than 1024 pixmaps live at the same time. Ideally, there wouldn't be any fixed limit like this, but since we have one, increase it to 4096. --- ui/spice-display.h |2 +- 1 files changed, 1

[Qemu-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom

2012-08-27 Thread Søren Sandmann Pedersen
From: Søren Sandmann Pedersen s...@redhat.com The client_present field is a byte that is set of non-zero when a client is connected and to zero when no client is connected. The client_capabilities[58] array contains 464 bits that indicate the capabilities of the client. Each bit corresponds

[Qemu-devel] Add ability to advertise client capabilities to QXL device

2012-08-27 Thread Søren Sandmann Pedersen
Hi, The following patches add the ability for spice-server to advertise the capabilities of connected clients to guests. They do this through adding some new fields to QXLRom: - whether a client is present - a bit field to indicate which SPICE_DISPLAY_CAP_* capabilities the client has.

[Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface

2012-08-27 Thread Søren Sandmann Pedersen
From: Søren Sandmann Pedersen s...@redhat.com This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change

[Qemu-devel] [PATCH] Add new set_client_capabilities() interface to QXLInstance

2012-08-27 Thread Søren Sandmann Pedersen
From: Søren Sandmann Pedersen s...@redhat.com A new interface set_client_capabilities (QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); is added to QXLInstance, and spice server is changed to call it whenever a client connects

[Qemu-devel] Add ability to advertise client capabilities to QXL device

2012-08-27 Thread Søren Sandmann Pedersen
Hi, The following patches add the ability for spice-server to advertise the capabilities of connected clients to guests. They do this through adding some new fields to QXLRom: - whether a client is present - a bit field to indicate which SPICE_DISPLAY_CAP_* capabilities the client has.