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>
/** @file\r
Graphics Output Protocol functions for the QEMU video controller.\r
\r
/** @file\r
Graphics Output Protocol functions for the QEMU video controller.\r
\r
- Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
- QEMU_VIDEO_PRIVATE_DATA *Private;\r
- QEMU_VIDEO_MODE_DATA *ModeData;\r
- RETURN_STATUS Status;\r
+ QEMU_VIDEO_PRIVATE_DATA *Private;\r
+ QEMU_VIDEO_MODE_DATA *ModeData;\r
+ RETURN_STATUS Status;\r
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black;\r
\r
Private = QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);\r
\r
\r
Private = QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);\r
\r
}\r
ASSERT (Status == RETURN_SUCCESS);\r
\r
}\r
ASSERT (Status == RETURN_SUCCESS);\r
\r
+ //\r
+ // Per UEFI Spec, need to clear the visible portions of the output display to black.\r
+ //\r
+ ZeroMem (&Black, sizeof (Black));\r
+ Status = FrameBufferBlt (\r
+ Private->FrameBufferBltConfigure,\r
+ &Black,\r
+ EfiBltVideoFill,\r
+ 0, 0,\r
+ 0, 0,\r
+ This->Mode->Info->HorizontalResolution, This->Mode->Info->VerticalResolution,\r
+ 0\r
+ );\r
+ ASSERT_RETURN_ERROR (Status);\r
+\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r