audk/OvmfPkg/AmdSev
Gerd Hoffmann 929804b172 OvmfPkg: add PcdVideoResolutionSource
It's a UINT8 (enum) PCD telling where the PcdVideoHorizontalResolution
and PcdVideoVerticalResolution values are coming from.  It can be:

 0 (unset aka default from dsc file), or
 1 (from PlatformConfig), or
 2 (set by Video Driver).

It will be used by video drivers to avoid overriding PlatformConfig
values, or override each others values in case multiple display devices
are present.

The underlying problem this tries to solve is that the GOP protocol has
no way to indicate the preferred video mode.  On physical hardware this
isn't much of a problem because using the highest resolution available
works just fine as that is typically the native display resolution

But in a virtual machine you don't want come up with a huge 4k window by
default just because the virtual vga is able to handle that.  Cutting
down the video mode list isn't a great solution either as that would
also remove the modes from the platform configuration so the user
wouldn't be able to pick a resolution higher than the default any more.

So with patch drivers can use use PcdVideoHorizontalResolution and
PcdVideoVerticalResolution to indicate what the preferred display
resolution is, without overwriting the user preferences from
PlatformConfig if present.

A possible alternative approach would be to extend the GOP protocol, but
I'm not sure this is a good plan given this is mostly a problem for
virtual machines and using PCDs allows to keep this local to OvmfPkg.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
2022-01-29 17:04:21 +00:00
..
BlobVerifierLibSevHashes OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Grub OvmfPkg/AmdSev: add Grub Firmware Volume Package 2020-12-14 19:56:18 +00:00
SecretDxe OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SecretPei OvmfPkg/AmdSev/SecretPei: Mark SEV launch secret area as reserved 2022-01-04 08:06:53 +00:00
AmdSevX64.dsc OvmfPkg: add PcdVideoResolutionSource 2022-01-29 17:04:21 +00:00
AmdSevX64.fdf OvmfPkg: move tcg configuration to dsc and fdf include files 2021-12-15 16:16:05 +00:00