]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/QemuVideoDxe: parse edid blob, detect display resolution
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 17 Jan 2022 09:58:17 +0000 (10:58 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 29 Jan 2022 17:04:21 +0000 (17:04 +0000)
commit49a2d8cbf5191efd5c2709acd1a1e64f0d9599de
treeaf663fd0537dd257b588779478f1a3edf16682cc
parent55c05427b90230f15f4807a4daa2876e5e2f4998
OvmfPkg/QemuVideoDxe: parse edid blob, detect display resolution

Check whenever an EDID blob is present.  In case it is get the display
resolution from it.  Unless PcdVideoResolutionSource indicates the
display resolution has been set already, update
PcdVideoHorizontalResolution and PcdVideoVerticalResolution accordingly.
Also add the resolution to the mode list.

This will make OVMF boot up with the display resolution configured by
QEMU, which is 1280x800 by default.  The resolution can be set using the
xres and yres properties.  Here is an example for FullHD:

qemu-system-x86_64 -device VGA,xres=1920,yres=1080

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3778
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1749250
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/QemuVideoDxe/Initialize.c
OvmfPkg/QemuVideoDxe/Qemu.h
OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf