History

virtio-gpu: add VIRTIO_GPU_F_EDID feature

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.

Gerd Hoffmann committed 8 years ago

Commit 610c0c21 parent 0081cdf1 file · +18 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/virtio_gpu.h+18−0
@@ -41,6 +41,7 @@ · 40 unmodified lines
4141 #include <linux/types.h>
4242
4343 #define VIRTIO_GPU_F_VIRGL 0
44+#define VIRTIO_GPU_F_EDID 1
4445
4546 enum virtio_gpu_ctrl_type {
4647 VIRTIO_GPU_UNDEFINED = 0,
@@ -56,6 +57,7 @@ enum virtio_gpu_ctrl_type { · 9 unmodified lines
5657 VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING,
5758 VIRTIO_GPU_CMD_GET_CAPSET_INFO,
5859 VIRTIO_GPU_CMD_GET_CAPSET,
60+ VIRTIO_GPU_CMD_GET_EDID,
5961
6062 /* 3d commands */
6163 VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,
@@ -76,6 +78,7 @@ enum virtio_gpu_ctrl_type { · 14 unmodified lines
7678 VIRTIO_GPU_RESP_OK_DISPLAY_INFO,
7779 VIRTIO_GPU_RESP_OK_CAPSET_INFO,
7880 VIRTIO_GPU_RESP_OK_CAPSET,
81+ VIRTIO_GPU_RESP_OK_EDID,
7982
8083 /* error responses */
8184 VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200,
@@ -291,6 +294,21 @@ struct virtio_gpu_resp_capset { · 209 unmodified lines
291294 __u8 capset_data[];
292295 };
293296
297+/* VIRTIO_GPU_CMD_GET_EDID */
298+struct virtio_gpu_cmd_get_edid {
299+ struct virtio_gpu_ctrl_hdr hdr;
300+ __le32 scanout;
301+ __le32 padding;
302+};
303+
304+/* VIRTIO_GPU_RESP_OK_EDID */
305+struct virtio_gpu_resp_edid {
306+ struct virtio_gpu_ctrl_hdr hdr;
307+ __le32 size;
308+ __le32 padding;
309+ __u8 edid[1024];
310+};
311+
294312 #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
295313
296314 struct virtio_gpu_config {