From nobody Sun May 19 06:50:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615905626; cv=none; d=zohomail.com; s=zohoarc; b=ZttQ7EYmguRrQZkBvYpZjPtIAnzvB7pMoETsJ2YId/tlR20C/noG+bAdR+ekcH/Q0wsSM02qvsOBnTQvePCSkGEgoDBmQ+FKU1WKUrVTswePgXmD7+xebYbzOzJdWlJ4BeXKozA8wdEMrgPJvGPE7p9w50MORFhsGLy6+B2Sq9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905626; 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=/HJFAud+TtfwJvJFxfYcM/EjMumg7bYZoLYxL2UHqFA=; b=XKXx/hBdNEZLevdPADA8WvUNnd9gkBhXhmB2c3eiLLzQcMuPDwzIhAgWAt3+rmCcvGSE+XIG7EhJOWNQbESg1O+E6Y4XZUWL1f3WIS9hCs0RO/r6lypTkfifIRUbfLi9mPx/RlQ/cZ3vvqJLncZ6kt2aLAO2WfPnl8hXqKIJnb4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1615905626274825.696683096318; Tue, 16 Mar 2021 07:40:26 -0700 (PDT) Received: from localhost ([::1]:59322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMArx-0005Qa-62 for importer@patchew.org; Tue, 16 Mar 2021 10:40:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMApz-0003e9-3u for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMApx-0002Ah-1r for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:22 -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-344-itfo5WXhPke35-mefm_RoQ-1; Tue, 16 Mar 2021 10:38:18 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 891DF802B7E for ; Tue, 16 Mar 2021 14:38:17 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBEA810023B5; Tue, 16 Mar 2021 14:38:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 420CD1800627; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905500; 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=/HJFAud+TtfwJvJFxfYcM/EjMumg7bYZoLYxL2UHqFA=; b=AwJwWZJWzKS080ZZcxwkICda0Ou+iSZ0GVXju0qqNrV6In+olyFeu3flXcxCcw/vX3poKk cxxNCac47Hc2TPlhFHs1kDYsh1fqueJjUD6pPgbuQu8FuL8CnoaKqUhSyr3KIKdWECoCfY U+t8KooUIB5LYhGjF+khSHYUNIj4k/s= X-MC-Unique: itfo5WXhPke35-mefm_RoQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 1/9] qemu-edid: use qemu_edid_size() Date: Tue, 16 Mar 2021 15:38:04 +0100 Message-Id: <20210316143812.2363588-2-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" So we only write out that part of the edid blob which has been filled with data. Also use a larger buffer for the blob. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- qemu-edid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu-edid.c b/qemu-edid.c index 1cd6a9517238..c3a9fba10dc4 100644 --- a/qemu-edid.c +++ b/qemu-edid.c @@ -41,7 +41,8 @@ static void usage(FILE *out) int main(int argc, char *argv[]) { FILE *outfile =3D NULL; - uint8_t blob[256]; + uint8_t blob[512]; + size_t size; uint32_t dpi =3D 100; int rc; =20 @@ -119,7 +120,8 @@ int main(int argc, char *argv[]) =20 memset(blob, 0, sizeof(blob)); qemu_edid_generate(blob, sizeof(blob), &info); - fwrite(blob, sizeof(blob), 1, outfile); + size =3D qemu_edid_size(blob); + fwrite(blob, size, 1, outfile); fflush(outfile); =20 exit(0); --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615905624; cv=none; d=zohomail.com; s=zohoarc; b=E1OCcd8vgREFiyVrigwycJSdYQvplngQ69s5xW5JOmdDQA81Oep+q+yYuMvVbSM25D7ILe8QYokj2rmbXTCWC3G2O/zoQgfHVsc49hzuOz9tnQKmNjbkb+vwzA2duuyY2xS1mswCS2PhA7tHK5ohBIfhIN52TbD5oeVD1+NJjnQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905624; 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=C+u63sTPzR7LblPkkRfEgX7Zhaq6BoG8nUhQdSKoMXo=; b=buS9IhG/kq5/vVYUxxT8Z43ldry4U4e/ShoS170QV9ZUVxarIcFbDEwq/h9LM6azeJfOihSiOgDRkJbVJwYUv5cfjEM78IbzfDVnSDCJpFdEqxgzZ16VYHJBsnZdTuDlQhY9hRVhdhinwx24OqU6W7UaAoDeIX/Cpy3hUeBjZqs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 16159056240181023.4659094595256; Tue, 16 Mar 2021 07:40:24 -0700 (PDT) Received: from localhost ([::1]:59208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMArt-0005Nq-Du for importer@patchew.org; Tue, 16 Mar 2021 10:40:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMApz-0003eD-8Y for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:56733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMApx-0002B3-6C for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:23 -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-582-I_XcUJdnMJGot2dHpTqRgw-1; Tue, 16 Mar 2021 10:38:18 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 869B6A0C02 for ; Tue, 16 Mar 2021 14:38:17 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAB18104C517; Tue, 16 Mar 2021 14:38:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4CFFA1800628; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905500; 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=C+u63sTPzR7LblPkkRfEgX7Zhaq6BoG8nUhQdSKoMXo=; b=IV2B9ZhwF1C/cx80+yodH2PozCG0pBoWHvKgOQxfWCcgAEDKD+yaV6KjH+YxQ2/j5/KIfo d9knVyQmQX4I68bqfwFhJzBKtxPgJBuIJnTX6tsTwWL+f70Ma+ijq6GmWNu2LRxpD2wn7B f3MjymIN1nKFNx/gv50Iv5x4YM0YKt8= X-MC-Unique: I_XcUJdnMJGot2dHpTqRgw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 2/9] edid: edid_desc_next Date: Tue, 16 Mar 2021 15:38:05 +0100 Message-Id: <20210316143812.2363588-3-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add helper function to find the next free desc block. Needed when we start to use the dta descriptor entries. Signed-off-by: Gerd Hoffmann --- hw/display/edid-generate.c | 41 ++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 1665b7cbb29a..ef7a70fc9654 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -143,6 +143,17 @@ static void edid_checksum(uint8_t *edid) } } =20 +static uint8_t *edid_desc_next(uint8_t *edid, uint8_t *dta, uint8_t *desc) +{ + if (desc =3D=3D NULL) { + return NULL; + } + if (desc + 18 + 18 < edid + 127) { + return desc + 18; + } + return NULL; +} + static void edid_desc_type(uint8_t *desc, uint8_t type) { desc[0] =3D 0; @@ -299,7 +310,7 @@ uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res) void qemu_edid_generate(uint8_t *edid, size_t size, qemu_edid_info *info) { - uint32_t desc =3D 54; + uint8_t *desc =3D edid + 54; uint8_t *xtra3 =3D NULL; uint8_t *dta =3D NULL; uint32_t width_mm, height_mm; @@ -400,32 +411,32 @@ void qemu_edid_generate(uint8_t *edid, size_t size, =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D descriptor blocks =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 - edid_desc_timing(edid + desc, info->prefx, info->prefy, + edid_desc_timing(desc, info->prefx, info->prefy, width_mm, height_mm); - desc +=3D 18; + desc =3D edid_desc_next(edid, dta, desc); =20 - edid_desc_ranges(edid + desc); - desc +=3D 18; + edid_desc_ranges(desc); + desc =3D edid_desc_next(edid, dta, desc); =20 if (info->name) { - edid_desc_text(edid + desc, 0xfc, info->name); - desc +=3D 18; + edid_desc_text(desc, 0xfc, info->name); + desc =3D edid_desc_next(edid, dta, desc); } =20 if (info->serial) { - edid_desc_text(edid + desc, 0xff, info->serial); - desc +=3D 18; + edid_desc_text(desc, 0xff, info->serial); + desc =3D edid_desc_next(edid, dta, desc); } =20 - if (desc < 126) { - xtra3 =3D edid + desc; + if (desc) { + xtra3 =3D desc; edid_desc_xtra3_std(xtra3); - desc +=3D 18; + desc =3D edid_desc_next(edid, dta, desc); } =20 - while (desc < 126) { - edid_desc_dummy(edid + desc); - desc +=3D 18; + while (desc) { + edid_desc_dummy(desc); + desc =3D edid_desc_next(edid, dta, desc); } =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D finish up =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615905616; cv=none; d=zohomail.com; s=zohoarc; b=OnI+tS8MKM7gh22o/dDNO0DJ2i4oG1SMqcmZl4EQN2QSPqlhLEefx7ANCdtepZnEcMPFD+cuZZZkuCNcxWP4+/eV9RpodhrWObx228Api0qbFDj/OANBcpRRTYcr/sSD1E18necmAI7rsVYV/RkR6TT+cNP3k58BDfEqvNKLeL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905616; 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=HenKwa4hoM0V49zGIkl82eGf1JLIKcUT10BtqC1W4jo=; b=N09VpqitOqr0Eo7QTiLHLA4IMEr5Cqu/1Nkh32l463+kyALlvI5MLqgyDKv/xMPZlCigT59k5WyMQIczCXqc2u5lDKW4WUAJR/6JMKDHNHlqzXl2X3y/Fj1TH2JRfGT2iazPu7MTrJg3aPe+W9il1VuXMrc0gn6oNyj7m5tIHNI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1615905616261551.9615024735937; Tue, 16 Mar 2021 07:40:16 -0700 (PDT) Received: from localhost ([::1]:59018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMArl-0005JH-KM for importer@patchew.org; Tue, 16 Mar 2021 10:40:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMApy-0003dm-Gz for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:33294) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMApw-0002Ab-O5 for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:22 -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-424-zfOeyHqxMzyW8l_gOTzJBw-1; Tue, 16 Mar 2021 10:38:18 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8175C100C665 for ; Tue, 16 Mar 2021 14:38:17 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA04C5B4B6; Tue, 16 Mar 2021 14:38:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 579CF180062A; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905500; 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=HenKwa4hoM0V49zGIkl82eGf1JLIKcUT10BtqC1W4jo=; b=VK2SwZZdXL8aNZWZL/toMRkPAVysjEFvhYdLjeSORo9/21DObjbw3t29nbNHtJ/+4FYd6+ vmZi0t1xzOhd0ahFsheuquGMXZ5QFeVqQdCVwNvBiCnsAqW3qYHV7xvxZ1mi+drVA3KsNI z90PsF2dqckOYTCc27n0Oz1mqG1G8lI= X-MC-Unique: zfOeyHqxMzyW8l_gOTzJBw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 3/9] edid: move xtra3 descriptor Date: Tue, 16 Mar 2021 15:38:06 +0100 Message-Id: <20210316143812.2363588-4-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- hw/display/edid-generate.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index ef7a70fc9654..259ef7315217 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -415,25 +415,28 @@ void qemu_edid_generate(uint8_t *edid, size_t size, width_mm, height_mm); desc =3D edid_desc_next(edid, dta, desc); =20 + xtra3 =3D desc; + edid_desc_xtra3_std(xtra3); + desc =3D 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 =3D edid_desc_next(edid, dta, desc); =20 - if (info->name) { + if (desc && info->name) { edid_desc_text(desc, 0xfc, info->name); desc =3D edid_desc_next(edid, dta, desc); } =20 - if (info->serial) { + if (desc && info->serial) { edid_desc_text(desc, 0xff, info->serial); desc =3D edid_desc_next(edid, dta, desc); } =20 - if (desc) { - xtra3 =3D desc; - edid_desc_xtra3_std(xtra3); - desc =3D edid_desc_next(edid, dta, desc); - } - while (desc) { edid_desc_dummy(desc); desc =3D edid_desc_next(edid, dta, desc); @@ -441,7 +444,6 @@ void qemu_edid_generate(uint8_t *edid, size_t size, =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D finish up =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 - edid_fill_modes(edid, xtra3, dta, info->maxx, info->maxy); edid_checksum(edid); if (dta) { edid_checksum(dta); --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615905620; cv=none; d=zohomail.com; s=zohoarc; b=K1CDBeiWBH+A+1J5zPIBrAscYwVlD3rkrGYKY+2G+m8pP4ZEt37rs0ICYbT04jr19+8boMjlfVUmyJ7oRZNt0WqbhldNlaZ3kf6cEszDGmP5DXlZHAAPCbg/jnp/RQJbwVFAm6Nglr3GWeU0XmmeN9qAj+QzMQWIGRM1v+xLUds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905620; 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=QeghCcWJCEe+UCS0TAiCXU0ML+ql8ypkHN4QX9BicnE=; b=XJ0kVVXEYjLvMFSxmZuxOSs+y5OoIz+73b7gbgIMwvAaF9jk0Gt3/uCcrOn4SiMZlD+6/i5RN9mJUwoo9pvTEW012MBiPRvapgPUA0pT1AfDAzVSZaGVICiJpIPIlyslvnau734iLHXWnlkQQNunLuKlHlNVXM8tVbh2/8v9iD8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1615905620719645.1833054207527; Tue, 16 Mar 2021 07:40:20 -0700 (PDT) Received: from localhost ([::1]:59134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMArr-0005M2-MU for importer@patchew.org; Tue, 16 Mar 2021 10:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMApy-0003e8-V8 for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMApw-0002AZ-U5 for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:22 -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-347-XWHa-iFuO1OOJrcFR-gbCQ-1; Tue, 16 Mar 2021 10:38:18 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C0AA800FF0 for ; Tue, 16 Mar 2021 14:38:17 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBC765DEAD; Tue, 16 Mar 2021 14:38:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6254E180062B; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905500; 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=QeghCcWJCEe+UCS0TAiCXU0ML+ql8ypkHN4QX9BicnE=; b=OVsNYg/RA9fg0MkiCD+RlJj37oE2MFl/0dTguaUPzMiRHxNNyK1GyfuywYddH3Z0nMvc7o ySUaRhvvb94PKb2wXLmS4zQysGs8Sg5hcn/HIXJ4qYNBvruwfZ8908TMTNz5UY8rcdFsaV y+7KicsV5q8GB1vGr5Qy3CLbGgZiF50= X-MC-Unique: XWHa-iFuO1OOJrcFR-gbCQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 4/9] edid: use dta extension block descriptors Date: Tue, 16 Mar 2021 15:38:07 +0100 Message-Id: <20210316143812.2363588-5-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- hw/display/edid-generate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 259ef7315217..489532c3bc5f 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -151,6 +151,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; } =20 --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615905997; cv=none; d=zohomail.com; s=zohoarc; b=EZH/HkE8zHYnlCXMOsMp6j2TanCnabsoOrHQinP8WAHCClJPcMN/bUw1ZdQITgxwoISKVR1EjJBK01ZkFp/CFDwUan0dPAG9oxnrhTEIM08p9pW33CcaeiTI8cJygilUUHHmgHNTem6RrANQyiHiAVu2EBEf2trqO2kSNbWklXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905997; 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=MiilbPim2Vhka8mV5z8eig4FD2pldmkQghkgRX0hEGo=; b=bCCI/svNiwiSYRebF6PvfaZGViFXVrZX9SUcoqwAxJfyaLgq+skZiamWJaM2n0GihSZkAJtwkxeYmqNGfTYgfHsS+R1H5bWTVK1UzRbJKJf7zKUt1eleXYEawR7cVByoaI376J8UCmoV62+DYrAj1e+DWg2SCo1g53W6D9DqCo4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1615905997346685.8672455884594; Tue, 16 Mar 2021 07:46:37 -0700 (PDT) Received: from localhost ([::1]:49374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMAxv-0004sZ-L9 for importer@patchew.org; Tue, 16 Mar 2021 10:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMAqB-0003kg-5d for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMAq3-0002Ew-7h for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:33 -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-477-KOs_PFdxPxqWAnG8y6B17g-1; Tue, 16 Mar 2021 10:38:23 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47FFEA40C0 for ; Tue, 16 Mar 2021 14:38:22 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C706E5D719; Tue, 16 Mar 2021 14:38:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6D133180062D; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905505; 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=MiilbPim2Vhka8mV5z8eig4FD2pldmkQghkgRX0hEGo=; b=GUPJBIGayBLtcPrFFg/0zVvKcojmKEo+ol/oW/1/LAzBh9B9ZhiV7XzlChZ0RbFlTNE5ft XEZMZClZCi5Bt2XmslpohJ74bGI0JToDdYa0pvA9ehXy+wVfe/CorHNSRqW/5G5hn0IMzW nYJK30SWHnTRc9uGgLUPOyvk1DsIhR0= X-MC-Unique: KOs_PFdxPxqWAnG8y6B17g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 5/9] edid: prefer standard timings Date: Tue, 16 Mar 2021 15:38:08 +0100 Message-Id: <20210316143812.2363588-6-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) 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 --- 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 489532c3bc5f..42a130f0ff5c 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 From nobody Sun May 19 06:50:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615905769; cv=none; d=zohomail.com; s=zohoarc; b=F2hRw+lHPjcaXdLezLMyJ2IlEKhcpMfWQ4xhnSx8NVwTzPaqFKq+wgFp12mjNYCSUznTZnEJ6UNEtzK307+W5A1wIl+eW+gcw8U3Zyyz17OuEX2ORSj03KgXgp09q9+ouk7zHKPpfFcMpI4ZpA2MIlh308BbYOg4GYDko5tBLXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905769; 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=1Jcr9CfhX/9s+5yw5pAE9q1R2xnwTgkF74x4TRYJjd8=; b=ZwWVMMRjWs7IuA53tnjgxuToxgbixpkGCJhlUtjbE1EJimqR/nR634GJdrNUJRCWUpxi+Gklyp8QO2nX/23mwOlpYkG5tRHioANwvVjt91QIOhesz+aOLVChH5WOqyDUjzbxHq+P0MAdYmVtvbO9YBIgtGo4oRudozU0Bsd/xtw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 16159057699441020.2029327857307; Tue, 16 Mar 2021 07:42:49 -0700 (PDT) Received: from localhost ([::1]:38818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMAuG-0000KF-Je for importer@patchew.org; Tue, 16 Mar 2021 10:42:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMAqI-0003nd-DD for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMAq5-0002FF-Bx for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:41 -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-238-odwrqqiuNKSMFd-4AMfnWw-1; Tue, 16 Mar 2021 10:38:23 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4DEEC108BD07; Tue, 16 Mar 2021 14:38:22 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE2455D71D; Tue, 16 Mar 2021 14:38:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 79833180062E; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905505; 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=1Jcr9CfhX/9s+5yw5pAE9q1R2xnwTgkF74x4TRYJjd8=; b=cLEsmhB0iqyzIxjiDWM3t1mWzAesGQnEv6XKse7rhtQlMYILZm1Q+y0tQvDlGZOFlGjhEc QD5/taynCjaFOHoiTGYBtCaOcivjWVKx2zkaF9h4KF7xuuCV4L77ogGqw8pubVXDDcoz8s AZvsQ2yqimo0/jYEzkLguHQffRFSzuY= X-MC-Unique: odwrqqiuNKSMFd-4AMfnWw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 6/9] edid: Make refresh rate configurable Date: Tue, 16 Mar 2021 15:38:09 +0100 Message-Id: <20210316143812.2363588-7-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Signed-off-by: Akihiko Odaki Signed-off-by: Gerd Hoffmann --- include/hw/display/edid.h | 12 +++++++----- hw/display/edid-generate.c | 9 +++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h index 1f8fc9b37500..520f8ec20279 100644 --- a/include/hw/display/edid.h +++ b/include/hw/display/edid.h @@ -11,6 +11,7 @@ typedef struct qemu_edid_info { uint32_t prefy; uint32_t maxx; uint32_t maxy; + uint32_t refresh_rate; } qemu_edid_info; =20 void qemu_edid_generate(uint8_t *edid, size_t size, @@ -21,10 +22,11 @@ void qemu_edid_region_io(MemoryRegion *region, Object *= owner, =20 uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res); =20 -#define DEFINE_EDID_PROPERTIES(_state, _edid_info) \ - DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \ - DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), \ - DEFINE_PROP_UINT32("xmax", _state, _edid_info.maxx, 0), \ - DEFINE_PROP_UINT32("ymax", _state, _edid_info.maxy, 0) +#define DEFINE_EDID_PROPERTIES(_state, _edid_info) = \ + DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), = \ + DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), = \ + DEFINE_PROP_UINT32("xmax", _state, _edid_info.maxx, 0), = \ + DEFINE_PROP_UINT32("ymax", _state, _edid_info.maxy, 0), = \ + DEFINE_PROP_UINT32("refresh_rate", _state, _edid_info.refresh_rate, 0) =20 #endif /* EDID_H */ diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 42a130f0ff5c..8662218822f6 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -223,7 +223,7 @@ static void edid_desc_dummy(uint8_t *desc) edid_desc_type(desc, 0x10); } =20 -static void edid_desc_timing(uint8_t *desc, +static void edid_desc_timing(uint8_t *desc, uint32_t refresh_rate, uint32_t xres, uint32_t yres, uint32_t xmm, uint32_t ymm) { @@ -236,9 +236,9 @@ static void edid_desc_timing(uint8_t *desc, uint32_t ysync =3D yres * 5 / 1000; uint32_t yblank =3D yres * 35 / 1000; =20 - uint32_t clock =3D 75 * (xres + xblank) * (yres + yblank); + uint64_t clock =3D (uint64_t)refresh_rate * (xres + xblank) * (yres += yblank); =20 - stl_le_p(desc, clock / 10000); + stl_le_p(desc, clock / 10000000); =20 desc[2] =3D xres & 0xff; desc[3] =3D xblank & 0xff; @@ -323,6 +323,7 @@ void qemu_edid_generate(uint8_t *edid, size_t size, uint8_t *xtra3 =3D NULL; uint8_t *dta =3D NULL; uint32_t width_mm, height_mm; + uint32_t refresh_rate =3D info->refresh_rate ? info->refresh_rate : 75= 000; uint32_t dpi =3D 100; /* if no width_mm/height_mm */ =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D set defaults =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ @@ -420,7 +421,7 @@ void qemu_edid_generate(uint8_t *edid, size_t size, =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D descriptor blocks =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 - edid_desc_timing(desc, info->prefx, info->prefy, + edid_desc_timing(desc, refresh_rate, info->prefx, info->prefy, width_mm, height_mm); desc =3D edid_desc_next(edid, dta, desc); =20 --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 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=1615906100; cv=none; d=zohomail.com; s=zohoarc; b=UouhRt3dashidaWPzUFgGgJNUJzmg3hUHFi7kou7lyUIDCPVTngBavKoBN+pENknJ1x0Qw2twnLDfNn9/f1DcD2IUf/kTGib4uCA+F/B5+oX3ug0SYFzq+DebOqk0dIDYo7dGu133m0nTeQ911jFnJdZmSwJLKilKAjpPewgfDI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615906100; 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=ZWa0cFKYWCK117AR6dw9Xt+0jt/SqgOE0ZpiGrqpUkQ=; b=a3JzNOeKk4Y611kORzrbpE5VFMdkvHOClDZP3FZXu15AIGfheed/agDg6+upFnlSn6OWlUp4MEViOUx+Bo7Jw5+CGHWsp88iu+dF1rXri0T6/ZCGg+ymVvLEdsMoiTNPyXynWOCjlfMffdyoZfyytJ694ZihAowpaXIBn9lglXQ= 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 1615906100875321.7219582877009; Tue, 16 Mar 2021 07:48:20 -0700 (PDT) Received: from localhost ([::1]:53124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMAzb-0006Sp-IU for importer@patchew.org; Tue, 16 Mar 2021 10:48:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMAqD-0003lQ-2n for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMAq4-0002Fa-F4 for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:35 -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-479-7lXVY4lpP4OZzHiOgGW2IQ-1; Tue, 16 Mar 2021 10:38:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79CF1193248D; Tue, 16 Mar 2021 14:38:22 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F043F60C13; Tue, 16 Mar 2021 14:38:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 84596180062F; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905505; 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=ZWa0cFKYWCK117AR6dw9Xt+0jt/SqgOE0ZpiGrqpUkQ=; b=FGCOP/hYegUF2No4dM/gD0pS6hjrnlhFot4IK1ZtWJGdcKrFJgRAXHJsnVdPoiYVc02VE7 cvc+zaC5y9D5hB2NbjrfRdZ06v556M6LyIoXVCqG2RhKQiRnGgWjfe2HKQIJK+d0F5f9SR J9y3zBCKOClQFQIqVPZVBrLE4ZVU0/A= X-MC-Unique: 7lXVY4lpP4OZzHiOgGW2IQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 7/9] edid: move timing generation into a separate function Date: Tue, 16 Mar 2021 15:38:10 +0100 Message-Id: <20210316143812.2363588-8-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Konstantin Nazarov , 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" From: Konstantin Nazarov The timing generation is currently performed inside the function that fills in the DTD. The DisplayID generation needs it as well, so moving it out to a separate function. Based-on: <20210303152948.59943-2-akihiko.odaki@gmail.com> Signed-off-by: Konstantin Nazarov Message-Id: <20210315114639.91953-1-mail@knazarov.com> Signed-off-by: Gerd Hoffmann --- hw/display/edid-generate.c | 68 ++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 8662218822f6..b70ab1557e50 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -45,6 +45,35 @@ static const struct edid_mode { { .xres =3D 640, .yres =3D 480, .byte =3D 35, .bit =3D 5 }, }; =20 +typedef struct Timings { + uint32_t xfront; + uint32_t xsync; + uint32_t xblank; + + uint32_t yfront; + uint32_t ysync; + uint32_t yblank; + + uint64_t clock; +} Timings; + +static void generate_timings(Timings *timings, uint32_t refresh_rate, + uint32_t xres, uint32_t yres) +{ + /* pull some realistic looking timings out of thin air */ + timings->xfront =3D xres * 25 / 100; + timings->xsync =3D xres * 3 / 100; + timings->xblank =3D xres * 35 / 100; + + timings->yfront =3D yres * 5 / 1000; + timings->ysync =3D yres * 5 / 1000; + timings->yblank =3D yres * 35 / 1000; + + timings->clock =3D ((uint64_t)refresh_rate * + (xres + timings->xblank) * + (yres + timings->yblank)) / 10000000; +} + static void edid_ext_dta(uint8_t *dta) { dta[0] =3D 0x02; @@ -227,38 +256,29 @@ static void edid_desc_timing(uint8_t *desc, uint32_t = refresh_rate, uint32_t xres, uint32_t yres, uint32_t xmm, uint32_t ymm) { - /* pull some realistic looking timings out of thin air */ - uint32_t xfront =3D xres * 25 / 100; - uint32_t xsync =3D xres * 3 / 100; - uint32_t xblank =3D xres * 35 / 100; - - uint32_t yfront =3D yres * 5 / 1000; - uint32_t ysync =3D yres * 5 / 1000; - uint32_t yblank =3D yres * 35 / 1000; - - uint64_t clock =3D (uint64_t)refresh_rate * (xres + xblank) * (yres += yblank); - - stl_le_p(desc, clock / 10000000); + Timings timings; + generate_timings(&timings, refresh_rate, xres, yres); + stl_le_p(desc, timings.clock); =20 desc[2] =3D xres & 0xff; - desc[3] =3D xblank & 0xff; + desc[3] =3D timings.xblank & 0xff; desc[4] =3D (((xres & 0xf00) >> 4) | - ((xblank & 0xf00) >> 8)); + ((timings.xblank & 0xf00) >> 8)); =20 desc[5] =3D yres & 0xff; - desc[6] =3D yblank & 0xff; + desc[6] =3D timings.yblank & 0xff; desc[7] =3D (((yres & 0xf00) >> 4) | - ((yblank & 0xf00) >> 8)); + ((timings.yblank & 0xf00) >> 8)); =20 - desc[8] =3D xfront & 0xff; - desc[9] =3D xsync & 0xff; + desc[8] =3D timings.xfront & 0xff; + desc[9] =3D timings.xsync & 0xff; =20 - desc[10] =3D (((yfront & 0x00f) << 4) | - ((ysync & 0x00f) << 0)); - desc[11] =3D (((xfront & 0x300) >> 2) | - ((xsync & 0x300) >> 4) | - ((yfront & 0x030) >> 2) | - ((ysync & 0x030) >> 4)); + desc[10] =3D (((timings.yfront & 0x00f) << 4) | + ((timings.ysync & 0x00f) << 0)); + desc[11] =3D (((timings.xfront & 0x300) >> 2) | + ((timings.xsync & 0x300) >> 4) | + ((timings.yfront & 0x030) >> 2) | + ((timings.ysync & 0x030) >> 4)); =20 desc[12] =3D xmm & 0xff; desc[13] =3D ymm & 0xff; --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 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=1615905907; cv=none; d=zohomail.com; s=zohoarc; b=QGTDXa77wLArbnh4Qq6FRaiIUhol5jMDB+gBs8weDbhlXsgC80m6x1gVTfbe1VcP8lf6Uhu/7jz+QJkNm8hIza9ySRypCeXn+FG6K3ApsmM8j/9KXe5SyPooz77cz6EE2h743aGysYvCu2cfndRPxGc2GF3u3jPlZSOXYlTM8JE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905907; 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=aSJsXWasRkayCSP91pEA9yKn6iwqOO3h/LeAuZ+zMH0=; b=XIeZD5wuOxvqSnqBRWcx8tqaheAf2HzV8dvnAjlCDjEC9iAR8bGv44bzSRdyKgI117sFksK5DXtLHnmkpVpav+rNm+dU1mcaCb/uB7MosPgh5VtlTT6YEhbs8K0gIDu8pWv9/pwdX3eFWYy8Ux/kHetVERapkxdA+h6vzOL4YV4= 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 1615905907635156.5676388444964; Tue, 16 Mar 2021 07:45:07 -0700 (PDT) Received: from localhost ([::1]:46560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMAwU-0003Z5-8x for importer@patchew.org; Tue, 16 Mar 2021 10:45:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMAq3-0003hI-Es for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMApz-0002Cy-Cs for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:25 -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-383-cvR_ZsRaMTiKHCsbYSmF8A-1; Tue, 16 Mar 2021 10:38:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 345E383DD20; Tue, 16 Mar 2021 14:38:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0EBA189B6; Tue, 16 Mar 2021 14:38:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8ED571800631; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905502; 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=aSJsXWasRkayCSP91pEA9yKn6iwqOO3h/LeAuZ+zMH0=; b=frnddptCktTd3OZRZrvkNHGvP+BWr7Ws5QdpExjyaCpQkg7m2PtiU49MfAi96MfcGqYQV4 Z5Rgn9xseHdFNg8YTj2qSKBkqtendDToH/Zh4U6tiArtNtmYP187s7dqlxNf7Rk3/8A1lR vPNFPQ9cfjkI5UvOIJd84Sp4fJZj1p8= X-MC-Unique: cvR_ZsRaMTiKHCsbYSmF8A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 8/9] edid: allow arbitrary-length checksums Date: Tue, 16 Mar 2021 15:38:11 +0100 Message-Id: <20210316143812.2363588-9-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Konstantin Nazarov , 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" From: Konstantin Nazarov Some of the EDID extensions like DisplayID do checksums of their subsections. Currently checksums can be only applied to the whole extension blocks which are 128 bytes. This patch allows to checksum arbitrary parts of EDID, and not only whole extension blocks. Based-on: <20210303152948.59943-2-akihiko.odaki@gmail.com> Signed-off-by: Konstantin Nazarov Message-Id: <20210315114639.91953-2-mail@knazarov.com> Signed-off-by: Gerd Hoffmann --- hw/display/edid-generate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index b70ab1557e50..bdd01571fc9b 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -159,17 +159,17 @@ static void edid_fill_modes(uint8_t *edid, uint8_t *x= tra3, uint8_t *dta, } } =20 -static void edid_checksum(uint8_t *edid) +static void edid_checksum(uint8_t *edid, size_t len) { uint32_t sum =3D 0; int i; =20 - for (i =3D 0; i < 127; i++) { + for (i =3D 0; i < len; i++) { sum +=3D edid[i]; } sum &=3D 0xff; if (sum) { - edid[127] =3D 0x100 - sum; + edid[len] =3D 0x100 - sum; } } =20 @@ -474,9 +474,9 @@ void qemu_edid_generate(uint8_t *edid, size_t size, =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D finish up =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 - edid_checksum(edid); + edid_checksum(edid, 127); if (dta) { - edid_checksum(dta); + edid_checksum(dta, 127); } } =20 --=20 2.30.2 From nobody Sun May 19 06:50:46 2024 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=1615905799; cv=none; d=zohomail.com; s=zohoarc; b=mlDuc/ofoE2ukVuvzPADaEJVYbUy9peW3vw5eX6TMtuox8Zw51aMalTwimR0RacPAAl7N+8jnxU0NM91o9WququAgF5IZkWrCL+u8pLd5R92PeI9tZX2sm8M3s9kq5+Fm4E5YxYGFx5l4ECJ9oIyq3N1fyCkP4EiK/vwFDAusq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615905799; 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=iRN0sWOjlaApJR3LalQp1kXOI3OmFWRgtSQ9fOzQ8m8=; b=bG3lOu+LMb301X0bzX6WjnrDwBQPHseUgyJEfXDvyqsUmPrMCfHJvHjDlPsEtgREvOouq/5XKHwI4bbkKJIzAoiAK7wIendJiEN9TX0pNyuLJq7jL5Dk2Tk7r65N7w7gB9YFhCdYAzNNhPpcVhqQhZJElAkFGJRzFGUuxEwvAIQ= 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 161590579985737.166114571798516; Tue, 16 Mar 2021 07:43:19 -0700 (PDT) Received: from localhost ([::1]:41710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMAuk-0001Vu-G8 for importer@patchew.org; Tue, 16 Mar 2021 10:43:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMAq9-0003k5-9Y for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:57358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lMAq0-0002ES-Tf for qemu-devel@nongnu.org; Tue, 16 Mar 2021 10:38:31 -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-326-aSIlF_LoOtynwa5OSPqa5Q-1; Tue, 16 Mar 2021 10:38:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 755EE800FF0; Tue, 16 Mar 2021 14:38:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03B3018AAF; Tue, 16 Mar 2021 14:38:19 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9C4181800633; Tue, 16 Mar 2021 15:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615905504; 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=iRN0sWOjlaApJR3LalQp1kXOI3OmFWRgtSQ9fOzQ8m8=; b=OkT1pyou68JoXg2bH4pXvz0hcreNj5k4nmNsXeg80jwC3ov3cn+J90JIH8+1MBJt+F9c/K GpJdIG7+z1fPx/3oau5dmSZeM/a3PM9SRckGQAUglG13ROl7VKhNddTQxynNAcQqicQXMe TM62gFEtWG1qXnnreOr7nh7bzg84wC8= X-MC-Unique: aSIlF_LoOtynwa5OSPqa5Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 9/9] edid: add support for DisplayID extension (5k resolution) Date: Tue, 16 Mar 2021 15:38:12 +0100 Message-Id: <20210316143812.2363588-10-kraxel@redhat.com> In-Reply-To: <20210316143812.2363588-1-kraxel@redhat.com> References: <20210316143812.2363588-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Konstantin Nazarov , 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" From: Konstantin Nazarov The Detailed Timing Descriptor has only 12 bits to store the resolution. This limits the guest to 4095 pixels. This patch adds support for the DisplayID extension, that has 2 full bytes for that purpose, thus allowing 5k resolutions and above. Based-on: <20210303152948.59943-2-akihiko.odaki@gmail.com> Signed-off-by: Konstantin Nazarov Message-Id: <20210315114639.91953-3-mail@knazarov.com> [ kraxel: minor workflow tweaks ] Signed-off-by: Gerd Hoffmann --- hw/display/edid-generate.c | 78 +++++++++++++++++++++++++++++++++++--- hw/display/vga-pci.c | 2 +- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index bdd01571fc9b..f2b874d5e358 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -229,8 +229,8 @@ static void edid_desc_ranges(uint8_t *desc) desc[7] =3D 30; desc[8] =3D 160; =20 - /* max dot clock (1200 MHz) */ - desc[9] =3D 1200 / 10; + /* max dot clock (2550 MHz) */ + desc[9] =3D 2550 / 10; =20 /* no extended timing information */ desc[10] =3D 0x01; @@ -336,15 +336,61 @@ uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t r= es) return res * 254 / 10 / dpi; } =20 +static void init_displayid(uint8_t *did) +{ + did[0] =3D 0x70; /* display id extension */ + did[1] =3D 0x13; /* version 1.3 */ + did[2] =3D 4; /* length */ + did[3] =3D 0x03; /* product type (0x03 =3D=3D standalone display devic= e) */ + edid_checksum(did + 1, did[2] + 4); +} + +static void qemu_displayid_generate(uint8_t *did, uint32_t refresh_rate, + uint32_t xres, uint32_t yres, + uint32_t xmm, uint32_t ymm) +{ + Timings timings; + generate_timings(&timings, refresh_rate, xres, yres); + + did[0] =3D 0x70; /* display id extension */ + did[1] =3D 0x13; /* version 1.3 */ + did[2] =3D 23; /* length */ + did[3] =3D 0x03; /* product type (0x03 =3D=3D standalone display devic= e) */ + + did[5] =3D 0x03; /* Detailed Timings Data Block */ + did[6] =3D 0x00; /* revision */ + did[7] =3D 0x14; /* block length */ + + did[8] =3D timings.clock & 0xff; + did[9] =3D (timings.clock & 0xff00) >> 8; + did[10] =3D (timings.clock & 0xff0000) >> 16; + + did[11] =3D 0x88; /* leave aspect ratio undefined */ + + stw_le_p(did + 12, 0xffff & (xres - 1)); + stw_le_p(did + 14, 0xffff & (timings.xblank - 1)); + stw_le_p(did + 16, 0xffff & (timings.xfront - 1)); + stw_le_p(did + 18, 0xffff & (timings.xsync - 1)); + + stw_le_p(did + 20, 0xffff & (yres - 1)); + stw_le_p(did + 22, 0xffff & (timings.yblank - 1)); + stw_le_p(did + 24, 0xffff & (timings.yfront - 1)); + stw_le_p(did + 26, 0xffff & (timings.ysync - 1)); + + edid_checksum(did + 1, did[2] + 4); +} + void qemu_edid_generate(uint8_t *edid, size_t size, qemu_edid_info *info) { uint8_t *desc =3D edid + 54; uint8_t *xtra3 =3D NULL; uint8_t *dta =3D NULL; + uint8_t *did =3D NULL; uint32_t width_mm, height_mm; uint32_t refresh_rate =3D info->refresh_rate ? info->refresh_rate : 75= 000; uint32_t dpi =3D 100; /* if no width_mm/height_mm */ + uint32_t large_screen =3D 0; =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D set defaults =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 @@ -360,6 +406,9 @@ void qemu_edid_generate(uint8_t *edid, size_t size, if (!info->prefy) { info->prefy =3D 768; } + if (info->prefx >=3D 4096 || info->prefy >=3D 4096) { + large_screen =3D 1; + } if (info->width_mm && info->height_mm) { width_mm =3D info->width_mm; height_mm =3D info->height_mm; @@ -377,6 +426,12 @@ void qemu_edid_generate(uint8_t *edid, size_t size, edid_ext_dta(dta); } =20 + if (size >=3D 384 && large_screen) { + did =3D edid + 256; + edid[126]++; + init_displayid(did); + } + /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D header information = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 /* fixed */ @@ -441,9 +496,12 @@ void qemu_edid_generate(uint8_t *edid, size_t size, =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D descriptor blocks =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 - edid_desc_timing(desc, refresh_rate, info->prefx, info->prefy, - width_mm, height_mm); - desc =3D edid_desc_next(edid, dta, desc); + if (!large_screen) { + /* The DTD section has only 12 bits to store the resolution */ + edid_desc_timing(desc, refresh_rate, info->prefx, info->prefy, + width_mm, height_mm); + desc =3D edid_desc_next(edid, dta, desc); + } =20 xtra3 =3D desc; edid_desc_xtra3_std(xtra3); @@ -472,12 +530,22 @@ void qemu_edid_generate(uint8_t *edid, size_t size, desc =3D edid_desc_next(edid, dta, desc); } =20 + /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D display id extensions= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ + + if (did && large_screen) { + qemu_displayid_generate(did, refresh_rate, info->prefx, info->pref= y, + width_mm, height_mm); + } + /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D finish up =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 edid_checksum(edid, 127); if (dta) { edid_checksum(dta, 127); } + if (did) { + edid_checksum(did, 127); + } } =20 size_t qemu_edid_size(uint8_t *edid) diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 48d29630ab77..62fb5c38c1fd 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -49,7 +49,7 @@ struct PCIVGAState { qemu_edid_info edid_info; MemoryRegion mmio; MemoryRegion mrs[4]; - uint8_t edid[256]; + uint8_t edid[384]; }; =20 #define TYPE_PCI_VGA "pci-vga" --=20 2.30.2