Displaying 8 results from an estimated 8 matches for "virtio_gpu_resp_edid".
2018 Sep 13
0
[PATCH 3/3] drm/virtio: add edid support
...b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -596,6 +596,37 @@ static void virtio_gpu_cmd_capset_cb(struct virtio_gpu_device *vgdev,
wake_up(&vgdev->resp_wq);
}
+static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev,
+ struct virtio_gpu_vbuffer *vbuf)
+{
+ struct virtio_gpu_resp_edid *resp =
+ (struct virtio_gpu_resp_edid *)vbuf->resp_buf;
+ uint32_t scanout = le32_to_cpu(resp->scanout);
+ uint32_t size = le32_to_cpu(resp->size);
+ struct virtio_gpu_output *output;
+ struct edid *new_edid, *old_edid;
+
+ if (scanout >= vgdev->num_scanouts)
+ return;
+ output =...
2018 Sep 13
0
[PATCH 2/3] virtio-gpu: add VIRTIO_GPU_F_EDID feature
.../* 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[512];
+};
+
#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
struct virtio_gpu_config {
--
2.9.3
2018 Oct 05
0
[PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
.../* 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
2018 Oct 05
0
[PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
...pset {
> > __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 b...
2018 Oct 05
0
[PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature
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...
2020 Aug 03
0
[PATCH v2 10/24] virtio_gpu: correct tags for config space fields
...virtio_gpu.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index 0c85914d9369..ccbd174ef321 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -320,10 +320,10 @@ struct virtio_gpu_resp_edid {
#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
struct virtio_gpu_config {
- __u32 events_read;
- __u32 events_clear;
- __u32 num_scanouts;
- __u32 num_capsets;
+ __le32 events_read;
+ __le32 events_clear;
+ __le32 num_scanouts;
+ __le32 num_capsets;
};
/* simple formats for fbcon/X use *...
2020 Aug 05
1
[PATCH v3 10/38] virtio_gpu: correct tags for config space fields
...virtio_gpu.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index 0c85914d9369..ccbd174ef321 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -320,10 +320,10 @@ struct virtio_gpu_resp_edid {
#define VIRTIO_GPU_EVENT_DISPLAY (1 << 0)
struct virtio_gpu_config {
- __u32 events_read;
- __u32 events_clear;
- __u32 num_scanouts;
- __u32 num_capsets;
+ __le32 events_read;
+ __le32 events_clear;
+ __le32 num_scanouts;
+ __le32 num_capsets;
};
/* simple formats for fbcon/X use *...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are
not tagged with the correct endian-ness so it's easy
to make mistakes like instanciating config space in
native endian-ness.
The following patches adding sparse tagging are currently in my tree.
Lightly tested.
As a follow-up, I plan to add new APIs that handle modern config space
in a more efficient way (bypassing the version check).