* [Qemu-devel] [PATCH-v2 spice-protocol 1/2] Add A8 surface capability
2012-09-02 21:35 ` [Qemu-devel] New patches to add capabilities to spice and qxl Søren Sandmann Pedersen
@ 2012-09-02 21:35 ` Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice-protocol 2/2] Add new client_present and client capabilities fields to QXLRom Søren Sandmann Pedersen
` (4 subsequent siblings)
5 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann Pedersen @ 2012-09-02 21:35 UTC (permalink / raw)
To: qemu-devel, spice-devel; +Cc: kraxel, 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 b/spice/protocol.h
index 7008399..0671292 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -128,6 +128,7 @@ enum {
SPICE_DISPLAY_CAP_SIZED_STREAM,
SPICE_DISPLAY_CAP_MONITORS_CONFIG,
SPICE_DISPLAY_CAP_COMPOSITE,
+ SPICE_DISPLAY_CAP_A8_SURFACE,
};
enum {
--
1.7.11.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH-v2 spice-protocol 2/2] Add new client_present and client capabilities fields to QXLRom
2012-09-02 21:35 ` [Qemu-devel] New patches to add capabilities to spice and qxl Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice-protocol 1/2] Add A8 surface capability Søren Sandmann Pedersen
@ 2012-09-02 21:35 ` Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice-gtk] Advertise SPICE_DISPLAY_CAP_A8_SURFACE Søren Sandmann Pedersen
` (3 subsequent siblings)
5 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann Pedersen @ 2012-09-02 21:35 UTC (permalink / raw)
To: qemu-devel, spice-devel; +Cc: kraxel, 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, if the client has
capability C, then bit (C % 8) in byte (C / 8) is set. The capability
bits only have a defined meaning when a client is connected, ie., when
client_present is non-zero. The number 58 was chosen to fill out a
cache line in QXLRom.
A new QXL_INTERRUPT_CLIENT interrupt is defined, which will be raised
whenever a client connects or disconnects.
---
spice/qxl_dev.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 1292767..50784dc 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -148,7 +148,9 @@ typedef struct SPICE_ATTR_PACKED QXLRom {
uint8_t slot_gen_bits;
uint8_t slot_id_bits;
uint8_t slot_generation;
- uint8_t padding[3]; /* Padding to 32bit align */
+ /* appended for qxl-4 */
+ uint8_t client_present;
+ uint8_t client_capabilities[58];
} QXLRom;
/* qxl-1 compat: fixed */
@@ -231,6 +233,7 @@ SPICE_RING_DECLARE(QXLReleaseRing, uint64_t, QXL_RELEASE_RING_SIZE);
#define QXL_INTERRUPT_CURSOR (1 << 1)
#define QXL_INTERRUPT_IO_CMD (1 << 2)
#define QXL_INTERRUPT_ERROR (1 << 3)
+#define QXL_INTERRUPT_CLIENT (1 << 4)
/* qxl-1 compat: append only */
typedef struct SPICE_ATTR_PACKED QXLRam {
--
1.7.11.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH-v2 spice-gtk] Advertise SPICE_DISPLAY_CAP_A8_SURFACE
2012-09-02 21:35 ` [Qemu-devel] New patches to add capabilities to spice and qxl Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice-protocol 1/2] Add A8 surface capability Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice-protocol 2/2] Add new client_present and client capabilities fields to QXLRom Søren Sandmann Pedersen
@ 2012-09-02 21:35 ` Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client Søren Sandmann Pedersen
` (2 subsequent siblings)
5 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann Pedersen @ 2012-09-02 21:35 UTC (permalink / raw)
To: qemu-devel, spice-devel; +Cc: kraxel, 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 *channel)
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_SIZED_STREAM);
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_MONITORS_CONFIG);
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_COMPOSITE);
+ spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_A8_SURFACE);
}
static void spice_display_channel_init(SpiceDisplayChannel *channel)
--
1.7.11.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client
2012-09-02 21:35 ` [Qemu-devel] New patches to add capabilities to spice and qxl Søren Sandmann Pedersen
` (2 preceding siblings ...)
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice-gtk] Advertise SPICE_DISPLAY_CAP_A8_SURFACE Søren Sandmann Pedersen
@ 2012-09-02 21:35 ` Søren Sandmann Pedersen
2012-09-03 7:34 ` Alon Levy
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice 2/2] " Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface Søren Sandmann Pedersen
5 siblings, 1 reply; 38+ messages in thread
From: Søren Sandmann Pedersen @ 2012-09-02 21:35 UTC (permalink / raw)
To: qemu-devel, spice-devel; +Cc: kraxel, 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 handle_new_display_channel(RedWorker *worker, RedClient *client, Red
SET_CAP(caps, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_COMPOSITE))
SET_CAP(caps, SPICE_DISPLAY_CAP_COMPOSITE);
+ if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_COMPOSITE))
+ SET_CAP(caps, SPICE_DISPLAY_CAP_A8_SURFACE);
worker->qxl->st->qif->set_client_capabilities(worker->qxl, TRUE, caps);
}
diff --git a/spice-common b/spice-common
index 86e286b..04dc2be 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit 86e286ba2003c206e700fd70ec67c1cf4ac8d8a6
+Subproject commit 04dc2bee9ecdda7d7966f9267df37ab23bb5a802
--
1.7.11.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client Søren Sandmann Pedersen
@ 2012-09-03 7:34 ` Alon Levy
2012-09-03 17:33 ` Søren Sandmann
0 siblings, 1 reply; 38+ messages in thread
From: Alon Levy @ 2012-09-03 7:34 UTC (permalink / raw)
To: Søren Sandmann Pedersen; +Cc: spice-devel, kraxel, qemu-devel
> ---
> 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
> handle_new_display_channel(RedWorker *worker, RedClient *client, Red
> SET_CAP(caps, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
> if (red_channel_client_test_remote_cap(rcc,
> SPICE_DISPLAY_CAP_COMPOSITE))
> SET_CAP(caps, SPICE_DISPLAY_CAP_COMPOSITE);
> + if (red_channel_client_test_remote_cap(rcc,
> SPICE_DISPLAY_CAP_COMPOSITE))
> + SET_CAP(caps, SPICE_DISPLAY_CAP_A8_SURFACE);
Didn't you mean to test remote SPICE_DISPLAY_CAP_A8_SURFACE?
>
> worker->qxl->st->qif->set_client_capabilities(worker->qxl,
> TRUE, caps);
> }
> diff --git a/spice-common b/spice-common
> index 86e286b..04dc2be 160000
> --- a/spice-common
> +++ b/spice-common
> @@ -1 +1 @@
> -Subproject commit 86e286ba2003c206e700fd70ec67c1cf4ac8d8a6
> +Subproject commit 04dc2bee9ecdda7d7966f9267df37ab23bb5a802
> --
> 1.7.11.4
>
>
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client
2012-09-03 7:34 ` Alon Levy
@ 2012-09-03 17:33 ` Søren Sandmann
2012-09-03 17:49 ` Søren Sandmann
0 siblings, 1 reply; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:33 UTC (permalink / raw)
To: Alon Levy; +Cc: qemu-devel, spice-devel, Søren Sandmann Pedersen, kraxel
Alon Levy <alevy@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
>> @@ -10377,6 +10377,8 @@ static void
>> handle_new_display_channel(RedWorker *worker, RedClient *client, Red
>> SET_CAP(caps, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
>> if (red_channel_client_test_remote_cap(rcc,
>> SPICE_DISPLAY_CAP_COMPOSITE))
>> SET_CAP(caps, SPICE_DISPLAY_CAP_COMPOSITE);
>> + if (red_channel_client_test_remote_cap(rcc,
>> SPICE_DISPLAY_CAP_COMPOSITE))
>> + SET_CAP(caps, SPICE_DISPLAY_CAP_A8_SURFACE);
>
> Didn't you mean to test remote SPICE_DISPLAY_CAP_A8_SURFACE?
Yes, good catch. I'll fix before pushing.
Thanks,
Soren
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client
2012-09-03 17:33 ` Søren Sandmann
@ 2012-09-03 17:49 ` Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability Søren Sandmann
0 siblings, 1 reply; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:49 UTC (permalink / raw)
To: Alon Levy; +Cc: qemu-devel, spice-devel, Søren Sandmann Pedersen, kraxel
Søren Sandmann <sandmann@cs.au.dk> writes:
> Alon Levy <alevy@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
>>> @@ -10377,6 +10377,8 @@ static void
>>> handle_new_display_channel(RedWorker *worker, RedClient *client, Red
>>> SET_CAP(caps, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
>>> if (red_channel_client_test_remote_cap(rcc,
>>> SPICE_DISPLAY_CAP_COMPOSITE))
>>> SET_CAP(caps, SPICE_DISPLAY_CAP_COMPOSITE);
>>> + if (red_channel_client_test_remote_cap(rcc,
>>> SPICE_DISPLAY_CAP_COMPOSITE))
>>> + SET_CAP(caps, SPICE_DISPLAY_CAP_A8_SURFACE);
>>
>> Didn't you mean to test remote SPICE_DISPLAY_CAP_A8_SURFACE?
>
> Yes, good catch. I'll fix before pushing.
I realized that I didn't actually send the whole patch series for
spice-server. There are five patches rather than two.
Soren
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability
2012-09-03 17:49 ` Søren Sandmann
@ 2012-09-03 17:53 ` Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 2/5] Add new set_client_capabilities() interface to QXLInstance Søren Sandmann
` (3 more replies)
0 siblings, 4 replies; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:53 UTC (permalink / raw)
To: spice-devel, qemu-devel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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/display_channel.cpp
@@ -652,6 +652,7 @@ DisplayChannel::DisplayChannel(RedClient& client, uint32_t id,
set_draw_handlers();
set_capability(SPICE_DISPLAY_CAP_COMPOSITE);
+ set_capability(SPICE_DISPLAY_CAP_A8_SURFACE);
}
DisplayChannel::~DisplayChannel()
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 2/5] Add new set_client_capabilities() interface to QXLInstance
2012-09-03 17:53 ` [Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability Søren Sandmann
@ 2012-09-03 17:53 ` Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits Søren Sandmann
` (2 subsequent siblings)
3 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:53 UTC (permalink / raw)
To: spice-devel, qemu-devel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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 or disconnects. The QXL device in response
is expected to update the client capability bits in the ROM of the
device and raise the QXL_INTERRUPT_CLIENT interrupt.
There is a potential race condition in the case where a client
disconnects and a new client with fewer capabilities connects. There
may be commands in the ring that the new client can't handle. This
case is handled by first changing the capability bits, then processing
all commands in the ring, and then start forwarding commands to the
new client. As long as the guest obeys the capability bits, the new
client will never see anything it doesn't understand.
---
server/red_worker.c | 24 ++++++++++++++++++++++++
server/spice.h | 3 +++
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index 133ba94..60b5471 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -10359,6 +10359,23 @@ static void handle_new_display_channel(RedWorker *worker, RedClient *client, Red
spice_info("jpeg %s", display_channel->enable_jpeg ? "enabled" : "disabled");
spice_info("zlib-over-glz %s", display_channel->enable_zlib_glz_wrap ? "enabled" : "disabled");
+ if (worker->qxl->st->qif->set_client_capabilities) {
+ RedChannelClient *rcc = (RedChannelClient *)dcc;
+ uint8_t caps[58] = { 0 };
+
+#define SET_CAP(a,c) \
+ ((a)[(c) / 8] |= (1 << ((c) % 8)))
+
+ if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_SIZED_STREAM))
+ SET_CAP(caps, SPICE_DISPLAY_CAP_SIZED_STREAM);
+ if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_MONITORS_CONFIG))
+ SET_CAP(caps, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
+ if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_COMPOSITE))
+ SET_CAP(caps, SPICE_DISPLAY_CAP_COMPOSITE);
+
+ worker->qxl->st->qif->set_client_capabilities(worker->qxl, TRUE, caps);
+ }
+
// todo: tune level according to bandwidth
display_channel->zlib_level = ZLIB_DEFAULT_COMPRESSION_LEVEL;
red_display_client_init_streams(dcc);
@@ -11213,9 +11230,16 @@ void handle_dev_display_disconnect(void *opaque, void *payload)
{
RedWorkerMessageDisplayDisconnect *msg = payload;
RedChannelClient *rcc = msg->rcc;
+ RedWorker *worker = opaque;
spice_info("disconnect display client");
spice_assert(rcc);
+
+ if (worker->qxl->st->qif->set_client_capabilities) {
+ uint8_t caps[58] = { 0 };
+ worker->qxl->st->qif->set_client_capabilities(worker->qxl, FALSE, caps);
+ }
+
red_channel_client_disconnect(rcc);
}
diff --git a/server/spice.h b/server/spice.h
index 0dc9d05..9d65efa 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -239,6 +239,9 @@ struct QXLInterface {
void (*update_area_complete)(QXLInstance *qin, uint32_t surface_id,
struct QXLRect *updated_rects,
uint32_t num_updated_rects);
+ void (*set_client_capabilities)(QXLInstance *qin,
+ uint8_t client_present,
+ uint8_t caps[58]);
};
struct QXLInstance {
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits
2012-09-03 17:53 ` [Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 2/5] Add new set_client_capabilities() interface to QXLInstance Søren Sandmann
@ 2012-09-03 17:53 ` Søren Sandmann
2012-09-03 18:31 ` [Qemu-devel] [Spice-devel] " Alon Levy
2012-09-03 17:53 ` [Qemu-devel] [PATCH 4/5] Set a8 capability in the QXL device if supported by the client Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 5/5] Bump spice.h version number to 0.11.4 Søren Sandmann
3 siblings, 1 reply; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:53 UTC (permalink / raw)
To: spice-devel, qemu-devel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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 see a command that it
doesn't understand (under the assumption that the guest will read and
obey the capability bits).
---
server/red_worker.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index 60b5471..f87967c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9493,6 +9493,11 @@ static void on_new_display_channel_client(DisplayChannelClient *dcc)
}
red_channel_client_ack_zero_messages_window(&dcc->common.base);
if (worker->surfaces[0].context.canvas) {
+ int ring_is_empty;
+
+ while (red_process_commands(worker, MAX_PIPE_SIZE, &ring_is_empty)) {
+ }
+
red_current_flush(worker, 0);
push_new_primary_surface(dcc);
red_push_surface_image(dcc, 0);
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [Spice-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits
2012-09-03 17:53 ` [Qemu-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits Søren Sandmann
@ 2012-09-03 18:31 ` Alon Levy
0 siblings, 0 replies; 38+ messages in thread
From: Alon Levy @ 2012-09-03 18:31 UTC (permalink / raw)
To: Søren Sandmann; +Cc: Søren Sandmann Pedersen, spice-devel, qemu-devel
> From: Søren Sandmann Pedersen <ssp@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 see a command that it
> doesn't understand (under the assumption that the guest will read and
> obey the capability bits).
ACK.
We really should have some sort of fence mechanism for this. This patch will still work, since the command ring is 32 items long, so it should be relatively cheap to flush it (each item is a single comamnd. worse case can be 32*video_mem). There is still a race - the guest has to handle the interrupt before sending any new commands.
In the future we could introduce a new command called QXLFence and have the interrupt handler call a new io to return it just before pushing it to the ring. The fence would be used only in the server right now, but when the driver releases it it can use it to know all commands before it have been processed (note that it doesn't mean all those commands have been released).
> ---
> server/red_worker.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 60b5471..f87967c 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -9493,6 +9493,11 @@ static void
> on_new_display_channel_client(DisplayChannelClient *dcc)
> }
> red_channel_client_ack_zero_messages_window(&dcc->common.base);
> if (worker->surfaces[0].context.canvas) {
> + int ring_is_empty;
> +
> + while (red_process_commands(worker, MAX_PIPE_SIZE,
> &ring_is_empty)) {
> + }
> +
> red_current_flush(worker, 0);
> push_new_primary_surface(dcc);
> red_push_surface_image(dcc, 0);
> --
> 1.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 4/5] Set a8 capability in the QXL device if supported by the client
2012-09-03 17:53 ` [Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 2/5] Add new set_client_capabilities() interface to QXLInstance Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 3/5] Process outstanding commands in the ring after changing capability bits Søren Sandmann
@ 2012-09-03 17:53 ` Søren Sandmann
2012-09-03 17:53 ` [Qemu-devel] [PATCH 5/5] Bump spice.h version number to 0.11.4 Søren Sandmann
3 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:53 UTC (permalink / raw)
To: spice-devel, qemu-devel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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/red_worker.c
@@ -10377,6 +10377,8 @@ static void handle_new_display_channel(RedWorker *worker, RedClient *client, Red
SET_CAP(caps, SPICE_DISPLAY_CAP_MONITORS_CONFIG);
if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_COMPOSITE))
SET_CAP(caps, SPICE_DISPLAY_CAP_COMPOSITE);
+ if (red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_COMPOSITE))
+ SET_CAP(caps, SPICE_DISPLAY_CAP_A8_SURFACE);
worker->qxl->st->qif->set_client_capabilities(worker->qxl, TRUE, caps);
}
diff --git a/spice-common b/spice-common
index 86e286b..04dc2be 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit 86e286ba2003c206e700fd70ec67c1cf4ac8d8a6
+Subproject commit 04dc2bee9ecdda7d7966f9267df37ab23bb5a802
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 5/5] Bump spice.h version number to 0.11.4
2012-09-03 17:53 ` [Qemu-devel] [PATCH 1/5] client: Advertise A8_SURFACE capability Søren Sandmann
` (2 preceding siblings ...)
2012-09-03 17:53 ` [Qemu-devel] [PATCH 4/5] Set a8 capability in the QXL device if supported by the client Søren Sandmann
@ 2012-09-03 17:53 ` Søren Sandmann
3 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:53 UTC (permalink / raw)
To: spice-devel, qemu-devel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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/spice.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/spice.h b/server/spice.h
index 9d65efa..71adfb6 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -22,7 +22,7 @@
#include <sys/socket.h>
#include <spice/qxl_dev.h>
-#define SPICE_SERVER_VERSION 0x000b02 /* release 0.11.2 */
+#define SPICE_SERVER_VERSION 0x000b04 /* release 0.11.4 */
/* interface base type */
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH-v2 spice 2/2] Bump spice.h version number to 0.11.4
2012-09-02 21:35 ` [Qemu-devel] New patches to add capabilities to spice and qxl Søren Sandmann Pedersen
` (3 preceding siblings ...)
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice 1/2] Set a8 capability in the QXL device if supported by the client Søren Sandmann Pedersen
@ 2012-09-02 21:35 ` Søren Sandmann Pedersen
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface Søren Sandmann Pedersen
5 siblings, 0 replies; 38+ messages in thread
From: Søren Sandmann Pedersen @ 2012-09-02 21:35 UTC (permalink / raw)
To: qemu-devel, spice-devel; +Cc: kraxel, 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(+), 1 deletion(-)
diff --git a/server/spice.h b/server/spice.h
index 9d65efa..71adfb6 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -22,7 +22,7 @@
#include <sys/socket.h>
#include <spice/qxl_dev.h>
-#define SPICE_SERVER_VERSION 0x000b02 /* release 0.11.2 */
+#define SPICE_SERVER_VERSION 0x000b04 /* release 0.11.4 */
/* interface base type */
--
1.7.11.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-02 21:35 ` [Qemu-devel] New patches to add capabilities to spice and qxl Søren Sandmann Pedersen
` (4 preceding siblings ...)
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 spice 2/2] " Søren Sandmann Pedersen
@ 2012-09-02 21:35 ` Søren Sandmann Pedersen
2012-09-03 17:36 ` [Qemu-devel] [Spice-devel] " Søren Sandmann
2012-09-04 10:12 ` [Qemu-devel] [PATCH-v2 qemu] " Gerd Hoffmann
5 siblings, 2 replies; 38+ messages in thread
From: Søren Sandmann Pedersen @ 2012-09-02 21:35 UTC (permalink / raw)
To: qemu-devel, spice-devel; +Cc: kraxel, 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: Soren Sandmann <ssp@redhat.com>
---
hw/qxl.c | 29 ++++++++++++++++++++++++++++-
hw/qxl.h | 2 +-
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index c2dd3b4..1f62529 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -901,6 +901,26 @@ static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token)
}
}
+#if SPICE_SERVER_VERSION >= 0x000b04
+
+/* called from spice server thread context only */
+static void interface_set_client_capabilities(QXLInstance *sin,
+ uint8_t client_present,
+ uint8_t caps[58])
+{
+ PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
+
+ qxl->shadow_rom.client_present = client_present;
+ memcpy(qxl->shadow_rom.client_capabilities, caps, sizeof(caps));
+ qxl->rom->client_present = client_present;
+ memcpy(qxl->rom->client_capabilities, caps, sizeof(caps));
+ qxl_rom_set_dirty(qxl);
+
+ qxl_send_events(qxl, QXL_INTERRUPT_CLIENT);
+}
+
+#endif
+
static const QXLInterface qxl_interface = {
.base.type = SPICE_INTERFACE_QXL,
.base.description = "qxl gpu",
@@ -922,6 +942,9 @@ static const QXLInterface qxl_interface = {
.flush_resources = interface_flush_resources,
.async_complete = interface_async_complete,
.update_area_complete = interface_update_area_complete,
+#if SPICE_SERVER_VERSION >= 0x000b04
+ .set_client_capabilities = interface_set_client_capabilities,
+#endif
};
static void qxl_enter_vga_mode(PCIQXLDevice *d)
@@ -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 */
+#if QXL_COMMAND_FLAG_COMPAT_16BPP /* new in spice 0.6.1 */
if (mode->bits == 16) {
d->cmdflags |= QXL_COMMAND_FLAG_COMPAT_16BPP;
}
@@ -1785,6 +1808,10 @@ static int qxl_init_common(PCIQXLDevice *qxl)
io_size = 16;
break;
case 3: /* qxl-3 */
+ pci_device_rev = QXL_REVISION_STABLE_V10;
+ io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
+ break;
+ case 4:
default:
pci_device_rev = QXL_DEFAULT_REVISION;
io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
diff --git a/hw/qxl.h b/hw/qxl.h
index 172baf6..98d5a64 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -128,7 +128,7 @@ typedef struct PCIQXLDevice {
} \
} while (0)
-#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
+#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12
/* qxl.c */
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
--
1.7.11.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [Spice-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface Søren Sandmann Pedersen
@ 2012-09-03 17:36 ` Søren Sandmann
2012-09-03 17:40 ` [Qemu-devel] [PATCH] " Søren Sandmann
2012-09-04 10:12 ` [Qemu-devel] [PATCH-v2 qemu] " Gerd Hoffmann
1 sibling, 1 reply; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:36 UTC (permalink / raw)
To: Søren Sandmann Pedersen; +Cc: spice-devel, qemu-devel
Søren Sandmann Pedersen <ssp@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 */
> +#if QXL_COMMAND_FLAG_COMPAT_16BPP /* new in spice 0.6.1 */
> if (mode->bits == 16) {
> d->cmdflags |= QXL_COMMAND_FLAG_COMPAT_16BPP;
> }
This one is obviously a mistake. New patch to follow.
Soren
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-03 17:36 ` [Qemu-devel] [Spice-devel] " Søren Sandmann
@ 2012-09-03 17:40 ` Søren Sandmann
2012-09-03 18:21 ` Alon Levy
0 siblings, 1 reply; 38+ messages in thread
From: Søren Sandmann @ 2012-09-03 17:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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, the QXL_INTERRUPT_CLIENT interrupt
is generated.
Signed-off-by: Soren Sandmann <ssp@redhat.com>
---
hw/qxl.c | 27 +++++++++++++++++++++++++++
hw/qxl.h | 2 +-
2 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index c2dd3b4..ffe1a76 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -901,6 +901,26 @@ static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token)
}
}
+#if SPICE_SERVER_VERSION >= 0x000b04
+
+/* called from spice server thread context only */
+static void interface_set_client_capabilities(QXLInstance *sin,
+ uint8_t client_present,
+ uint8_t caps[58])
+{
+ PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
+
+ qxl->shadow_rom.client_present = client_present;
+ memcpy(qxl->shadow_rom.client_capabilities, caps, sizeof(caps));
+ qxl->rom->client_present = client_present;
+ memcpy(qxl->rom->client_capabilities, caps, sizeof(caps));
+ qxl_rom_set_dirty(qxl);
+
+ qxl_send_events(qxl, QXL_INTERRUPT_CLIENT);
+}
+
+#endif
+
static const QXLInterface qxl_interface = {
.base.type = SPICE_INTERFACE_QXL,
.base.description = "qxl gpu",
@@ -922,6 +942,9 @@ static const QXLInterface qxl_interface = {
.flush_resources = interface_flush_resources,
.async_complete = interface_async_complete,
.update_area_complete = interface_update_area_complete,
+#if SPICE_SERVER_VERSION >= 0x000b04
+ .set_client_capabilities = interface_set_client_capabilities,
+#endif
};
static void qxl_enter_vga_mode(PCIQXLDevice *d)
@@ -1785,6 +1808,10 @@ static int qxl_init_common(PCIQXLDevice *qxl)
io_size = 16;
break;
case 3: /* qxl-3 */
+ pci_device_rev = QXL_REVISION_STABLE_V10;
+ io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
+ break;
+ case 4:
default:
pci_device_rev = QXL_DEFAULT_REVISION;
io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
diff --git a/hw/qxl.h b/hw/qxl.h
index 172baf6..98d5a64 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -128,7 +128,7 @@ typedef struct PCIQXLDevice {
} \
} while (0)
-#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
+#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12
/* qxl.c */
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-03 17:40 ` [Qemu-devel] [PATCH] " Søren Sandmann
@ 2012-09-03 18:21 ` Alon Levy
0 siblings, 0 replies; 38+ messages in thread
From: Alon Levy @ 2012-09-03 18:21 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Søren Sandmann Pedersen, qemu-devel
> From: Søren Sandmann Pedersen <ssp@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, the QXL_INTERRUPT_CLIENT interrupt
> is generated.
>
> Signed-off-by: Soren Sandmann <ssp@redhat.com>
> ---
> hw/qxl.c | 27 +++++++++++++++++++++++++++
> hw/qxl.h | 2 +-
> 2 files changed, 28 insertions(+), 1 deletions(-)
>
> diff --git a/hw/qxl.c b/hw/qxl.c
> index c2dd3b4..ffe1a76 100644
> --- a/hw/qxl.c
> +++ b/hw/qxl.c
> @@ -901,6 +901,26 @@ static void interface_async_complete(QXLInstance
> *sin, uint64_t cookie_token)
> }
> }
>
> +#if SPICE_SERVER_VERSION >= 0x000b04
> +
> +/* called from spice server thread context only */
> +static void interface_set_client_capabilities(QXLInstance *sin,
> + uint8_t client_present,
> + uint8_t caps[58])
> +{
> + PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
> +
> + qxl->shadow_rom.client_present = client_present;
> + memcpy(qxl->shadow_rom.client_capabilities, caps, sizeof(caps));
> + qxl->rom->client_present = client_present;
> + memcpy(qxl->rom->client_capabilities, caps, sizeof(caps));
> + qxl_rom_set_dirty(qxl);
> +
> + qxl_send_events(qxl, QXL_INTERRUPT_CLIENT);
> +}
> +
> +#endif
> +
> static const QXLInterface qxl_interface = {
> .base.type = SPICE_INTERFACE_QXL,
> .base.description = "qxl gpu",
> @@ -922,6 +942,9 @@ static const QXLInterface qxl_interface = {
> .flush_resources = interface_flush_resources,
> .async_complete = interface_async_complete,
> .update_area_complete = interface_update_area_complete,
> +#if SPICE_SERVER_VERSION >= 0x000b04
> + .set_client_capabilities = interface_set_client_capabilities,
> +#endif
> };
>
> static void qxl_enter_vga_mode(PCIQXLDevice *d)
> @@ -1785,6 +1808,10 @@ static int qxl_init_common(PCIQXLDevice *qxl)
> io_size = 16;
> break;
> case 3: /* qxl-3 */
> + pci_device_rev = QXL_REVISION_STABLE_V10;
> + io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
> + break;
> + case 4:
> default:
> pci_device_rev = QXL_DEFAULT_REVISION;
> io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
> diff --git a/hw/qxl.h b/hw/qxl.h
> index 172baf6..98d5a64 100644
> --- a/hw/qxl.h
> +++ b/hw/qxl.h
> @@ -128,7 +128,7 @@ typedef struct PCIQXLDevice {
> }
> \
> } while (0)
>
> -#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
> +#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12
QXL_REVISION_STABLE_V12 is only defined in latest spice-protocol, too new for the qemu required version.
Gerd, maybe it's a good idea to require spice-protocol 0.12.1, now that it's released? this will remove a lot of cruft.
>
> /* qxl.c */
> void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int
> group_id);
> --
> 1.7.4
>
>
>
^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-02 21:35 ` [Qemu-devel] [PATCH-v2 qemu] qxl: Add set_client_capabilities() interface to QXLInterface Søren Sandmann Pedersen
2012-09-03 17:36 ` [Qemu-devel] [Spice-devel] " Søren Sandmann
@ 2012-09-04 10:12 ` Gerd Hoffmann
2012-09-04 14:14 ` [Qemu-devel] [PATCH 1/2] " Søren Sandmann
1 sibling, 1 reply; 38+ messages in thread
From: Gerd Hoffmann @ 2012-09-04 10:12 UTC (permalink / raw)
To: Søren Sandmann Pedersen; +Cc: spice-devel, qemu-devel
Hi,
> static void qxl_enter_vga_mode(PCIQXLDevice *d)
> @@ -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 */
> +#if QXL_COMMAND_FLAG_COMPAT_16BPP /* new in spice 0.6.1 */
Unrelated change in there.
btw: we require spice-server > 0.8.x anyway, so this #ifdef can go
anyway, but if you do it make it a separate patch please.
> case 3: /* qxl-3 */
> + pci_device_rev = QXL_REVISION_STABLE_V10;
> + io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
> + break;
> + case 4:
Conflicts with queued patches. Please just drop it, I'll go switch to
rev4 by default once we have a spice-server 0.12.0 release & all qemu
patches needed to use the new stuff merged.
> -#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
> +#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12
Likewise.
cheers,
Gerd
^ permalink raw reply [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 1/2] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-04 10:12 ` [Qemu-devel] [PATCH-v2 qemu] " Gerd Hoffmann
@ 2012-09-04 14:14 ` Søren Sandmann
2012-09-04 14:14 ` [Qemu-devel] [PATCH 2/2] Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPP Søren Sandmann
2012-09-04 14:46 ` [Qemu-devel] [PATCH 1/2] qxl: Add set_client_capabilities() interface to QXLInterface Gerd Hoffmann
0 siblings, 2 replies; 38+ messages in thread
From: Søren Sandmann @ 2012-09-04 14:14 UTC (permalink / raw)
To: qemu-devel, kraxel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@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, the QXL_INTERRUPT_CLIENT interrupt
is generated.
Signed-off-by: Soren Sandmann <ssp@redhat.com>
---
hw/qxl.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index c2dd3b4..572daa9 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -901,6 +901,26 @@ static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token)
}
}
+#if SPICE_SERVER_VERSION >= 0x000b04
+
+/* called from spice server thread context only */
+static void interface_set_client_capabilities(QXLInstance *sin,
+ uint8_t client_present,
+ uint8_t caps[58])
+{
+ PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
+
+ qxl->shadow_rom.client_present = client_present;
+ memcpy(qxl->shadow_rom.client_capabilities, caps, sizeof(caps));
+ qxl->rom->client_present = client_present;
+ memcpy(qxl->rom->client_capabilities, caps, sizeof(caps));
+ qxl_rom_set_dirty(qxl);
+
+ qxl_send_events(qxl, QXL_INTERRUPT_CLIENT);
+}
+
+#endif
+
static const QXLInterface qxl_interface = {
.base.type = SPICE_INTERFACE_QXL,
.base.description = "qxl gpu",
@@ -922,6 +942,9 @@ static const QXLInterface qxl_interface = {
.flush_resources = interface_flush_resources,
.async_complete = interface_async_complete,
.update_area_complete = interface_update_area_complete,
+#if SPICE_SERVER_VERSION >= 0x000b04
+ .set_client_capabilities = interface_set_client_capabilities,
+#endif
};
static void qxl_enter_vga_mode(PCIQXLDevice *d)
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* [Qemu-devel] [PATCH 2/2] Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPP
2012-09-04 14:14 ` [Qemu-devel] [PATCH 1/2] " Søren Sandmann
@ 2012-09-04 14:14 ` Søren Sandmann
2012-09-04 14:46 ` [Qemu-devel] [PATCH 1/2] qxl: Add set_client_capabilities() interface to QXLInterface Gerd Hoffmann
1 sibling, 0 replies; 38+ messages in thread
From: Søren Sandmann @ 2012-09-04 14:14 UTC (permalink / raw)
To: qemu-devel, kraxel; +Cc: Søren Sandmann Pedersen
From: Søren Sandmann Pedersen <ssp@redhat.com>
We require spice >= 0.8 now, so this flag is always present.
Signed-off-by: Soren Sandmann <ssp@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
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1315,11 +1315,9 @@ 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 */
if (mode->bits == 16) {
d->cmdflags |= QXL_COMMAND_FLAG_COMPAT_16BPP;
}
-#endif
d->shadow_rom.mode = cpu_to_le32(modenr);
d->rom->mode = cpu_to_le32(modenr);
qxl_rom_set_dirty(d);
--
1.7.4
^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] qxl: Add set_client_capabilities() interface to QXLInterface
2012-09-04 14:14 ` [Qemu-devel] [PATCH 1/2] " Søren Sandmann
2012-09-04 14:14 ` [Qemu-devel] [PATCH 2/2] Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPP Søren Sandmann
@ 2012-09-04 14:46 ` Gerd Hoffmann
1 sibling, 0 replies; 38+ messages in thread
From: Gerd Hoffmann @ 2012-09-04 14:46 UTC (permalink / raw)
To: Søren Sandmann; +Cc: qemu-devel, Søren Sandmann Pedersen
Hi,
> +static void interface_set_client_capabilities(QXLInstance *sin,
> + uint8_t client_present,
> + uint8_t caps[58])
Please don't use tabs for intention in qemu patches.
Fixed it up this time, added both patches to the spice patch queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 38+ messages in thread