From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@ml01.01.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Subject: [PATCH 4/5] OvmfPkg/QemuVideoDxe: remove useless QEMU_VIDEO_PRIVATE_DATA.LineBuffer
Date: Wed, 12 Oct 2016 12:09:04 +0200 [thread overview]
Message-ID: <20161012100905.6296-5-lersek@redhat.com> (raw)
In-Reply-To: <20161012100905.6296-1-lersek@redhat.com>
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(-)
diff --git a/OvmfPkg/QemuVideoDxe/Qemu.h b/OvmfPkg/QemuVideoDxe/Qemu.h
index f3358d8a7ce0..2ce37defc5b8 100644
--- a/OvmfPkg/QemuVideoDxe/Qemu.h
+++ b/OvmfPkg/QemuVideoDxe/Qemu.h
@@ -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;
diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c
index 532f20e6446c..5485ba3c2871 100644
--- a/OvmfPkg/QemuVideoDxe/Gop.c
+++ b/OvmfPkg/QemuVideoDxe/Gop.c
@@ -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) {
--
2.9.2
next prev parent reply other threads:[~2016-10-12 10:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 10:09 [PATCH 0/5] OvmfPkg/QemuVideoDxe: cleanups and tweaks Laszlo Ersek
2016-10-12 10:09 ` [PATCH 1/5] OvmfPkg/QemuVideoDxe: drop useless QEMU_VIDEO_MODE_DATA.RefreshRate Laszlo Ersek
2016-10-12 10:09 ` [PATCH 2/5] OvmfPkg/QemuVideoDxe: drop QEMU_VIDEO_CIRRUS_MODES.RefreshRate Laszlo Ersek
2016-10-12 10:09 ` [PATCH 3/5] OvmfPkg/QemuVideoDxe: remove useless QEMU_VIDEO_PRIVATE_DATA.CurrentMode Laszlo Ersek
2016-10-12 10:09 ` Laszlo Ersek [this message]
2016-10-12 10:09 ` [PATCH 5/5] OvmfPkg/QemuVideoDxe: upgrade VERBOSE debug messages to INFO Laszlo Ersek
2016-10-15 20:25 ` [PATCH 0/5] OvmfPkg/QemuVideoDxe: cleanups and tweaks Jordan Justen
2016-10-16 19:46 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161012100905.6296-5-lersek@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox