* [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 12:51 ` Gerd Hoffmann
0 siblings, 0 replies; 16+ messages in thread
From: Gerd Hoffmann @ 2018-10-05 12:51 UTC (permalink / raw)
To: virtio-dev
Cc: kvm, dri-devel, Gerd Hoffmann, David Airlie, Michael S. Tsirkin,
Jason Wang, open list:VIRTIO GPU DRIVER, open list
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 <kraxel@redhat.com>
---
include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index f43c3c6171..1cef1ff339 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -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,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
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 12:51 ` Gerd Hoffmann
0 siblings, 0 replies; 16+ messages in thread
From: Gerd Hoffmann @ 2018-10-05 12:51 UTC (permalink / raw)
To: virtio-dev
Cc: kvm, Michael S. Tsirkin, David Airlie, Jason Wang, open list,
dri-devel, open list:VIRTIO GPU DRIVER, 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 <kraxel@redhat.com>
---
include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index f43c3c6171..1cef1ff339 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -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,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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 12:51 ` Gerd Hoffmann
@ 2018-10-05 14:38 ` Christophe de Dinechin
-1 siblings, 0 replies; 16+ messages in thread
From: Christophe de Dinechin @ 2018-10-05 14:38 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: virtio-dev, kvm, dri-devel, David Airlie, Michael S. Tsirkin,
Jason Wang, open list:VIRTIO GPU DRIVER, open list
> On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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 <kraxel@redhat.com>
> ---
> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> index f43c3c6171..1cef1ff339 100644
> --- a/include/uapi/linux/virtio_gpu.h
> +++ b/include/uapi/linux/virtio_gpu.h
> @@ -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,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];
Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
If not, maybe add comment to explain why you chose 1024.
> +};
> +
> #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
>
> struct virtio_gpu_config {
> --
> 2.9.3
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 14:38 ` Christophe de Dinechin
0 siblings, 0 replies; 16+ messages in thread
From: Christophe de Dinechin @ 2018-10-05 14:38 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: virtio-dev, kvm, dri-devel, David Airlie, Michael S. Tsirkin,
Jason Wang, open list:VIRTIO GPU DRIVER, open list
> On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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 <kraxel@redhat.com>
> ---
> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> index f43c3c6171..1cef1ff339 100644
> --- a/include/uapi/linux/virtio_gpu.h
> +++ b/include/uapi/linux/virtio_gpu.h
> @@ -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,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];
Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
If not, maybe add comment to explain why you chose 1024.
> +};
> +
> #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
>
> struct virtio_gpu_config {
> --
> 2.9.3
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 14:38 ` Christophe de Dinechin
@ 2018-10-05 14:41 ` Daniel Vetter
-1 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2018-10-05 14:41 UTC (permalink / raw)
To: Christophe de Dinechin
Cc: Gerd Hoffmann, kvm, Michael S. Tsirkin, David Airlie, open list,
Jason Wang, virtio-dev, dri-devel, open list:VIRTIO GPU DRIVER
On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote:
>
>
> > On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > 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 <kraxel@redhat.com>
> > ---
> > include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> > index f43c3c6171..1cef1ff339 100644
> > --- a/include/uapi/linux/virtio_gpu.h
> > +++ b/include/uapi/linux/virtio_gpu.h
> > @@ -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,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];
>
> Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
>
> If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
-Daniel
>
> > +};
> > +
> > #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
> >
> > struct virtio_gpu_config {
> > --
> > 2.9.3
> >
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 14:41 ` Daniel Vetter
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2018-10-05 14:41 UTC (permalink / raw)
To: Christophe de Dinechin
Cc: Gerd Hoffmann, kvm, Michael S. Tsirkin, David Airlie, open list,
Jason Wang, virtio-dev, dri-devel, open list:VIRTIO GPU DRIVER
On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote:
>
>
> > On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > 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 <kraxel@redhat.com>
> > ---
> > include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> > index f43c3c6171..1cef1ff339 100644
> > --- a/include/uapi/linux/virtio_gpu.h
> > +++ b/include/uapi/linux/virtio_gpu.h
> > @@ -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,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];
>
> Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
>
> If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
-Daniel
>
> > +};
> > +
> > #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
> >
> > struct virtio_gpu_config {
> > --
> > 2.9.3
> >
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 14:38 ` Christophe de Dinechin
(?)
@ 2018-10-05 14:41 ` Daniel Vetter
-1 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2018-10-05 14:41 UTC (permalink / raw)
To: Christophe de Dinechin
Cc: kvm, Michael S. Tsirkin, David Airlie, open list, dri-devel,
virtio-dev, open list:VIRTIO GPU DRIVER
On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote:
>
>
> > On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > 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 <kraxel@redhat.com>
> > ---
> > include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> > index f43c3c6171..1cef1ff339 100644
> > --- a/include/uapi/linux/virtio_gpu.h
> > +++ b/include/uapi/linux/virtio_gpu.h
> > @@ -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,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];
>
> Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
>
> If not, maybe add comment to explain why you chose 1024.
EDID in the wild can be up to 512 bytes.
-Daniel
>
> > +};
> > +
> > #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
> >
> > struct virtio_gpu_config {
> > --
> > 2.9.3
> >
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 14:41 ` Daniel Vetter
@ 2018-10-05 15:33 ` Christophe de Dinechin
-1 siblings, 0 replies; 16+ messages in thread
From: Christophe de Dinechin @ 2018-10-05 15:33 UTC (permalink / raw)
To: Daniel Vetter
Cc: Gerd Hoffmann, kvm, Michael S. Tsirkin, David Airlie, open list,
Jason Wang, virtio-dev, dri-devel, open list:VIRTIO GPU DRIVER
> On 5 Oct 2018, at 16:41, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote:
>>
>>
>>> On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
>>>
>>> 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 <kraxel@redhat.com>
>>> ---
>>> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
>>> 1 file changed, 17 insertions(+)
>>>
>>> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
>>> index f43c3c6171..1cef1ff339 100644
>>> --- a/include/uapi/linux/virtio_gpu.h
>>> +++ b/include/uapi/linux/virtio_gpu.h
>>> @@ -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,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];
>>
>> Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
>>
>> 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
>
>>
>>> +};
>>> +
>>> #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
>>>
>>> struct virtio_gpu_config {
>>> --
>>> 2.9.3
>>>
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 15:33 ` Christophe de Dinechin
0 siblings, 0 replies; 16+ messages in thread
From: Christophe de Dinechin @ 2018-10-05 15:33 UTC (permalink / raw)
To: Daniel Vetter
Cc: Gerd Hoffmann, kvm, Michael S. Tsirkin, David Airlie, open list,
Jason Wang, virtio-dev, dri-devel, open list:VIRTIO GPU DRIVER
> On 5 Oct 2018, at 16:41, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote:
>>
>>
>>> On 5 Oct 2018, at 14:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
>>>
>>> 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 <kraxel@redhat.com>
>>> ---
>>> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
>>> 1 file changed, 17 insertions(+)
>>>
>>> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
>>> index f43c3c6171..1cef1ff339 100644
>>> --- a/include/uapi/linux/virtio_gpu.h
>>> +++ b/include/uapi/linux/virtio_gpu.h
>>> @@ -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,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];
>>
>> Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)?
>>
>> 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
>
>>
>>> +};
>>> +
>>> #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
>>>
>>> struct virtio_gpu_config {
>>> --
>>> 2.9.3
>>>
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 15:33 ` Christophe de Dinechin
@ 2018-10-05 15:55 ` Gerd Hoffmann
-1 siblings, 0 replies; 16+ messages in thread
From: Gerd Hoffmann @ 2018-10-05 15:55 UTC (permalink / raw)
To: Christophe de Dinechin
Cc: Daniel Vetter, kvm, Michael S. Tsirkin, David Airlie, open list,
Jason Wang, virtio-dev, dri-devel, open list:VIRTIO GPU DRIVER
Hi,
> >>> +/* 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.
> >
> > 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 15:55 ` Gerd Hoffmann
0 siblings, 0 replies; 16+ messages in thread
From: Gerd Hoffmann @ 2018-10-05 15:55 UTC (permalink / raw)
To: Christophe de Dinechin
Cc: Daniel Vetter, kvm, Michael S. Tsirkin, David Airlie, open list,
Jason Wang, virtio-dev, dri-devel, open list:VIRTIO GPU DRIVER
Hi,
> >>> +/* 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.
> >
> > 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 15:33 ` Christophe de Dinechin
(?)
@ 2018-10-05 15:55 ` Gerd Hoffmann
-1 siblings, 0 replies; 16+ messages in thread
From: Gerd Hoffmann @ 2018-10-05 15:55 UTC (permalink / raw)
To: Christophe de Dinechin
Cc: kvm, Michael S. Tsirkin, David Airlie, open list, dri-devel,
virtio-dev, Daniel Vetter, open list:VIRTIO GPU DRIVER
Hi,
> >>> +/* 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.
> >
> > 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
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 12:51 ` Gerd Hoffmann
@ 2018-10-18 1:17 ` Dave Airlie
-1 siblings, 0 replies; 16+ messages in thread
From: Dave Airlie @ 2018-10-18 1:17 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: virtio-dev, KVM list, Michael S. Tsirkin, Dave Airlie,
Jason Wang, LKML, dri-devel, open list:VIRTIO CORE, NET...
Reviewed-by: Dave Airlie <airlied@redhat.com>
On Fri, 5 Oct 2018 at 22:52, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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 <kraxel@redhat.com>
> ---
> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> index f43c3c6171..1cef1ff339 100644
> --- a/include/uapi/linux/virtio_gpu.h
> +++ b/include/uapi/linux/virtio_gpu.h
> @@ -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,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
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-18 1:17 ` Dave Airlie
0 siblings, 0 replies; 16+ messages in thread
From: Dave Airlie @ 2018-10-18 1:17 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: virtio-dev, KVM list, Michael S. Tsirkin, Dave Airlie,
Jason Wang, LKML, dri-devel, open list:VIRTIO CORE, NET...
Reviewed-by: Dave Airlie <airlied@redhat.com>
On Fri, 5 Oct 2018 at 22:52, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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 <kraxel@redhat.com>
> ---
> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> index f43c3c6171..1cef1ff339 100644
> --- a/include/uapi/linux/virtio_gpu.h
> +++ b/include/uapi/linux/virtio_gpu.h
> @@ -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,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
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
2018-10-05 12:51 ` Gerd Hoffmann
(?)
(?)
@ 2018-10-18 1:17 ` Dave Airlie
-1 siblings, 0 replies; 16+ messages in thread
From: Dave Airlie @ 2018-10-18 1:17 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: KVM list, Michael S. Tsirkin, Dave Airlie, LKML, dri-devel,
virtio-dev, open list:VIRTIO CORE, NET...
Reviewed-by: Dave Airlie <airlied@redhat.com>
On Fri, 5 Oct 2018 at 22:52, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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 <kraxel@redhat.com>
> ---
> include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> index f43c3c6171..1cef1ff339 100644
> --- a/include/uapi/linux/virtio_gpu.h
> +++ b/include/uapi/linux/virtio_gpu.h
> @@ -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,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
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
@ 2018-10-05 12:51 Gerd Hoffmann
0 siblings, 0 replies; 16+ messages in thread
From: Gerd Hoffmann @ 2018-10-05 12:51 UTC (permalink / raw)
To: virtio-dev
Cc: kvm, Michael S. Tsirkin, David Airlie, open list, dri-devel,
open list:VIRTIO GPU DRIVER
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 <kraxel@redhat.com>
---
include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index f43c3c6171..1cef1ff339 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -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,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
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2018-10-18 1:17 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 12:51 [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature Gerd Hoffmann
2018-10-05 12:51 ` Gerd Hoffmann
2018-10-05 14:38 ` Christophe de Dinechin
2018-10-05 14:38 ` Christophe de Dinechin
2018-10-05 14:41 ` Daniel Vetter
2018-10-05 14:41 ` Daniel Vetter
2018-10-05 14:41 ` Daniel Vetter
2018-10-05 15:33 ` Christophe de Dinechin
2018-10-05 15:33 ` Christophe de Dinechin
2018-10-05 15:55 ` Gerd Hoffmann
2018-10-05 15:55 ` Gerd Hoffmann
2018-10-05 15:55 ` Gerd Hoffmann
2018-10-18 1:17 ` Dave Airlie
2018-10-18 1:17 ` Dave Airlie
2018-10-18 1:17 ` Dave Airlie
-- strict thread matches above, loose matches on Subject: below --
2018-10-05 12:51 Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.