audk/OvmfPkg/PlatformDxe
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
..
Platform.c OvmfPkg: add PcdVideoResolutionSource 2022-01-29 17:04:21 +00:00
Platform.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Platform.inf OvmfPkg: add PcdVideoResolutionSource 2022-01-29 17:04:21 +00:00
Platform.uni OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
PlatformConfig.c OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformConfig.h OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformForms.vfr OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00