From nobody Mon Feb 9 21:12:14 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1616514049; cv=none; d=zohomail.com; s=zohoarc; b=ARm3AowznzYTevNpB5512E+1i8cJfgAwLlnqGGBPn4g6U+nDnIWgo5wdx5W84rTpTf1Nvipzp32JugElhDlPB5gbMT+O0RCxnxuxUj4O2DrkvBIFScGRVDrhaWez2g7jmmrfUniz3ePYRJ3TYmMoIE75HZZgDXFyPFrkSRhm4e4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616514049; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r6HkGSRZskuaOzMeEwx/oWOBESHI9UJHgo+0D2TZWTc=; b=b3gBTBczBzP4ga3vqOdCwoPCTUltE3ZT44aR5uqWL177Z5A8pU5XphQk6hxJbFQQzTm2I93uFoKp8w51qOKgobYkuuqUxvxF/1K0cwgEU5t9Nek20jf8Sm2F11HpnndBByS0Dd5M8DpdZwcxzJxWXOMX715/cEd+/twx5wN/L5A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616514049682384.47381668874095; Tue, 23 Mar 2021 08:40:49 -0700 (PDT) Received: from localhost ([::1]:35228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOj9E-0001as-Ir for importer@patchew.org; Tue, 23 Mar 2021 11:40:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOj5A-0004cQ-QT for qemu-devel@nongnu.org; Tue, 23 Mar 2021 11:36:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lOj52-000314-Ae for qemu-devel@nongnu.org; Tue, 23 Mar 2021 11:36:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-YtW7QXo6O161pkt5jA-tMQ-1; Tue, 23 Mar 2021 11:36:25 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF1C21007476 for ; Tue, 23 Mar 2021 15:36:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-41.ams2.redhat.com [10.36.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6227E19705; Tue, 23 Mar 2021 15:36:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 22FFD1800624; Tue, 23 Mar 2021 16:36:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616513787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r6HkGSRZskuaOzMeEwx/oWOBESHI9UJHgo+0D2TZWTc=; b=he0nDEm+Cbm2+fgBOcrajY8CbJSLTBUOh+MGJV2CA1OWw+42QW3PPsC5SE/5qShRoXEOoU J8/qySnHPpAgYrkXFkCLJ9vXAE/sA7L3WOA+aHvv/G+4CyiwdzmgF4MAl0oHIAnWWv/iNA pjluvkacN16N1eRdk5eFO7lxFClmAxg= X-MC-Unique: YtW7QXo6O161pkt5jA-tMQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 5/5] edid: prefer standard timings Date: Tue, 23 Mar 2021 16:36:16 +0100 Message-Id: <20210323153616.873822-6-kraxel@redhat.com> In-Reply-To: <20210323153616.873822-1-kraxel@redhat.com> References: <20210323153616.873822-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 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 =3D 1920, .yres =3D 1080, .dta =3D 31 }, =20 /* additional standard timings 3 (all @ 60Hz) */ - { .xres =3D 1920, .yres =3D 1440, .xtra3 =3D 11, .bit =3D 5 }, { .xres =3D 1920, .yres =3D 1200, .xtra3 =3D 10, .bit =3D 0 }, - { .xres =3D 1856, .yres =3D 1392, .xtra3 =3D 10, .bit =3D 3 }, - { .xres =3D 1792, .yres =3D 1344, .xtra3 =3D 10, .bit =3D 5 }, { .xres =3D 1600, .yres =3D 1200, .xtra3 =3D 9, .bit =3D 2 }, { .xres =3D 1680, .yres =3D 1050, .xtra3 =3D 9, .bit =3D 5 }, - { .xres =3D 1440, .yres =3D 1050, .xtra3 =3D 8, .bit =3D 1 }, { .xres =3D 1440, .yres =3D 900, .xtra3 =3D 8, .bit =3D 5 }, - { .xres =3D 1360, .yres =3D 768, .xtra3 =3D 8, .bit =3D 7 }, { .xres =3D 1280, .yres =3D 1024, .xtra3 =3D 7, .bit =3D 1 }, { .xres =3D 1280, .yres =3D 960, .xtra3 =3D 7, .bit =3D 3 }, { .xres =3D 1280, .yres =3D 768, .xtra3 =3D 7, .bit =3D 6 }, =20 + { .xres =3D 1920, .yres =3D 1440, .xtra3 =3D 11, .bit =3D 5 }, + { .xres =3D 1856, .yres =3D 1392, .xtra3 =3D 10, .bit =3D 3 }, + { .xres =3D 1792, .yres =3D 1344, .xtra3 =3D 10, .bit =3D 5 }, + { .xres =3D 1440, .yres =3D 1050, .xtra3 =3D 8, .bit =3D 1 }, + { .xres =3D 1360, .yres =3D 768, .xtra3 =3D 8, .bit =3D 7 }, + /* established timings (all @ 60Hz) */ { .xres =3D 1024, .yres =3D 768, .byte =3D 36, .bit =3D 3 }, { .xres =3D 800, .yres =3D 600, .byte =3D 35, .bit =3D 0 }, @@ -109,13 +110,13 @@ static void edid_fill_modes(uint8_t *edid, uint8_t *x= tra3, uint8_t *dta, =20 if (mode->byte) { edid[mode->byte] |=3D (1 << mode->bit); - } else if (mode->xtra3 && xtra3) { - xtra3[mode->xtra3] |=3D (1 << mode->bit); } else if (std < 54) { rc =3D edid_std_mode(edid + std, mode->xres, mode->yres); if (rc =3D=3D 0) { std +=3D 2; } + } else if (mode->xtra3 && xtra3) { + xtra3[mode->xtra3] |=3D (1 << mode->bit); } =20 if (dta && mode->dta) { --=20 2.30.2