[Spice-devel] [PATCH xf86-video-qxl v2 01/11] xspice: support sending monitors config
Alon Levy
alevy at redhat.com
Sun Sep 8 05:11:43 PDT 2013
Signed-off-by: Alon Levy <alevy at redhat.com>
---
v2: fixed the introduces warnings, and handled read errors in uinput.
src/qxl_io.c | 9 +++++++--
src/spiceqxl_display.c | 10 ++++++++++
src/spiceqxl_display.h | 2 ++
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/qxl_io.c b/src/qxl_io.c
index 37bdc24..8fa90b6 100644
--- a/src/qxl_io.c
+++ b/src/qxl_io.c
@@ -29,6 +29,12 @@
#include <errno.h>
#include <time.h>
#include "qxl.h"
+
+#ifdef XSPICE
+#include "spiceqxl_display.h"
+#endif
+
+
#ifndef XSPICE
static void
qxl_wait_for_io_command (qxl_screen_t *qxl)
@@ -175,11 +181,10 @@ qxl_io_monitors_config_async (qxl_screen_t *qxl)
#ifndef XSPICE
if (qxl->pci->revision < 4)
return;
-
ioport_write (qxl, QXL_IO_MONITORS_CONFIG_ASYNC, 0);
qxl_wait_for_io_command (qxl);
#else
- fprintf (stderr, "UNIMPLEMENTED!\n");
+ spiceqxl_display_monitors_config(qxl);
#endif
}
diff --git a/src/spiceqxl_display.c b/src/spiceqxl_display.c
index b1ce557..9c42d84 100644
--- a/src/spiceqxl_display.c
+++ b/src/spiceqxl_display.c
@@ -307,6 +307,9 @@ static int interface_flush_resources(QXLInstance *sin)
return ret;
}
+static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token)
+{
+}
static const QXLInterface qxl_interface = {
.base.type = SPICE_INTERFACE_QXL,
@@ -327,6 +330,7 @@ static const QXLInterface qxl_interface = {
.req_cursor_notification = interface_req_cursor_notification,
.notify_update = interface_notify_update,
.flush_resources = interface_flush_resources,
+ .async_complete = interface_async_complete,
};
void qxl_add_spice_display_interface(qxl_screen_t *qxl)
@@ -342,3 +346,9 @@ void qxl_add_spice_display_interface(qxl_screen_t *qxl)
qxl->display_sin.st = (struct QXLState*)qxl;
spice_server_add_interface(qxl->spice_server, &qxl->display_sin.base);
}
+
+void spiceqxl_display_monitors_config(qxl_screen_t *qxl)
+{
+ spice_qxl_monitors_config_async(&qxl->display_sin, (QXLPHYSICAL)qxl->monitors_config,
+ MEMSLOT_GROUP, 0);
+}
diff --git a/src/spiceqxl_display.h b/src/spiceqxl_display.h
index 1113f6a..0b17b78 100644
--- a/src/spiceqxl_display.h
+++ b/src/spiceqxl_display.h
@@ -30,4 +30,6 @@ void qxl_add_spice_display_interface(qxl_screen_t *qxl);
/* spice-server to device, now spice-server to xspice */
void qxl_send_events(qxl_screen_t *qxl, int events);
+void spiceqxl_display_monitors_config(qxl_screen_t *qxl);
+
#endif // QXL_SPICE_DISPLAY_H
--
1.8.3.1
More information about the Spice-devel
mailing list