summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-09-10 16:24:54 +0300
committerAlon Levy <alevy@redhat.com>2012-09-13 14:47:31 +0300
commitce42c76aed852eb88086ec371acf899d666ca3c6 (patch)
tree87c205103938b5a8db5313d8419805cdb98ba7a5
parent9b2e52f2bc4dec8ca8f34c8d6b3d9b8c5fe69c56 (diff)
downloadspice-ce42c76aed852eb88086ec371acf899d666ca3c6.tar.gz
spice-ce42c76aed852eb88086ec371acf899d666ca3c6.tar.xz
spice-ce42c76aed852eb88086ec371acf899d666ca3c6.zip
server: add QXLInterface::client_monitors_config
Used to implement guest monitor configuration change similarly to real hardware in conjunction with the new qemu interrupt QXL_INTERRUPT_CLIENT_MONITORS_CONFIG. client_monitors_config is also used to probe the support by the interface. If it is not supported we send the message to the guest agent. This makes a linux qxl driver similar to existing kms drivers. The logic is: For every received VDAgentMonitorsConfig: if client_monitors_config(NULL): write client configuration to pci rom BAR. send interrupt to guest guest kernel reads configuration from rom BAR. guest kernel issues event to user space user space reads (libdrm) and reconfigures (libXRandr) else: (current implementation) write message to guest agent guest agent issues reconfiguration via XRandr / windows Escape ioctl to kernel
-rw-r--r--server/spice.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/server/spice.h b/server/spice.h
index 2b2ed36a..2b949062 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -21,6 +21,7 @@
#include <stdint.h>
#include <sys/socket.h>
#include <spice/qxl_dev.h>
+#include <spice/vd_agent.h>
#define SPICE_SERVER_VERSION 0x000b04 /* release 0.11.4 */
@@ -96,7 +97,7 @@ struct SpiceCoreInterface {
#define SPICE_INTERFACE_QXL "qxl"
#define SPICE_INTERFACE_QXL_MAJOR 3
-#define SPICE_INTERFACE_QXL_MINOR 2
+#define SPICE_INTERFACE_QXL_MINOR 3
typedef struct QXLInterface QXLInterface;
typedef struct QXLInstance QXLInstance;
typedef struct QXLState QXLState;
@@ -240,8 +241,13 @@ struct QXLInterface {
struct QXLRect *updated_rects,
uint32_t num_updated_rects);
void (*set_client_capabilities)(QXLInstance *qin,
- uint8_t client_present,
- uint8_t caps[58]);
+ uint8_t client_present,
+ uint8_t caps[58]);
+ /* returns 1 if the interface is supported, 0 otherwise.
+ * if monitors_config is NULL nothing is done except reporting the
+ * return code. */
+ int (*client_monitors_config)(QXLInstance *qin,
+ VDAgentMonitorsConfig *monitors_config);
};
struct QXLInstance {