diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2018-03-13 18:05:16 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2018-03-14 11:20:29 +0800 |
commit | 81feb6d3059d6dfdfecd47f6b1f0c7d2b9f66e65 (patch) | |
tree | 57c6c4e7b5631c089230532d945f88579f355261 /OvmfPkg/QemuVideoDxe | |
parent | 9384e1c011a7d5ad1eb9c6d09c0014f42fab574d (diff) | |
download | edk2-81feb6d3059d6dfdfecd47f6b1f0c7d2b9f66e65.zip edk2-81feb6d3059d6dfdfecd47f6b1f0c7d2b9f66e65.tar.gz edk2-81feb6d3059d6dfdfecd47f6b1f0c7d2b9f66e65.tar.bz2 |
OvmfPkg/Gop: clear the screen to black in SetMode()
Today's implementation forgot to clear the screen to black in
SetMode(). It causes SCT SetMode() test fails.
The patch adds the clear screen operation in SetMode() to fix
the SCT failure.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'OvmfPkg/QemuVideoDxe')
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Gop.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index 512fd27..b479d24 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -1,7 +1,7 @@ /** @file
Graphics Output Protocol functions for the QEMU video controller.
- Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -196,9 +196,10 @@ Routine Description: --*/
{
- QEMU_VIDEO_PRIVATE_DATA *Private;
- QEMU_VIDEO_MODE_DATA *ModeData;
- RETURN_STATUS Status;
+ QEMU_VIDEO_PRIVATE_DATA *Private;
+ QEMU_VIDEO_MODE_DATA *ModeData;
+ RETURN_STATUS Status;
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black;
Private = QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);
@@ -271,6 +272,21 @@ Routine Description: }
ASSERT (Status == RETURN_SUCCESS);
+ //
+ // Per UEFI Spec, need to clear the visible portions of the output display to black.
+ //
+ ZeroMem (&Black, sizeof (Black));
+ Status = FrameBufferBlt (
+ Private->FrameBufferBltConfigure,
+ &Black,
+ EfiBltVideoFill,
+ 0, 0,
+ 0, 0,
+ This->Mode->Info->HorizontalResolution, This->Mode->Info->VerticalResolution,
+ 0
+ );
+ ASSERT_RETURN_ERROR (Status);
+
return EFI_SUCCESS;
}
|