summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-08-24 17:53:13 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-09-02 15:15:29 -0400
commit361fd166b26b4450617b1f7175be9aaa7d8f6a7e (patch)
tree7649be30ec8385dd8c317ebe73b7263baf2536c0
parent8459b35ec0a2c1cddd7dab8b726e752bcde4c609 (diff)
Add new client_present and client capabilities fields to QXLRomsetcaps
The client_present field is a byte that is set of non-zero when a client is connected and to zero when no client is connected. The client_capabilities[58] array contains 464 bits that indicate the capabilities of the client. Each bit corresponds to a SPICE_DISPLAY_CAP_* capability. In particular, if the client has capability C, then bit (C % 8) in byte (C / 8) is set. The capability bits only have a defined meaning when a client is connected, ie., when client_present is non-zero. The number 58 was chosen to fill out a cache line in QXLRom. A new QXL_INTERRUPT_CLIENT interrupt is defined, which will be raised whenever a client connects or disconnects.
-rw-r--r--spice/qxl_dev.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 1292767..50784dc 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -148,7 +148,9 @@ typedef struct SPICE_ATTR_PACKED QXLRom {
uint8_t slot_gen_bits;
uint8_t slot_id_bits;
uint8_t slot_generation;
- uint8_t padding[3]; /* Padding to 32bit align */
+ /* appended for qxl-4 */
+ uint8_t client_present;
+ uint8_t client_capabilities[58];
} QXLRom;
/* qxl-1 compat: fixed */
@@ -231,6 +233,7 @@ SPICE_RING_DECLARE(QXLReleaseRing, uint64_t, QXL_RELEASE_RING_SIZE);
#define QXL_INTERRUPT_CURSOR (1 << 1)
#define QXL_INTERRUPT_IO_CMD (1 << 2)
#define QXL_INTERRUPT_ERROR (1 << 3)
+#define QXL_INTERRUPT_CLIENT (1 << 4)
/* qxl-1 compat: append only */
typedef struct SPICE_ATTR_PACKED QXLRam {