From nobody Tue Feb 10 15:01:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84997+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84997+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639665014; cv=none; d=zohomail.com; s=zohoarc; b=RitSZsscN/CiUwBZA9gSlfVnSvKCF/cIUtvY2/CE40eraCTB8cc+6OO+Xi4wod7OzmfT+4subZtWS2OzoQtXacE8YDTm5w/isVaNV7FfbNCEj2DEG9L2gLm/zP5H6BalCY8/Ecfr/fGFKBnG6H2JjzlXeg2rljmf7ZW7JebNy0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639665014; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=hc/VR495/6qg8GKYItGEsYbUbh8AYqw8EQspS3RB0Eg=; b=SEVT0THLXlTyLjio/lw0UU+SvPNoDyKvKJYTUcJrz/kRfSjqptR7J7ck4YrXDqIcggsCLVSdUtSMGP8IULLW7+uJAcPLrq3iyyuk6oi68yrUI7LRrM6TEDheci3lHDs8P+kzlr50vOdCedZLKtiaiSL8EFF25JgfqdmO0m7qzRQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84997+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163966501433011.76368799409613; Thu, 16 Dec 2021 06:30:14 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id pJb8YY1788612xPsQtMe8PeF; Thu, 16 Dec 2021 06:30:14 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.11136.1639665012766125311 for ; Thu, 16 Dec 2021 06:30:12 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-607-yP102KIwPjCCLPo9SS2aDg-1; Thu, 16 Dec 2021 09:30:08 -0500 X-MC-Unique: yP102KIwPjCCLPo9SS2aDg-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A394E10247AC; Thu, 16 Dec 2021 14:30:06 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BA5F7A22A; Thu, 16 Dec 2021 14:30:06 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4397118003B6; Thu, 16 Dec 2021 15:29:59 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Erdem Aktas , Julien Grall , Brijesh Singh , Pawel Polawski , Min Xu , Jiewen Yao , Tom Lendacky , Ard Biesheuvel , Jordan Justen , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , James Bottomley , Anthony Perard , Gerd Hoffmann Subject: [edk2-devel] [PATCH 3/5] OvmfPkg/QemuVideoDxe: drop QEMU_VIDEO_BOCHS_MODES->ColorDepth Date: Thu, 16 Dec 2021 15:29:57 +0100 Message-Id: <20211216142959.1998191-4-kraxel@redhat.com> In-Reply-To: <20211216142959.1998191-1-kraxel@redhat.com> References: <20211216142959.1998191-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: ifr3OI9aMJQNNtevSeRTZsFMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639665014; bh=lw27NtZhRYD6a3oXGSowgMxMJ7zh8jDWEfExpCxcVe0=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=OPG2z1m+4yzFR9urypqYJN8HwxEyR9F/81p8Sh8qTmlC+kKWp3MX2FwVYSW4/0YYYdX PiULPIyncXnNleLzLz9J1YYbXeAIgo4XnNb7zmnaPM6iXsAApe0+uKt7Cr+U9d5fVhoYN IMubxfESwR/TVrmKGZmx6m9UFpeSwe7YckU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639665027149100007 Content-Type: text/plain; charset="utf-8" All video modes in the list are 32-bit, so drop the useless ColorDepth field. Signed-off-by: Gerd Hoffmann --- OvmfPkg/QemuVideoDxe/Qemu.h | 1 - OvmfPkg/QemuVideoDxe/Initialize.c | 80 +++++++++++++++---------------- 2 files changed, 39 insertions(+), 42 deletions(-) diff --git a/OvmfPkg/QemuVideoDxe/Qemu.h b/OvmfPkg/QemuVideoDxe/Qemu.h index fef648c967b2..1e6507f44caa 100644 --- a/OvmfPkg/QemuVideoDxe/Qemu.h +++ b/OvmfPkg/QemuVideoDxe/Qemu.h @@ -132,7 +132,6 @@ typedef struct { typedef struct { UINT32 Width; UINT32 Height; - UINT32 ColorDepth; } QEMU_VIDEO_BOCHS_MODES; =20 #define QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS(a) \ diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initi= alize.c index 8a70cf848483..2b174d13faf2 100644 --- a/OvmfPkg/QemuVideoDxe/Initialize.c +++ b/OvmfPkg/QemuVideoDxe/Initialize.c @@ -203,43 +203,43 @@ QemuVideoCirrusModeSetup ( /// Table of supported video modes /// STATIC QEMU_VIDEO_BOCHS_MODES QemuVideoBochsModes[] =3D { - { 640, 480, 32 }, - { 800, 480, 32 }, - { 800, 600, 32 }, - { 832, 624, 32 }, - { 960, 640, 32 }, - { 1024, 600, 32 }, - { 1024, 768, 32 }, - { 1152, 864, 32 }, - { 1152, 870, 32 }, - { 1280, 720, 32 }, - { 1280, 760, 32 }, - { 1280, 768, 32 }, - { 1280, 800, 32 }, - { 1280, 960, 32 }, - { 1280, 1024, 32 }, - { 1360, 768, 32 }, - { 1366, 768, 32 }, - { 1400, 1050, 32 }, - { 1440, 900, 32 }, - { 1600, 900, 32 }, - { 1600, 1200, 32 }, - { 1680, 1050, 32 }, - { 1920, 1080, 32 }, - { 1920, 1200, 32 }, - { 1920, 1440, 32 }, - { 2000, 2000, 32 }, - { 2048, 1536, 32 }, - { 2048, 2048, 32 }, - { 2560, 1440, 32 }, - { 2560, 1600, 32 }, - { 2560, 2048, 32 }, - { 2800, 2100, 32 }, - { 3200, 2400, 32 }, - { 3840, 2160, 32 }, - { 4096, 2160, 32 }, - { 7680, 4320, 32 }, - { 8192, 4320, 32 } + { 640, 480 }, + { 800, 480 }, + { 800, 600 }, + { 832, 624 }, + { 960, 640 }, + { 1024, 600 }, + { 1024, 768 }, + { 1152, 864 }, + { 1152, 870 }, + { 1280, 720 }, + { 1280, 760 }, + { 1280, 768 }, + { 1280, 800 }, + { 1280, 960 }, + { 1280, 1024 }, + { 1360, 768 }, + { 1366, 768 }, + { 1400, 1050 }, + { 1440, 900 }, + { 1600, 900 }, + { 1600, 1200 }, + { 1680, 1050 }, + { 1920, 1080 }, + { 1920, 1200 }, + { 1920, 1440 }, + { 2000, 2000 }, + { 2048, 1536 }, + { 2048, 2048 }, + { 2560, 1440 }, + { 2560, 1600 }, + { 2560, 2048 }, + { 2800, 2100 }, + { 3200, 2400 }, + { 3840, 2160 }, + { 4096, 2160 }, + { 7680, 4320 }, + { 8192, 4320 } }; =20 #define QEMU_VIDEO_BOCHS_MODE_COUNT \ @@ -348,14 +348,12 @@ QemuVideoBochsModeSetup ( for (Index =3D 0; Index < QEMU_VIDEO_BOCHS_MODE_COUNT; Index++) { UINTN RequiredFbSize; =20 - ASSERT (VideoMode->ColorDepth % 8 =3D=3D 0); - RequiredFbSize =3D (UINTN)VideoMode->Width * VideoMode->Height * - (VideoMode->ColorDepth / 8); + RequiredFbSize =3D (UINTN)VideoMode->Width * VideoMode->Height * 4; if (RequiredFbSize <=3D AvailableFbSize) { ModeData->InternalModeIndex =3D Index; ModeData->HorizontalResolution =3D VideoMode->Width; ModeData->VerticalResolution =3D VideoMode->Height; - ModeData->ColorDepth =3D VideoMode->ColorDepth; + ModeData->ColorDepth =3D 32; DEBUG (( DEBUG_INFO, "Adding Mode %d as Bochs Internal Mode %d: %dx%d, %d-bit\n", --=20 2.33.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84997): https://edk2.groups.io/g/devel/message/84997 Mute This Topic: https://groups.io/mt/87767749/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-