render / rpms / edk2

Forked from rpms/edk2 3 months ago
Clone

Blame SOURCES/edk2-OvmfPkg-QemuVideoDxe-unbreak-secondary-vga-and-bochs.patch

6009e6
From 78cfb461bedb0e0491b267528b2ebd30adc1d87c Mon Sep 17 00:00:00 2001
6009e6
From: Laszlo Ersek <lersek@redhat.com>
6009e6
Date: Fri, 27 Mar 2020 07:01:18 +0100
6009e6
Subject: [PATCH] OvmfPkg/QemuVideoDxe: unbreak "secondary-vga" and
6009e6
 "bochs-display" support
6009e6
MIME-Version: 1.0
6009e6
Content-Type: text/plain; charset=UTF-8
6009e6
Content-Transfer-Encoding: 8bit
6009e6
6009e6
Message-id: <20200226173820.16398-2-lersek@redhat.com>
6009e6
Patchwork-id: 94054
6009e6
O-Subject: [RHEL-8.2.0 edk2 PATCH 1/1] OvmfPkg/QemuVideoDxe: unbreak "secondary-vga" and "bochs-display" support
6009e6
Bugzilla: 1806359
6009e6
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
6009e6
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
6009e6
6009e6
In edk2 commit 333f32ec23dd, QemuVideoDxe gained support for QEMU's
6009e6
"secondary-vga" device model (originally introduced in QEMU commit
6009e6
63e3e24db2e9).
6009e6
6009e6
In QEMU commit 765c94290863, the "bochs-display" device was introduced,
6009e6
which would work with QemuVideoDxe out of the box, reusing the
6009e6
"secondary-vga" logic.
6009e6
6009e6
Support for both models has been broken since edk2 commit 662bd0da7fd7.
6009e6
Said patch ended up requiring VGA IO Ports -- i.e., at least one of
6009e6
EFI_PCI_IO_ATTRIBUTE_VGA_IO and EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 -- even if
6009e6
the device wasn't actually VGA compatible.
6009e6
6009e6
Restrict the IO Ports requirement to VGA compatible devices.
6009e6
6009e6
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
6009e6
Cc: Gerd Hoffmann <kraxel@redhat.com>
6009e6
Cc: Jordan Justen <jordan.l.justen@intel.com>
6009e6
Cc: Marc W Chen <marc.w.chen@intel.com>
6009e6
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
6009e6
Fixes: 662bd0da7fd77e4d2cf9ef4a78015af5cad7d9db
6009e6
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2555
6009e6
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
6009e6
Message-Id: <20200224171741.7494-1-lersek@redhat.com>
6009e6
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
6009e6
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
6009e6
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
6009e6
(cherry picked from commit edfe16a6d9f8c6830d7ad93ee7616225fe4e9c13)
6009e6
---
6009e6
 OvmfPkg/QemuVideoDxe/Driver.c | 2 +-
6009e6
 1 file changed, 1 insertion(+), 1 deletion(-)
6009e6
6009e6
diff --git a/OvmfPkg/QemuVideoDxe/Driver.c b/OvmfPkg/QemuVideoDxe/Driver.c
6009e6
index 522110e..902dd1b 100644
6009e6
--- a/OvmfPkg/QemuVideoDxe/Driver.c
6009e6
+++ b/OvmfPkg/QemuVideoDxe/Driver.c
6009e6
@@ -292,7 +292,7 @@ QemuVideoControllerDriverStart (
6009e6
   }
6009e6
 
6009e6
   SupportedVgaIo &= (UINT64)(EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16);
6009e6
-  if (SupportedVgaIo == 0) {
6009e6
+  if (SupportedVgaIo == 0 && IS_PCI_VGA (&Pci)) {
6009e6
     Status = EFI_UNSUPPORTED;
6009e6
     goto ClosePciIo;
6009e6
   }
6009e6
-- 
6009e6
1.8.3.1
6009e6