Skip to content

Commit

Permalink
OvmfPkg/QemuVideoDxe: unbreak "secondary-vga" and "bochs-display" sup…
Browse files Browse the repository at this point in the history
…port

In edk2 commit 333f32e, QemuVideoDxe gained support for QEMU's
"secondary-vga" device model (originally introduced in QEMU commit
63e3e24).

In QEMU commit 765c942, 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 662bd0d.
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: 662bd0d
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>
  • Loading branch information
lersek authored and mergify[bot] committed Feb 26, 2020
1 parent 1d3215f commit edfe16a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OvmfPkg/QemuVideoDxe/Driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ QemuVideoControllerDriverStart (
}

SupportedVgaIo &= (UINT64)(EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_IO_16);
if (SupportedVgaIo == 0) {
if (SupportedVgaIo == 0 && IS_PCI_VGA (&Pci)) {
Status = EFI_UNSUPPORTED;
goto ClosePciIo;
}
Expand Down

0 comments on commit edfe16a

Please sign in to comment.