Skip to contentSkip to conversation

virtio-gpu: add VIRTIO_GPU_F_EDID feature

PATCH Superseded Gerd Hoffmann 1 participant 3 messages Oct 18, 2018

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Gerd Hoffmann

author maintainer
#0 lore raw

PATCH v3 1/1 virtio-gpu: add VIRTIO_GPU_F_EDID feature

Hi,

Just noticed I had the wrong email address for the virtio-dev list in v2. So, resending. Relates bits:

Guest driver patch implementing this:
https://git.kraxel.org/cgit/linux/log/?h=drm-edid-virtio

Qemu test branch:
https://git.kraxel.org/cgit/qemu/log/?h=sirius/edid

virtio spec update:
https://git.kraxel.org/cgit/virtio-spec/log/?h=virtio-gpu

cheers,
Gerd

Gerd Hoffmann (1):
virtio-gpu: add VIRTIO_GPU_F_EDID feature

 include/uapi/linux/virtio_gpu.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Signature · 1 line
2.9.3
author maintainer
#1 lore raw

PATCH v3 1/1 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.

---
 include/uapi/linux/virtio_gpu.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
include/uapi/linux/virtio_gpu.h +16 -0
index f43c3c6171..68198691a6 100644
@@ -41,6 +41,7 @@
 #include <linux/types.h>
 
 #define VIRTIO_GPU_F_VIRGL 0
+#define VIRTIO_GPU_F_EDID  1
 
 enum virtio_gpu_ctrl_type {
 	VIRTIO_GPU_UNDEFINED = 0,
@@ -56,6 +57,7 @@ enum virtio_gpu_ctrl_type {
 	VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING,
 	VIRTIO_GPU_CMD_GET_CAPSET_INFO,
 	VIRTIO_GPU_CMD_GET_CAPSET,
+	VIRTIO_GPU_CMD_GET_EDID,
 
 	/* 3d commands */
 	VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,
@@ -76,6 +78,7 @@ enum virtio_gpu_ctrl_type {
 	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,
@@ -291,6 +294,19 @@ struct virtio_gpu_resp_capset {
 	__u8 capset_data[];
 };
 
+/* VIRTIO_GPU_CMD_GET_EDID */
+struct virtio_gpu_cmd_get_edid {
+	struct virtio_gpu_ctrl_hdr hdr;
+	__le32 scanout;
+};
+
+/* VIRTIO_GPU_RESP_OK_EDID */
+struct virtio_gpu_resp_edid {
+	struct virtio_gpu_ctrl_hdr hdr;
+	__le32 size;
+	__u8 edid[1024];
+};
+
 #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
 
 struct virtio_gpu_config {
Signature · 1 line
2.9.3
author maintainer
#2 lore raw

PATCH v3 1/1 virtio-gpu: add VIRTIO_GPU_F_EDID feature

In reply to 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.

---
 include/uapi/linux/virtio_gpu.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
include/uapi/linux/virtio_gpu.h +16 -0
index f43c3c6171..68198691a6 100644
@@ -41,6 +41,7 @@
 #include <linux/types.h>
 
 #define VIRTIO_GPU_F_VIRGL 0
+#define VIRTIO_GPU_F_EDID  1
 
 enum virtio_gpu_ctrl_type {
 	VIRTIO_GPU_UNDEFINED = 0,
@@ -56,6 +57,7 @@ enum virtio_gpu_ctrl_type {
 	VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING,
 	VIRTIO_GPU_CMD_GET_CAPSET_INFO,
 	VIRTIO_GPU_CMD_GET_CAPSET,
+	VIRTIO_GPU_CMD_GET_EDID,
 
 	/* 3d commands */
 	VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,
@@ -76,6 +78,7 @@ enum virtio_gpu_ctrl_type {
 	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,
@@ -291,6 +294,19 @@ struct virtio_gpu_resp_capset {
 	__u8 capset_data[];
 };
 
+/* VIRTIO_GPU_CMD_GET_EDID */
+struct virtio_gpu_cmd_get_edid {
+	struct virtio_gpu_ctrl_hdr hdr;
+	__le32 scanout;
+};
+
+/* VIRTIO_GPU_RESP_OK_EDID */
+struct virtio_gpu_resp_edid {
+	struct virtio_gpu_ctrl_hdr hdr;
+	__le32 size;
+	__u8 edid[1024];
+};
+
 #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
 
 struct virtio_gpu_config {
Signature · 1 line
2.9.3