From: GuoMinJ <newexplor...@gmail.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove the PcdConOutGopSupport, it is unnecessary any more.

Cc: Zhichao Gao <zhichao....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Signed-off-by: Guomin Jiang <guomin.ji...@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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#58860): https://edk2.groups.io/g/devel/message/58860
Mute This Topic: https://groups.io/mt/74068793/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to