]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/QemuVideoDxe: unbreak "secondary-vga" and "bochs-display" support
authorLaszlo Ersek <lersek@redhat.com>
Mon, 24 Feb 2020 16:35:39 +0000 (17:35 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 26 Feb 2020 16:44:41 +0000 (16:44 +0000)
In edk2 commit 333f32ec23dd, QemuVideoDxe gained support for QEMU's
"secondary-vga" device model (originally introduced in QEMU commit
63e3e24db2e9).

In QEMU commit 765c94290863, the "bochs-display" device was introduced,
which would work with QemuVideoDxe out of the box, reusing the
"secondary-vga" logic.

Support for both models has been broken since edk2 commit 662bd0da7fd7.
Said patch ended up requiring VGA IO Ports -- i.e., at least one of
EFI_PCI_IO_ATTRIBUTE_VGA_IO and EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 -- even if
the device wasn't actually VGA compatible.

Restrict the IO Ports requirement to VGA compatible devices.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marc W Chen <marc.w.chen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Fixes: 662bd0da7fd77e4d2cf9ef4a78015af5cad7d9db
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2555
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200224171741.7494-1-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
OvmfPkg/QemuVideoDxe/Driver.c

index 6a4a860b3c25f3a050aed61eb7f968025bb9a2da..37bbbbe843c906422d6e4b1c0699768eb18eb1fc 100644 (file)
@@ -292,7 +292,7 @@ QemuVideoControllerDriverStart (
   }\r
 \r
   SupportedVgaIo &= (UINT64)(EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16);\r
-  if (SupportedVgaIo == 0) {\r
+  if (SupportedVgaIo == 0 && IS_PCI_VGA (&Pci)) {\r
     Status = EFI_UNSUPPORTED;\r
     goto ClosePciIo;\r
   }\r