diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-04-27 17:08:19 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-05-10 11:41:02 +0200 |
commit | ec70aec8dca96fba10eba432b2adc22f49b87750 (patch) | |
tree | c69264bb5230aaaf2b935a3f800edaa3768bbcd5 /hw | |
parent | ed7f17a640853f3a13f48ca9d68f4db790a88f08 (diff) |
edid: move xtra3 descriptor
Initialize the "Established timings III" block earlier. Also move up
edid_fill_modes(). That'll make sure the offset for the additional
descriptors in the dta block don't move any more, which in turn makes it
easier to actually use them.
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-4-kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/edid-generate.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index ae34999f9e..25f790c7bd 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -416,25 +416,28 @@ void qemu_edid_generate(uint8_t *edid, size_t size, width_mm, height_mm); desc = edid_desc_next(edid, dta, desc); + xtra3 = desc; + edid_desc_xtra3_std(xtra3); + desc = edid_desc_next(edid, dta, desc); + edid_fill_modes(edid, xtra3, dta, info->maxx, info->maxy); + /* + * dta video data block is finished at thus point, + * so dta descriptor offsets don't move any more. + */ + edid_desc_ranges(desc); desc = edid_desc_next(edid, dta, desc); - if (info->name) { + if (desc && info->name) { edid_desc_text(desc, 0xfc, info->name); desc = edid_desc_next(edid, dta, desc); } - if (info->serial) { + if (desc && info->serial) { edid_desc_text(desc, 0xff, info->serial); desc = edid_desc_next(edid, dta, desc); } - if (desc) { - xtra3 = desc; - edid_desc_xtra3_std(xtra3); - desc = edid_desc_next(edid, dta, desc); - } - while (desc) { edid_desc_dummy(desc); desc = edid_desc_next(edid, dta, desc); @@ -442,7 +445,6 @@ void qemu_edid_generate(uint8_t *edid, size_t size, /* =============== finish up =============== */ - edid_fill_modes(edid, xtra3, dta, info->maxx, info->maxy); edid_checksum(edid); if (dta) { edid_checksum(dta); |