diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2025-01-10 08:42:20 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-01-20 11:43:58 +0000 |
commit | b4536e36c404f89b5918f203db00810f1b1cd934 (patch) | |
tree | e4ecb558e5843b075233eae3207382e4d5a219ec /OvmfPkg | |
parent | 1d2558af76b0af3807c9d0f48998d40bec13e9fc (diff) | |
download | edk2-b4536e36c404f89b5918f203db00810f1b1cd934.tar.gz |
OvmfPkg/VirtioGpuDxe: 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/VirtioGpuDxe/Gop.c | 4 | ||||
-rw-r--r-- | OvmfPkg/VirtioGpuDxe/VirtioGpu.inf | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c index d767114bbb..4282b8d58d 100644 --- a/OvmfPkg/VirtioGpuDxe/Gop.c +++ b/OvmfPkg/VirtioGpuDxe/Gop.c @@ -273,8 +273,12 @@ GopInitialize ( 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/VirtioGpuDxe/VirtioGpu.inf b/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf index d88c87e129..7e929fd6a4 100644 --- a/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf +++ b/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf @@ -49,3 +49,5 @@ gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
|