Skip to content

Commit

Permalink
OvmfPkg/QemuVideoDxe: remove useless QEMU_VIDEO_PRIVATE_DATA.LineBuffer
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
  • Loading branch information
lersek committed Oct 16, 2016
1 parent 37b9c0a commit 88ba362
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
16 changes: 0 additions & 16 deletions OvmfPkg/QemuVideoDxe/Gop.c
Expand Up @@ -167,15 +167,6 @@ Routine Description:

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:
Expand All @@ -187,8 +178,6 @@ Routine Description:
break;
default:
ASSERT (FALSE);
gBS->FreePool (Private->LineBuffer);
Private->LineBuffer = NULL;
return EFI_DEVICE_ERROR;
}

Expand Down Expand Up @@ -349,7 +338,6 @@ QemuVideoGraphicsOutputConstructor (
}
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;

Expand Down Expand Up @@ -395,10 +383,6 @@ Routine Description:
--*/
{
if (Private->LineBuffer != NULL) {
FreePool (Private->LineBuffer);
}

if (Private->FrameBufferBltConfigure != NULL) {
FreePool (Private->FrameBufferBltConfigure);
}
Expand Down
1 change: 0 additions & 1 deletion OvmfPkg/QemuVideoDxe/Qemu.h
Expand Up @@ -116,7 +116,6 @@ typedef struct {
UINTN MaxMode;
QEMU_VIDEO_MODE_DATA *ModeData;

UINT8 *LineBuffer;
QEMU_VIDEO_VARIANT Variant;
FRAME_BUFFER_CONFIGURE *FrameBufferBltConfigure;
UINTN FrameBufferBltConfigureSize;
Expand Down

0 comments on commit 88ba362

Please sign in to comment.