From: "Guomin Jiang" <guomin.jiang@intel.com>
To: devel@edk2.groups.io
Cc: GuoMinJ <newexplorerj@gmail.com>,
Zhichao Gao <zhichao.gao@intel.com>, Ray Ni <ray.ni@intel.com>
Subject: [PATCH 14/18] MdeModulePkg/ConSplitterDxe: Remove All UGA Support.
Date: Fri, 8 May 2020 16:38:20 +0800 [thread overview]
Message-ID: <20200508083824.1785-15-guomin.jiang@intel.com> (raw)
In-Reply-To: <20200508083824.1785-1-guomin.jiang@intel.com>
From: GuoMinJ <newexplorerj@gmail.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368
Remove the PcdConOutGopSupport, it is unnecessary any more.
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
---
.../Console/ConSplitterDxe/ConSplitter.c | 84 ++++++++-----------
.../Console/ConSplitterDxe/ConSplitterDxe.inf | 9 +-
.../Console/ConSplitterDxe/ConSplitterDxe.uni | 9 +-
3 files changed, 42 insertions(+), 60 deletions(-)
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index 18c25956d0d9..350b85d73028 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -461,11 +461,6 @@ ConSplitterDriverEntry(
);
ASSERT_EFI_ERROR (Status);
- //
- // Graphics Output protocol must be supported.
- //
- ASSERT (FeaturePcdGet (PcdConOutGopSupport));
-
//
// The driver creates virtual handles for ConIn, ConOut, StdErr.
// The virtual handles will always exist even if no console exist in the
@@ -720,9 +715,7 @@ ConSplitterTextOutConstructor (
//
// Copy protocols template
//
- if (FeaturePcdGet (PcdConOutGopSupport)) {
- CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
- }
+ CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
//
// Initilize console output splitter's private data.
@@ -764,47 +757,44 @@ ConSplitterTextOutConstructor (
ConOutPrivate->TextOutQueryData[0].Rows = 25;
TextOutSetMode (ConOutPrivate, 0);
+ //
+ // Setup resource for mode information in Graphics Output Protocol interface
+ //
+ if ((ConOutPrivate->GraphicsOutput.Mode = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE))) == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ if ((ConOutPrivate->GraphicsOutput.Mode->Info = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ //
+ // Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel
+ // DevNull will be updated to user-defined mode after driver has started.
+ //
+ if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+ Info = &ConOutPrivate->GraphicsOutputModeBuffer[0];
+ Info->Version = 0;
+ Info->HorizontalResolution = 800;
+ Info->VerticalResolution = 600;
+ Info->PixelFormat = PixelBltOnly;
+ Info->PixelsPerScanLine = 800;
+ CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+ ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- if (FeaturePcdGet (PcdConOutGopSupport)) {
- //
- // Setup resource for mode information in Graphics Output Protocol interface
- //
- if ((ConOutPrivate->GraphicsOutput.Mode = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE))) == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
- if ((ConOutPrivate->GraphicsOutput.Mode->Info = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
- //
- // Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel
- // DevNull will be updated to user-defined mode after driver has started.
- //
- if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
- Info = &ConOutPrivate->GraphicsOutputModeBuffer[0];
- Info->Version = 0;
- Info->HorizontalResolution = 800;
- Info->VerticalResolution = 600;
- Info->PixelFormat = PixelBltOnly;
- Info->PixelsPerScanLine = 800;
- CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
- ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
-
- //
- // Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode()
- // GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize
- //
- ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL;
- ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0;
+ //
+ // Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode()
+ // GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize
+ //
+ ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL;
+ ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0;
- ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1;
- //
- // Initial current mode to unknown state, and then set to mode 0
- //
- ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff;
- ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0);
- }
+ ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1;
+ //
+ // Initial current mode to unknown state, and then set to mode 0
+ //
+ ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff;
+ ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0);
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
index 156757aee653..baa4051fd104 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
@@ -3,11 +3,9 @@
#
# This driver acts as a virtual console, takes over the console I/O control from selected
# standard console devices, and transmits console I/O to related console device drivers.
-# Consplitter could install Graphics Output protocol in system
-# table according PCD settings(PcdConOutGopSupport). It always
-# consumes Graphics Output protocol which is produced by display device
+# It always consumes Graphics Output protocol which is produced by display device
#
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -90,9 +88,6 @@ [Protocols]
## SOMETIMES_CONSUMES
gEfiGraphicsOutputProtocolGuid
-[FeaturePcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport ## CONSUMES
-
[Pcd]
## SOMETIMES_PRODUCES
## SOMETIMES_CONSUMES
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni
index 903c505e303c..73b0010a57dd 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni
@@ -3,11 +3,9 @@
//
// This driver acts as a virtual console, takes over the console I/O control from selected
// standard console devices, and transmits console I/O to related console device drivers.
-// Consplitter could install Graphics Output protocol in system
-// table according PCD settings(PcdConOutGopSupport). It always
-// consumes Graphics Output protocol which is produced by display device
+// It always consumes Graphics Output protocol which is produced by display device
//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
@@ -16,5 +14,4 @@
#string STR_MODULE_ABSTRACT #language en-US "Provides multi console support"
-#string STR_MODULE_DESCRIPTION #language en-US "This driver acts as a virtual console, takes over the console I/O control from selected standard console devices, and transmits console I/O to related console device drivers. Consplitter could install Graphics Output protocol in system table according PCD settings(PcdConOutGopSupport). It always consumes Graphics Output protocol, which is produced by display device."
-
+#string STR_MODULE_DESCRIPTION #language en-US "This driver acts as a virtual console, takes over the console I/O control from selected standard console devices, and transmits console I/O to related console device drivers. It always consumes Graphics Output protocol, which is produced by display device."
--
2.25.1.windows.1
next prev parent reply other threads:[~2020-05-08 8:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 8:38 [PATCH 00/18] Remove All UGA Support Guomin Jiang
2020-05-08 8:38 ` [PATCH 01/18] BaseTools: " Guomin Jiang
2020-05-09 1:47 ` [edk2-devel] " Ni, Ray
2020-05-08 8:38 ` [PATCH 02/18] UefiPayloadPkg: " Guomin Jiang
2020-05-08 14:57 ` Ma, Maurice
2020-05-08 8:38 ` [PATCH 03/18] ShellPkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 04/18] MdeModulePkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 05/18] MdeModulePkg/ConSplitterDxe: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 06/18] MdeModulePkg/GraphicsConsoleDxe: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 07/18] EmulatorPkg: " Guomin Jiang
2020-05-09 3:02 ` Ni, Ray
2020-05-08 8:38 ` [PATCH 08/18] OvmfPkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 09/18] ArmPkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 10/18] ArmVirtPkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 11/18] MdePkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 12/18] MdeModulePkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 13/18] MdeModulePkg/ConSplitterDxe: " Guomin Jiang
2020-05-09 3:03 ` Ni, Ray
2020-05-08 8:38 ` Guomin Jiang [this message]
2020-05-08 8:38 ` [PATCH 15/18] OvmfPkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 16/18] UefiPayloadPkg: " Guomin Jiang
2020-05-08 14:58 ` Ma, Maurice
2020-05-08 8:38 ` [PATCH 17/18] ArmVirtPkg: " Guomin Jiang
2020-05-08 8:38 ` [PATCH 18/18] MdeModulePkg: " Guomin Jiang
2020-05-08 10:09 ` [edk2-devel] [PATCH 00/18] " Laszlo Ersek
2020-05-08 11:00 ` Ard Biesheuvel
2020-05-08 13:04 ` Guomin Jiang
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=20200508083824.1785-15-guomin.jiang@intel.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