summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2025-01-10 08:45:16 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-01-20 11:43:58 +0000
commitfde034447f61bd0ccde5c4683688ad3d50bcd567 (patch)
treed3711816bcf47c85f1ecddbea30f220520438704 /OvmfPkg
parentb4536e36c404f89b5918f203db00810f1b1cd934 (diff)
downloadedk2-fde034447f61bd0ccde5c4683688ad3d50bcd567.tar.gz
OvmfPkg/PlatformDxe: set SetupVideoResolution too
Set both PcdVideo*Resolution and PcdSetupVideo*Resolution PCDs. This avoids pointless video mode changes when entering and leaving the firmware setup application. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/PlatformDxe/Platform.c12
-rw-r--r--OvmfPkg/PlatformDxe/Platform.inf2
2 files changed, 14 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
index c32439683d..2acb547db9 100644
--- a/OvmfPkg/PlatformDxe/Platform.c
+++ b/OvmfPkg/PlatformDxe/Platform.c
@@ -852,11 +852,23 @@ ExecutePlatformConfig (
ASSERT_RETURN_ERROR (PcdStatus);
PcdStatus = PcdSet32S (
+ PcdSetupVideoHorizontalResolution,
+ PlatformConfig.HorizontalResolution
+ );
+ ASSERT_RETURN_ERROR (PcdStatus);
+
+ PcdStatus = PcdSet32S (
PcdVideoVerticalResolution,
PlatformConfig.VerticalResolution
);
ASSERT_RETURN_ERROR (PcdStatus);
+ PcdStatus = PcdSet32S (
+ PcdSetupVideoVerticalResolution,
+ PlatformConfig.VerticalResolution
+ );
+ ASSERT_RETURN_ERROR (PcdStatus);
+
PcdStatus = PcdSet8S (PcdVideoResolutionSource, 1);
ASSERT_RETURN_ERROR (PcdStatus);
}
diff --git a/OvmfPkg/PlatformDxe/Platform.inf b/OvmfPkg/PlatformDxe/Platform.inf
index d2f75d78b6..dd22c4f3a4 100644
--- a/OvmfPkg/PlatformDxe/Platform.inf
+++ b/OvmfPkg/PlatformDxe/Platform.inf
@@ -47,6 +47,8 @@
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource
[Protocols]