@@ -114,11 +114,10 @@ typedef struct {
// EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE.MaxMode field.
//
UINTN MaxMode;
QEMU_VIDEO_MODE_DATA *ModeData;
- UINT8 *LineBuffer;
QEMU_VIDEO_VARIANT Variant;
FRAME_BUFFER_CONFIGURE *FrameBufferBltConfigure;
UINTN FrameBufferBltConfigureSize;
} QEMU_VIDEO_PRIVATE_DATA;
@@ -165,19 +165,10 @@ Routine Description:
return EFI_UNSUPPORTED;
}
ModeData = &Private->ModeData[ModeNumber];
- if (Private->LineBuffer) {
- gBS->FreePool (Private->LineBuffer);
- }
-
- Private->LineBuffer = AllocatePool (4 * ModeData->HorizontalResolution);
- if (Private->LineBuffer == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
switch (Private->Variant) {
case QEMU_VIDEO_CIRRUS_5430:
case QEMU_VIDEO_CIRRUS_5446:
InitializeCirrusGraphicsMode (Private, &QemuVideoCirrusModes[ModeData->InternalModeIndex]);
break;
@@ -185,12 +176,10 @@ Routine Description:
case QEMU_VIDEO_BOCHS:
InitializeBochsGraphicsMode (Private, &QemuVideoBochsModes[ModeData->InternalModeIndex]);
break;
default:
ASSERT (FALSE);
- gBS->FreePool (Private->LineBuffer);
- Private->LineBuffer = NULL;
return EFI_DEVICE_ERROR;
}
This->Mode->Mode = ModeNumber;
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
@@ -347,11 +336,10 @@ QemuVideoGraphicsOutputConstructor (
if (EFI_ERROR (Status)) {
goto FreeMode;
}
Private->GraphicsOutput.Mode->MaxMode = (UINT32) Private->MaxMode;
Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
- Private->LineBuffer = NULL;
Private->FrameBufferBltConfigure = NULL;
Private->FrameBufferBltConfigureSize = 0;
//
// Initialize the hardware
@@ -393,14 +381,10 @@ Returns:
None
--*/
{
- if (Private->LineBuffer != NULL) {
- FreePool (Private->LineBuffer);
- }
-
if (Private->FrameBufferBltConfigure != NULL) {
FreePool (Private->FrameBufferBltConfigure);
}
if (Private->GraphicsOutput.Mode != NULL) {
This field is (re)allocated in QemuVideoGraphicsOutputSetMode(), released in QemuVideoGraphicsOutputDestructor(), and used for nothing else. Remove it. Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- OvmfPkg/QemuVideoDxe/Qemu.h | 1 - OvmfPkg/QemuVideoDxe/Gop.c | 16 ---------------- 2 files changed, 17 deletions(-) -- 2.9.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel