/** @file\r
Graphics Output Protocol functions for the QEMU video controller.\r
\r
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2016, 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
\r
#include "Qemu.h"\r
-#include <IndustryStandard/Acpi.h>\r
-#include <Library/BltLib.h>\r
\r
STATIC\r
VOID\r
{\r
QEMU_VIDEO_PRIVATE_DATA *Private;\r
QEMU_VIDEO_MODE_DATA *ModeData;\r
-// UINTN Count;\r
+ RETURN_STATUS Status;\r
\r
Private = QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);\r
\r
\r
QemuVideoCompleteModeData (Private, This->Mode);\r
\r
- BltLibConfigure (\r
- (VOID*)(UINTN) This->Mode->FrameBufferBase,\r
- This->Mode->Info\r
- );\r
+ //\r
+ // Allocate when using first time.\r
+ //\r
+ if (Private->FrameBufferBltConfigure == NULL) {\r
+ Status = FrameBufferBltConfigure (\r
+ (VOID*) (UINTN) This->Mode->FrameBufferBase,\r
+ This->Mode->Info,\r
+ Private->FrameBufferBltConfigure,\r
+ &Private->FrameBufferBltConfigureSize\r
+ );\r
+ ASSERT (Status == RETURN_BUFFER_TOO_SMALL);\r
+ Private->FrameBufferBltConfigure =\r
+ AllocatePool (Private->FrameBufferBltConfigureSize);\r
+ }\r
+\r
+ //\r
+ // Create the configuration for FrameBufferBltLib\r
+ //\r
+ ASSERT (Private->FrameBufferBltConfigure != NULL);\r
+ Status = FrameBufferBltConfigure (\r
+ (VOID*) (UINTN) This->Mode->FrameBufferBase,\r
+ This->Mode->Info,\r
+ Private->FrameBufferBltConfigure,\r
+ &Private->FrameBufferBltConfigureSize\r
+ );\r
+ ASSERT (Status == RETURN_SUCCESS);\r
\r
return EFI_SUCCESS;\r
}\r
{\r
EFI_STATUS Status;\r
EFI_TPL OriginalTPL;\r
+ QEMU_VIDEO_PRIVATE_DATA *Private;\r
\r
+ Private = QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);\r
//\r
// We have to raise to TPL Notify, so we make an atomic write the frame buffer.\r
// We would not want a timer based event (Cursor, ...) to come in while we are\r
case EfiBltBufferToVideo:\r
case EfiBltVideoFill:\r
case EfiBltVideoToVideo:\r
- Status = BltLibGopBlt (\r
+ Status = FrameBufferBlt (\r
+ Private->FrameBufferBltConfigure,\r
BltBuffer,\r
BltOperation,\r
SourceX,\r
Private->GraphicsOutput.Mode->MaxMode = (UINT32) Private->MaxMode;\r
Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;\r
Private->LineBuffer = NULL;\r
+ Private->FrameBufferBltConfigure = NULL;\r
+ Private->FrameBufferBltConfigureSize = 0;\r
\r
//\r
// Initialize the hardware\r
FreePool (Private->LineBuffer);\r
}\r
\r
+ if (Private->FrameBufferBltConfigure != NULL) {\r
+ FreePool (Private->FrameBufferBltConfigure);\r
+ }\r
+\r
if (Private->GraphicsOutput.Mode != NULL) {\r
if (Private->GraphicsOutput.Mode->Info != NULL) {\r
gBS->FreePool (Private->GraphicsOutput.Mode->Info);\r
/** @file\r
QEMU Video Controller Driver\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/DevicePathLib.h>\r
#include <Library/TimerLib.h>\r
+#include <Library/FrameBufferBltLib.h>\r
\r
#include <IndustryStandard/Pci.h>\r
+#include <IndustryStandard/Acpi.h>\r
\r
//\r
// QEMU Video PCI Configuration Header values\r
\r
UINT8 *LineBuffer;\r
QEMU_VIDEO_VARIANT Variant;\r
+ FRAME_BUFFER_CONFIGURE *FrameBufferBltConfigure;\r
+ UINTN FrameBufferBltConfigureSize;\r
} QEMU_VIDEO_PRIVATE_DATA;\r
\r
///\r