diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-04-27 17:08:20 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-05-10 11:41:02 +0200 |
commit | 4f9e268637f334d639a3d3ab5f1f06dfe6e93bc0 (patch) | |
tree | 8da6dd80410c88b9179282dd6746af1ac0a7a1c7 /hw | |
parent | ec70aec8dca96fba10eba432b2adc22f49b87750 (diff) |
edid: use dta extension block descriptors
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/edid-generate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 25f790c7bd..42a130f0ff 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; } |