[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/8] edid: use dta extension block descriptors
From: |
Gerd Hoffmann |
Subject: |
[PATCH v2 4/8] edid: use dta extension block descriptors |
Date: |
Tue, 27 Apr 2021 17:08:20 +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>
---
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.30.2
- [PATCH v2 0/8] edid: windows fixes, Gerd Hoffmann, 2021/04/27
- [PATCH v2 1/8] qemu-edid: use qemu_edid_size(), Gerd Hoffmann, 2021/04/27
- [PATCH v2 3/8] edid: move xtra3 descriptor, Gerd Hoffmann, 2021/04/27
- [PATCH v2 4/8] edid: use dta extension block descriptors,
Gerd Hoffmann <=
- [PATCH v2 2/8] edid: edid_desc_next, Gerd Hoffmann, 2021/04/27
- [PATCH v2 6/8] edid: move timing generation into a separate function, Gerd Hoffmann, 2021/04/27
- [PATCH v2 5/8] edid: Make refresh rate configurable, Gerd Hoffmann, 2021/04/27
- [PATCH v2 8/8] edid: add support for DisplayID extension (5k resolution), Gerd Hoffmann, 2021/04/27
- [PATCH v2 7/8] edid: allow arbitrary-length checksums, Gerd Hoffmann, 2021/04/27
- Re: [PATCH v2 0/8] edid: windows fixes, no-reply, 2021/04/27