support multiple monitors on a single display channel

Adds on device:

RAM
 Header
  monitors_config - pointer

 QXLMonitorsConfig
  count == n
  max_allowed = N >= 0
  QXLHead 1
  ...
  QXLHead n
   id, surface_id, x, y, width, height, flags

IO:
 QXL_IO_MONITORS_CONFIG
  server flushes command ring, then calls server callback for changing monitors config.

New revision to let the driver know about the new io:
 QXL_REVISION_STABLE_V12=0x04,

Adds server/client capability:
 SPICE_DISPLAY_CAP_MONITORS_CONFIG

Server message will be added in spice-server and spice-common.

Version is bumped to 0.12.0 to indicate new IO and structs
This commit is contained in:
Alon Levy 2012-06-07 14:30:34 +03:00
parent 86eb1a334e
commit da908f89b5
4 changed files with 34 additions and 3 deletions

View File

@ -1,8 +1,8 @@
AC_PREREQ([2.57])
m4_define([SPICE_MAJOR], 0)
m4_define([SPICE_MINOR], 10)
m4_define([SPICE_MICRO], 3)
m4_define([SPICE_MINOR], 12)
m4_define([SPICE_MICRO], 0)
AC_INIT(spice-protocol, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice-protocol)

View File

@ -430,6 +430,7 @@ enum {
SPICE_MSG_DISPLAY_SURFACE_CREATE,
SPICE_MSG_DISPLAY_SURFACE_DESTROY,
SPICE_MSG_DISPLAY_STREAM_DATA_SIZED,
SPICE_MSG_DISPLAY_MONITORS_CONFIG,
SPICE_MSG_END_DISPLAY
};

View File

@ -124,6 +124,7 @@ enum {
enum {
SPICE_DISPLAY_CAP_SIZED_STREAM,
SPICE_DISPLAY_CAP_MONITORS_CONFIG,
};
#include <spice/end-packed.h>

View File

@ -47,7 +47,8 @@
enum {
QXL_REVISION_STABLE_V04=0x01,
QXL_REVISION_STABLE_V06=0x02,
QXL_REVISION_STABLE_V10=0x03
QXL_REVISION_STABLE_V10=0x03,
QXL_REVISION_STABLE_V12=0x04,
};
#define QXL_DEVICE_ID_DEVEL 0x01ff
@ -93,6 +94,8 @@ enum {
QXL_IO_DESTROY_ALL_SURFACES_ASYNC,
QXL_IO_FLUSH_SURFACES_ASYNC,
QXL_IO_FLUSH_RELEASE,
/* appended for qxl-4 */
QXL_IO_MONITORS_CONFIG_ASYNC,
QXL_IO_RANGE_SIZE
};
@ -244,6 +247,12 @@ typedef struct SPICE_ATTR_PACKED QXLRam {
QXLMemSlot mem_slot;
QXLSurfaceCreate create_surface;
uint64_t flags;
/* appended for qxl-4 */
/* used by QXL_IO_MONITORS_CONFIG_ASYNC */
QXLPHYSICAL monitors_config;
} QXLRam;
typedef union QXLReleaseInfo {
@ -653,6 +662,26 @@ typedef struct SPICE_ATTR_PACKED QXLImage {
};
} QXLImage;
/* A QXLHead is a single monitor output backed by a QXLSurface.
* x and y offsets are unsigned since they are used in relation to
* the given surface, not the same as the x, y coordinates in the guest
* screen reference frame. */
typedef struct SPICE_ATTR_PACKED QXLHead {
uint32_t id;
uint32_t surface_id;
uint32_t width;
uint32_t height;
uint32_t x;
uint32_t y;
uint32_t flags;
} QXLHead;
typedef struct SPICE_ATTR_PACKED QXLMonitorsConfig {
uint16_t count;
uint16_t max_allowed; /* If it is 0 no fixed limit is given by the driver */
QXLHead heads[0];
} QXLMonitorsConfig;
#include <spice/end-packed.h>
#endif /* _H_QXL_DEV */