From: Alon Levy <alevy@redhat.com>
To: "Søren Sandmann" <sandmann@cs.au.dk>
Cc: "Søren Sandmann Pedersen" <ssp@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
spice-devel@freedesktop.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Spice-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom
Date: Wed, 29 Aug 2012 13:14:57 +0300 [thread overview]
Message-ID: <20120829101457.GC32547@garlic.redhat.com> (raw)
In-Reply-To: <ye8wr0iecpl.fsf@llama11.cs.au.dk>
On Wed, Aug 29, 2012 at 02:58:14AM +0200, Søren Sandmann wrote:
> Gerd Hoffmann <kraxel@redhat.com> writes:
>
> > On 08/27/12 19:20, Søren Sandmann Pedersen wrote:
> >> From: Søren Sandmann Pedersen <ssp@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.
> >
> > What is supposed to happen in case multiple clients are connected?
>
> Is this case supported at all?
>
> If it is, I'd say that the guest should not be aware of it and the bits
> advertise should be interpreted as "these are the capabilities that
> spice-server will marshall on to the clients that are
> connected". Presumably spice-server would then set the bit vector to the
> intersection of all the clients.
>
> > How do you handle the race conditions, especially on capability
> > downgrade? There might be not-yet processed commands in the command
> > queue which the client is unable to handle, or existing surfaces using
> > formats the client doesn't understand ...
>
> 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 spice-server to say whether that is
> feasible.
Sending a surface with a format the client doesn't recognize as an image
- how does that help? you'd want to render anything dependent on that
surface. And then the guest will be notified of the reduced
capabilities and needs to never use those surfaces again (better yet,
destroy them since they are just taking space).
The rendering is already accomplished in on_new_display_channel_client
with the red_flush_current(worker, 0) call, which recursively goes to
all the dependent surfaces of each drawable and renders it too.
>
> For commands, would it work for spice-server to just process everything
> in the command ring after changing the capability bits (ie., in possibly
> brief moment before a new client connects)? It seems that would be a
> good thing to do even without capability bits.
This should work. Something like this I guess: (probably only if
capabilities have changed - otherwise no need. And without
MAX_PIPE_SIZE, although I'm not sure what you would put instead.):
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9493,6 +9493,10 @@ 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);
>
>
> Søren
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
next prev parent reply other threads:[~2012-08-29 10:15 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 17:20 [Qemu-devel] Add ability to advertise client capabilities to QXL device Søren Sandmann Pedersen
2012-08-27 17:20 ` [Qemu-devel] [PATCH] Add new client_present and client capabilities fields to QXLRom Søren Sandmann Pedersen
2012-08-28 6:15 ` Gerd Hoffmann
2012-08-29 0:58 ` Søren Sandmann
2012-08-29 6:00 ` Gerd Hoffmann
2012-08-29 21:05 ` Søren Sandmann
2012-08-29 10:14 ` Alon Levy [this message]
2012-08-29 20:51 ` [Qemu-devel] [Spice-devel] " Søren Sandmann
2012-08-30 5:34 ` Gerd Hoffmann
2012-08-30 16:03 ` Søren Sandmann
2012-08-31 7:32 ` Gerd Hoffmann
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 ` [Qemu-devel] [PATCH-v2 spice-gtk] Advertise SPICE_DISPLAY_CAP_A8_SURFACE 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
2012-09-03 7:34 ` Alon Levy
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
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 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
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
2012-09-03 17:36 ` [Qemu-devel] [Spice-devel] " Søren Sandmann
2012-09-03 17:40 ` [Qemu-devel] [PATCH] " Søren Sandmann
2012-09-03 18:21 ` Alon Levy
2012-09-04 10:12 ` [Qemu-devel] [PATCH-v2 qemu] " Gerd Hoffmann
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 ` [Qemu-devel] [PATCH 1/2] qxl: Add set_client_capabilities() interface to QXLInterface Gerd Hoffmann
2012-08-27 17:20 ` [Qemu-devel] [PATCH] Add new set_client_capabilities() interface to QXLInstance Søren Sandmann Pedersen
2012-08-27 17:20 ` [Qemu-devel] [PATCH] qxl: Add set_client_capabilities() interface to QXLInterface Søren Sandmann Pedersen
2012-08-28 6:19 ` Gerd Hoffmann
2012-08-27 17:20 ` [Qemu-devel] Add ability to advertise client capabilities to QXL device Søren Sandmann Pedersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120829101457.GC32547@garlic.redhat.com \
--to=alevy@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sandmann@cs.au.dk \
--cc=spice-devel@freedesktop.org \
--cc=ssp@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).