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>
This commit is contained in:
parent
ec70aec8dc
commit
4f9e268637
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user