Skip to contentSkip to conversation

Add VIRTIO_GPU_F_EDID to virtio-gpu.

PATCH Superseded Gerd Hoffmann 1 participant 2 messages Oct 24, 2018 – Oct 29, 2018

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Add VIRTIO_GPU_F_EDID to virtio-gpu.

The feature allows the guest request an EDID blob (describing monitor capabilities) for a given scanout (aka virtual monitor connector).

It brings a new command message, which has just a scanout field (beside the standard virtio-gpu header) and a response message which carries the EDID data.

---
 virtio-gpu.tex | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
virtio-gpu.tex +31 -0
index 5d4709a..0cf2209 100644
@@ -34,6 +34,7 @@ control queue.
 
 \begin{description}
 \item[VIRTIO_GPU_F_VIRGL (0)] virgl 3D mode is supported.
+\item[VIRTIO_GPU_F_EDID  (1)] EDID is supported.
 \end{description}
 
 \subsection{Device configuration layout}\label{sec:Device Types / GPU Device / Device configuration layout}
@@ -171,6 +172,9 @@ enum virtio_gpu_ctrl_type {
         VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D,
         VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING,
         VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING,
+        VIRTIO_GPU_CMD_GET_CAPSET_INFO,
+        VIRTIO_GPU_CMD_GET_CAPSET,
+        VIRTIO_GPU_CMD_GET_EDID,
 
         /* cursor commands */
         VIRTIO_GPU_CMD_UPDATE_CURSOR = 0x0300,
@@ -179,6 +183,9 @@ enum virtio_gpu_ctrl_type {
         /* success responses */
         VIRTIO_GPU_RESP_OK_NODATA = 0x1100,
         VIRTIO_GPU_RESP_OK_DISPLAY_INFO,
+        VIRTIO_GPU_RESP_OK_CAPSET_INFO,
+        VIRTIO_GPU_RESP_OK_CAPSET,
+        VIRTIO_GPU_RESP_OK_EDID,
 
         /* error responses */
         VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200,
@@ -275,6 +282,30 @@ The \field{enabled} field is set when the user enabled the display.
 It is roughly the same as the connected state of a phyiscal display
 connector.
 
+\item[VIRTIO_GPU_CMD_GET_EDID] Retrieve the EDID data for a given
+  scanout.  Request data is \field{struct virtio_gpu_get_edid}).
+  Response type is VIRTIO_GPU_RESP_OK_EDID, response data is
+  \field{struct virtio_gpu_resp_edid}.  Support is optional and
+  negotiated using the VIRTIO_GPU_F_EDID feature flag.
+
+\begin{lstlisting}
+struct virtio_gpu_get_edid {
+        struct virtio_gpu_ctrl_hdr hdr;
+        le32 scanout;
+        le32 padding;
+};
+
+struct virtio_gpu_resp_edid {
+        struct virtio_gpu_ctrl_hdr hdr;
+        le32 size;
+        le32 padding;
+        u8 edid[1024];
+};
+\end{lstlisting}
+
+The response contains the EDID display data blob (as specified by
+VESA) for the scanout.
+
 \item[VIRTIO_GPU_CMD_RESOURCE_CREATE_2D] Create a 2D resource on the
   host.  Request data is \field{struct virtio_gpu_resource_create_2d}.
   Response type is VIRTIO_GPU_RESP_OK_NODATA.
Signature · 6 lines
2.9.3


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
#1 lore raw
Quoted 8 lines · Gerd Hoffmann

The feature allows the guest request an EDID blob (describing monitor capabilities) for a given scanout (aka virtual monitor connector).

It brings a new command message, which has just a scanout field (beside the standard virtio-gpu header) and a response message which carries the EDID data.

cheers,
Gerd

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]