virtio-gpu: add VIRTIO_GPU_F_EDID feature
Subsystems (3)
Gerd Hoffmann
maintainerPATCH v2 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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
include/uapi/linux/virtio_gpu.h +17 -0
@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_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 scanout; +__le32 size; +__u8 edid[1024 ]; +}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config {
Signature · 6 lines
2.9.3 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 50 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.
Signed-off-by Gerd Hoffmann <[email protected]>---
include/uapi/linux/virtio_gpu.h| 17 +++++++++++++++++1 file changed, 17 insertions(+)include/uapi/linux/virtio_gpu.h +5
-0@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_get_edid {
include/uapi/linux/virtio_gpu.h struct virtio_gpu_resp_capset { · line 308
Quoted 10 lines
include/uapi/linux/virtio_gpu.h +10
-0+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 scanout; +__le32 size; +__u8 edid[1024 ];
Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
If not, maybe add comment to explain why you chose 1024.
Quoted 8 lines
include/uapi/linux/virtio_gpu.h +2
-0+}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config {Signature · 1 line
2.9.3
Quoted 63 lines · Christophe de Dinechin
Quoted 50 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.
Signed-off-by Gerd Hoffmann <[email protected]>---
include/uapi/linux/virtio_gpu.h| 17 +++++++++++++++++1 file changed, 17 insertions(+)include/uapi/linux/virtio_gpu.h +5
-0@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_get_edid {include/uapi/linux/virtio_gpu.h struct virtio_gpu_resp_capset { · line 308
Quoted 10 lines
include/uapi/linux/virtio_gpu.h +10
-0+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 scanout; +__le32 size; +__u8 edid[1024 ];Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
Quoted 1 line
If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
-Daniel
Quoted 14 lines
Quoted 9 lines
include/uapi/linux/virtio_gpu.h +2
-0+}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config {Signature · 1 line
2.9.3_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 68 lines · Daniel Vetter
Quoted 63 lines · Christophe de Dinechin
Quoted 50 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.
Signed-off-by Gerd Hoffmann <[email protected]>---
include/uapi/linux/virtio_gpu.h| 17 +++++++++++++++++1 file changed, 17 insertions(+)include/uapi/linux/virtio_gpu.h +5
-0@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_get_edid {include/uapi/linux/virtio_gpu.h struct virtio_gpu_resp_capset { · line 308
Quoted 10 lines
include/uapi/linux/virtio_gpu.h +10
-0+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 scanout; +__le32 size; +__u8 edid[1024 ];Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
Quoted 3 lines
Quoted 1 line
If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
Does this return a physical EDID? I thought it would be made-up by virtio-gpu.
Thanks,
Christophe
Quoted 20 lines
Quoted 15 lines
Quoted 10 lines
include/uapi/linux/virtio_gpu.h +2
-0+}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config {Signature · 1 line
2.9.3_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Gerd Hoffmann
maintainerHi,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
include/uapi/linux/virtio_gpu.h struct virtio_gpu_resp_capset { · line 308
Quoted 6 lines
include/uapi/linux/virtio_gpu.h +6
-0+/* VIRTIO_GPU_RESP_OK_EDID */ +struct virtio_gpu_resp_edid { +struct virtio_gpu_ctrl_hdr hdr; +__le32 scanout; +__le32 size; +__u8 edid[1024 ];Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
Does this return a physical EDID? I thought it would be made-up by virtio-gpu.
Well, edid has extensions, so it can become pretty large in theory, and I've figured it would be a good idea to leave some room just in case. It should be a rather infrequent operation, so the unused buffer space should not hurt much.
Yes, it will be a edid generated by qemu. The current generator code will use at most 256 bytes.
cheers,
Gerd
Gerd Hoffmann
maintainerHi,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
include/uapi/linux/virtio_gpu.h struct virtio_gpu_resp_capset { · line 308
Quoted 6 lines
include/uapi/linux/virtio_gpu.h +6
-0+/* VIRTIO_GPU_RESP_OK_EDID */ +struct virtio_gpu_resp_edid { +struct virtio_gpu_ctrl_hdr hdr; +__le32 scanout; +__le32 size; +__u8 edid[1024 ];Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
Does this return a physical EDID? I thought it would be made-up by virtio-gpu.
Well, edid has extensions, so it can become pretty large in theory, and I've figured it would be a good idea to leave some room just in case. It should be a rather infrequent operation, so the unused buffer space should not hurt much.
Yes, it will be a edid generated by qemu. The current generator code will use at most 256 bytes.
cheers,
Gerd
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Quoted 63 lines · Christophe de Dinechin
Quoted 50 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.
Signed-off-by Gerd Hoffmann <[email protected]>---
include/uapi/linux/virtio_gpu.h| 17 +++++++++++++++++1 file changed, 17 insertions(+)include/uapi/linux/virtio_gpu.h +5
-0@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_get_edid {include/uapi/linux/virtio_gpu.h struct virtio_gpu_resp_capset { · line 308
Quoted 10 lines
include/uapi/linux/virtio_gpu.h +10
-0+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 scanout; +__le32 size; +__u8 edid[1024 ];Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
Quoted 1 line
If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
-Daniel
Quoted 14 lines
Quoted 9 lines
include/uapi/linux/virtio_gpu.h +2
-0+}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config {Signature · 1 line
2.9.3_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Quoted 69 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.
Signed-off-by Gerd Hoffmann <[email protected]>--- include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/uapi/linux/virtio_gpu.h +17
-1@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_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 scanout; +__le32 size; +__u8 edid[1024 ]; +}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config { --2.9.3
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 69 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.
Signed-off-by Gerd Hoffmann <[email protected]>--- include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)include/uapi/linux/virtio_gpu.h +17
-1@@ -41,6 +41,7 @@#include <linux/types.h> #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1enum 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,20 @@ struct virtio_gpu_resp_capset {__u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_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 scanout; +__le32 size; +__u8 edid[1024 ]; +}; +#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)struct virtio_gpu_config { --2.9.3
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel