[Spice-commits] 2 commits - spice/stream-device.h spice/vd_agent.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 16 13:51:35 UTC 2019
spice/stream-device.h | 31 +++++++++++++++++++++++++++++++
spice/vd_agent.h | 23 +++++++++++++++++++++++
2 files changed, 54 insertions(+)
New commits:
commit 5ab9f2f7a5b99333ac6b2e24fe5d3232a18e162f
Author: Lukáš Hrázký <lhrazky at redhat.com>
Date: Wed Jan 16 13:52:44 2019 +0100
Add the StreamMsgGraphicsDeviceInfo message
The message contains information about the graphics device and monitor
belonging to a particular video stream (which maps to a channel) from
the streaming agent.
Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/spice/stream-device.h b/spice/stream-device.h
index 6add42b..c70690a 100644
--- a/spice/stream-device.h
+++ b/spice/stream-device.h
@@ -90,6 +90,8 @@ typedef enum StreamMsgType {
STREAM_TYPE_CURSOR_SET,
/* guest cursor position */
STREAM_TYPE_CURSOR_MOVE,
+ /* the graphics device display information message (device address and display id) */
+ STREAM_TYPE_DEVICE_DISPLAY_INFO,
} StreamMsgType;
typedef enum StreamCapabilities {
@@ -140,6 +142,35 @@ typedef struct StreamMsgData {
uint8_t data[0];
} StreamMsgData;
+/* This message contains information about the graphics device and monitor
+ * belonging to a particular video stream (which maps to a channel) from
+ * the streaming agent.
+ *
+ * The device_address is the hardware address of the device (e.g. PCI),
+ * device_display_id is the id of the monitor on the device.
+ *
+ * The supported device address format is:
+ * "pci/<DOMAIN>/<SLOT>.<FUNCTION>/.../<SLOT>.<FUNCTION>"
+ *
+ * The "pci" identifies the rest of the string as a PCI address. It is the only
+ * supported address at the moment, other identifiers can be introduced later.
+ * <DOMAIN> is the PCI domain, followed by <SLOT>.<FUNCTION> of any PCI bridges
+ * in the chain leading to the device. The last <SLOT>.<FUNCTION> is the
+ * graphics device. All of <DOMAIN>, <SLOT>, <FUNCTION> are hexadecimal numbers
+ * with the following number of digits:
+ * <DOMAIN>: 4
+ * <SLOT>: 2
+ * <FUNCTION>: 1
+ *
+ * Sent from the streaming agent to the server.
+ */
+typedef struct StreamMsgDeviceDisplayInfo {
+ uint32_t stream_id;
+ uint32_t device_display_id;
+ uint32_t device_address_len;
+ uint8_t device_address[0]; // a zero-terminated string
+} StreamMsgDeviceDisplayInfo;
+
/* Tell to stop current stream and possibly start a new one.
* This message is sent by the host to the guest.
* Allows to communicate the codecs supported by the clients.
commit 839cd8c1dd48321e0e7be440f4603aa9d8b28882
Author: Lukáš Hrázký <lhrazky at redhat.com>
Date: Wed Jan 16 13:52:43 2019 +0100
Add the VDAgentGraphicsDeviceInfo message
The message serves for passing the device address and device display ID
information for all display channels from SPICE server to the vd_agent.
Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index dda7044..42ec77a 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -91,6 +91,7 @@ enum {
VD_AGENT_CLIENT_DISCONNECTED,
VD_AGENT_MAX_CLIPBOARD,
VD_AGENT_AUDIO_VOLUME_SYNC,
+ VD_AGENT_GRAPHICS_DEVICE_INFO,
VD_AGENT_END_MESSAGE,
};
@@ -248,6 +249,27 @@ typedef struct SPICE_ATTR_PACKED VDAgentAudioVolumeSync {
uint16_t volume[0];
} VDAgentAudioVolumeSync;
+typedef struct SPICE_ATTR_PACKED VDAgentDeviceDisplayInfo {
+ uint32_t channel_id;
+ uint32_t monitor_id;
+ uint32_t device_display_id;
+ uint32_t device_address_len;
+ uint8_t device_address[0]; // a zero-terminated string
+} VDAgentDeviceDisplayInfo;
+
+
+/* This message contains the mapping of (channel_id, monitor_id) pair to a
+ * "physical" (virtualized) device and its monitor identified by device_address
+ * and device_display_id.
+ *
+ * It's used on the vd_agent to identify the guest monitors for the
+ * mouse_position and monitors_config messages.
+ */
+typedef struct SPICE_ATTR_PACKED VDAgentGraphicsDeviceInfo {
+ uint32_t count;
+ VDAgentDeviceDisplayInfo display_info[0];
+} VDAgentGraphicsDeviceInfo;
+
enum {
VD_AGENT_CAP_MOUSE_STATE = 0,
VD_AGENT_CAP_MONITORS_CONFIG,
@@ -264,6 +286,7 @@ enum {
VD_AGENT_CAP_MONITORS_CONFIG_POSITION,
VD_AGENT_CAP_FILE_XFER_DISABLED,
VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS,
+ VD_AGENT_CAP_GRAPHICS_DEVICE_INFO,
VD_AGENT_END_CAP,
};
More information about the Spice-commits
mailing list