[Spice-devel,3/7] server: add QXLInterface::client_monitors_config

Submitted by Alon Levy on Sept. 10, 2012, 3:43 p.m.


Message ID 1347291842-11047-4-git-send-email-alevy@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy Sept. 10, 2012, 3:43 p.m.
Used to implement guest monitor configuration change similarly to real
hardware in conjunction with the new qemu interrupt
QXL_INTERRUPT_CLIENT_MONITORS_CONFIG. Together with the added guest
capabilities allows to select the right mode during runtime. This makes
a linux qxl driver similar to existing kms drivers.

The logic is:

For every received VDAgentMonitorsConfig:
 if guest supports QXL_CAP_MONITORS_CONFIG_ISR: (only kms driver)
  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
 server/spice.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/spice.h b/server/spice.h
index 9ae76c2..65fa6ba 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"
 typedef struct QXLInterface QXLInterface;
 typedef struct QXLInstance QXLInstance;
 typedef struct QXLState QXLState;
@@ -242,8 +243,10 @@  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]);
+    void (*client_monitors_config)(QXLInstance *qin,
+                                   VDAgentMonitorsConfig *monitors_config);
 struct QXLInstance {