summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2025-01-10 08:40:59 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-01-20 11:43:58 +0000
commit1d2558af76b0af3807c9d0f48998d40bec13e9fc (patch)
treea9059eceacfbb35adb595ab6e60070abb5975889
parent2f5db44fdd23af2a0f0a8d0122fd7fea410c58c4 (diff)
downloadedk2-1d2558af76b0af3807c9d0f48998d40bec13e9fc.tar.gz
OvmfPkg/QemuVideoDxe: 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>
-rw-r--r--OvmfPkg/QemuVideoDxe/Initialize.c4
-rw-r--r--OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf2
2 files changed, 6 insertions, 0 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initialize.c
index 2d1f50637f..ef5e7c82ce 100644
--- a/OvmfPkg/QemuVideoDxe/Initialize.c
+++ b/OvmfPkg/QemuVideoDxe/Initialize.c
@@ -367,8 +367,12 @@ QemuVideoBochsEdid (
if (PcdGet8 (PcdVideoResolutionSource) == 0) {
Status = PcdSet32S (PcdVideoHorizontalResolution, *XRes);
ASSERT_RETURN_ERROR (Status);
+ Status = PcdSet32S (PcdSetupVideoHorizontalResolution, *XRes);
+ ASSERT_RETURN_ERROR (Status);
Status = PcdSet32S (PcdVideoVerticalResolution, *YRes);
ASSERT_RETURN_ERROR (Status);
+ Status = PcdSet32S (PcdSetupVideoVerticalResolution, *YRes);
+ ASSERT_RETURN_ERROR (Status);
Status = PcdSet8S (PcdVideoResolutionSource, 2);
ASSERT_RETURN_ERROR (Status);
}
diff --git a/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf b/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
index 25afe0b79f..ad911c7e81 100644
--- a/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
+++ b/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
@@ -65,3 +65,5 @@
gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution