[Spice-commits] 2 commits - server/reds.cpp server/red-worker.cpp
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 29 10:06:13 UTC 2021
server/red-worker.cpp | 4 +++-
server/reds.cpp | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 51073b98cb207bc51b442f8dada99c191f1f8b73
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Jan 28 14:00:49 2021 +0400
worker: ignore subsequent stop messages
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Frediano Ziglio <freddy77 at gmail.com>
diff --git a/server/red-worker.cpp b/server/red-worker.cpp
index 31a3731f..205cc28f 100644
--- a/server/red-worker.cpp
+++ b/server/red-worker.cpp
@@ -515,7 +515,9 @@ static void handle_dev_stop(void *opaque, void *payload)
RedWorker *worker = (RedWorker*) opaque;
spice_debug("stop");
- spice_assert(red_qxl_is_running(worker->qxl));
+ if (!red_qxl_is_running(worker->qxl)) {
+ return;
+ }
red_qxl_set_running(worker->qxl, false);
display_channel_update_qxl_running(worker->display_channel, false);
commit c23cbd6fa821fea8ac4ed97ca679afebe2333c8c
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Jan 28 13:59:24 2021 +0400
reds: start QXL devices if VM is running
Like char devices, QXL devices need to be explicily started.
For some historical reason, char devices are started when in running
state. See commi bf1d9007b. Reading that commit comments, there was a
plan to provide an API to stop/start devices invidually, but that never
happened. Whether that API would really be useful now, I wonder.
For now, just follow the char devices behaviour and start QXL devices
added when vm_running.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.uuuuucom>
Acked-by: Frediano Ziglio <freddy77 at gmail.com>
diff --git a/server/reds.cpp b/server/reds.cpp
index f61086cb..31a02ce2 100644
--- a/server/reds.cpp
+++ b/server/reds.cpp
@@ -3255,6 +3255,9 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds,
* be called. */
red_qxl_attach_worker(qxl);
red_qxl_set_compression_level(qxl, calc_compression_level(reds));
+ if (reds->vm_running) {
+ red_qxl_start(qxl);
+ }
} else if (strcmp(base_interface->type, SPICE_INTERFACE_TABLET) == 0) {
SpiceTabletInstance *tablet = SPICE_UPCAST(SpiceTabletInstance, sin);
spice_debug("SPICE_INTERFACE_TABLET");
More information about the Spice-commits
mailing list