From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PULL 5/5] edid: prefer standard timings
Date: Tue, 23 Mar 2021 16:36:16 +0100 [thread overview]
Message-ID: <20210323153616.873822-6-kraxel@redhat.com> (raw)
In-Reply-To: <20210323153616.873822-1-kraxel@redhat.com>
Windows guests using the "Basic Display Adapter" don't parse the
"Established timings III" block. They also don't parse any edid
extension.
So prefer the "Standard Timings" block to store the display resolutions
in edid_fill_modes(). Also reorder the mode list, so more exotic
resolutions (specifically the ones which are not supported by vgabios)
are moved down and the remaining ones have a better chance to get one of
the eight slots in the "Standard Timings" block.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210316143812.2363588-6-kraxel@redhat.com>
---
hw/display/edid-generate.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c
index 1665b7cbb29a..a1bea9a3aa35 100644
--- a/hw/display/edid-generate.c
+++ b/hw/display/edid-generate.c
@@ -25,19 +25,20 @@ static const struct edid_mode {
{ .xres = 1920, .yres = 1080, .dta = 31 },
/* additional standard timings 3 (all @ 60Hz) */
- { .xres = 1920, .yres = 1440, .xtra3 = 11, .bit = 5 },
{ .xres = 1920, .yres = 1200, .xtra3 = 10, .bit = 0 },
- { .xres = 1856, .yres = 1392, .xtra3 = 10, .bit = 3 },
- { .xres = 1792, .yres = 1344, .xtra3 = 10, .bit = 5 },
{ .xres = 1600, .yres = 1200, .xtra3 = 9, .bit = 2 },
{ .xres = 1680, .yres = 1050, .xtra3 = 9, .bit = 5 },
- { .xres = 1440, .yres = 1050, .xtra3 = 8, .bit = 1 },
{ .xres = 1440, .yres = 900, .xtra3 = 8, .bit = 5 },
- { .xres = 1360, .yres = 768, .xtra3 = 8, .bit = 7 },
{ .xres = 1280, .yres = 1024, .xtra3 = 7, .bit = 1 },
{ .xres = 1280, .yres = 960, .xtra3 = 7, .bit = 3 },
{ .xres = 1280, .yres = 768, .xtra3 = 7, .bit = 6 },
+ { .xres = 1920, .yres = 1440, .xtra3 = 11, .bit = 5 },
+ { .xres = 1856, .yres = 1392, .xtra3 = 10, .bit = 3 },
+ { .xres = 1792, .yres = 1344, .xtra3 = 10, .bit = 5 },
+ { .xres = 1440, .yres = 1050, .xtra3 = 8, .bit = 1 },
+ { .xres = 1360, .yres = 768, .xtra3 = 8, .bit = 7 },
+
/* established timings (all @ 60Hz) */
{ .xres = 1024, .yres = 768, .byte = 36, .bit = 3 },
{ .xres = 800, .yres = 600, .byte = 35, .bit = 0 },
@@ -109,13 +110,13 @@ static void edid_fill_modes(uint8_t *edid, uint8_t *xtra3, uint8_t *dta,
if (mode->byte) {
edid[mode->byte] |= (1 << mode->bit);
- } else if (mode->xtra3 && xtra3) {
- xtra3[mode->xtra3] |= (1 << mode->bit);
} else if (std < 54) {
rc = edid_std_mode(edid + std, mode->xres, mode->yres);
if (rc == 0) {
std += 2;
}
+ } else if (mode->xtra3 && xtra3) {
+ xtra3[mode->xtra3] |= (1 << mode->bit);
}
if (dta && mode->dta) {
--
2.30.2
next prev parent reply other threads:[~2021-03-23 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 15:36 [PULL 0/5] Ui 20210323 patches Gerd Hoffmann
2021-03-23 15:36 ` [PULL 1/5] crypto: add reload for QCryptoTLSCredsClass Gerd Hoffmann
2021-03-23 15:36 ` [PULL 2/5] vnc: support reload x509 certificates for vnc Gerd Hoffmann
2021-03-23 15:36 ` [PULL 3/5] qmp: add new qmp display-reload Gerd Hoffmann
2021-03-23 15:36 ` [PULL 4/5] include/ui/console.h: Delete is_surface_bgr() Gerd Hoffmann
2021-03-23 15:36 ` Gerd Hoffmann [this message]
2021-03-24 11:14 ` [PULL 0/5] Ui 20210323 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210323153616.873822-6-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).