[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/25] edid: use dta extension block descriptors
From: |
Gerd Hoffmann |
Subject: |
[PULL 04/25] edid: use dta extension block descriptors |
Date: |
Mon, 10 May 2021 15:20:30 +0200 |
When the 4 descriptors in the base edid block are filled, jump to the
dta extension block. This allows for more than four descriptors.
Happens for example when generating an edid blob with a serial number
(qemu-edid -s $serial).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20210427150824.638359-1-kraxel@redhat.com
Message-Id: <20210427150824.638359-5-kraxel@redhat.com>
---
hw/display/edid-generate.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c
index 25f790c7bd85..42a130f0ff5c 100644
--- a/hw/display/edid-generate.c
+++ b/hw/display/edid-generate.c
@@ -152,6 +152,14 @@ static uint8_t *edid_desc_next(uint8_t *edid, uint8_t
*dta, uint8_t *desc)
if (desc + 18 + 18 < edid + 127) {
return desc + 18;
}
+ if (dta) {
+ if (desc < edid + 127) {
+ return dta + dta[2];
+ }
+ if (desc + 18 + 18 < dta + 127) {
+ return desc + 18;
+ }
+ }
return NULL;
}
--
2.31.1
- [PULL 00/25] Vga 20210510 patches, Gerd Hoffmann, 2021/05/10
- [PULL 01/25] qemu-edid: use qemu_edid_size(), Gerd Hoffmann, 2021/05/10
- [PULL 02/25] edid: edid_desc_next, Gerd Hoffmann, 2021/05/10
- [PULL 03/25] edid: move xtra3 descriptor, Gerd Hoffmann, 2021/05/10
- [PULL 04/25] edid: use dta extension block descriptors,
Gerd Hoffmann <=
- [PULL 05/25] edid: Make refresh rate configurable, Gerd Hoffmann, 2021/05/10
- [PULL 06/25] edid: move timing generation into a separate function, Gerd Hoffmann, 2021/05/10
- [PULL 08/25] edid: add support for DisplayID extension (5k resolution), Gerd Hoffmann, 2021/05/10
- [PULL 07/25] edid: allow arbitrary-length checksums, Gerd Hoffmann, 2021/05/10
- [PULL 10/25] virtio-gpu: rename virgl source file., Gerd Hoffmann, 2021/05/10
- [PULL 11/25] virtio-gpu: add virtio-gpu-gl-device, Gerd Hoffmann, 2021/05/10
- [PULL 12/25] virtio-gpu: move virgl realize + properties, Gerd Hoffmann, 2021/05/10