public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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 05/18] MdeModulePkg/ConSplitterDxe: Remove All UGA Support
Date: Fri,  8 May 2020 16:38:11 +0800	[thread overview]
Message-ID: <20200508083824.1785-6-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 All UGA Support in ConSplitterDxe component.

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      | 290 ++---------------
 .../Console/ConSplitterDxe/ConSplitter.h      | 135 +-------
 .../Console/ConSplitterDxe/ConSplitterDxe.inf |  14 +-
 .../Console/ConSplitterDxe/ConSplitterDxe.uni |  11 +-
 .../ConSplitterDxe/ConSplitterGraphics.c      | 307 ------------------
 5 files changed, 41 insertions(+), 716 deletions(-)

diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index 9c38271b65f9..3fdeee4b409b 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -107,16 +107,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA  mConIn = {
   FALSE
 };
 
-
-//
-// Uga Draw Protocol Private Data template
-//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate = {
-  ConSplitterUgaDrawGetMode,
-  ConSplitterUgaDrawSetMode,
-  ConSplitterUgaDrawBlt
-};
-
 //
 // Graphics Output Protocol Private Data template
 //
@@ -155,16 +145,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
     FALSE,
   },
 
-  {
-    NULL,
-    NULL,
-    NULL
-  },
-  0,
-  0,
-  0,
-  0,
-
   {
     NULL,
     NULL,
@@ -173,7 +153,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
   },
   (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
   0,
-  0,
 
   0,
   (TEXT_OUT_AND_GOP_DATA *) NULL,
@@ -211,16 +190,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
     FALSE,
   },
 
-  {
-    NULL,
-    NULL,
-    NULL
-  },
-  0,
-  0,
-  0,
-  0,
-
   {
     NULL,
     NULL,
@@ -229,7 +198,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
   },
   (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
   0,
-  0,
 
   0,
   (TEXT_OUT_AND_GOP_DATA *) NULL,
@@ -422,7 +390,7 @@ ToggleStateSyncReInitialization (
   Installs driver module protocols and. Creates virtual device handles for ConIn,
   ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
   Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
-  Installs Graphics Output protocol and/or UGA Draw protocol if needed.
+  Installs Graphics Output protocol.
 
   @param[in] ImageHandle    The firmware allocated handle for the EFI image.
   @param[in] SystemTable    A pointer to the EFI System Table.
@@ -494,10 +462,9 @@ ConSplitterDriverEntry(
   ASSERT_EFI_ERROR (Status);
 
   //
-  // Either Graphics Output protocol or UGA Draw protocol must be supported.
+  // Graphics Output protocol must be supported.
   //
-  ASSERT (FeaturePcdGet (PcdConOutGopSupport) ||
-          FeaturePcdGet (PcdConOutUgaSupport));
+  ASSERT (FeaturePcdGet (PcdConOutGopSupport));
 
   //
   // The driver creates virtual handles for ConIn, ConOut, StdErr.
@@ -753,9 +720,6 @@ ConSplitterTextOutConstructor (
   //
   // Copy protocols template
   //
-  if (FeaturePcdGet (PcdConOutUgaSupport)) {
-    CopyMem (&ConOutPrivate->UgaDraw, &mUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));
-  }
   if (FeaturePcdGet (PcdConOutGopSupport)) {
     CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));
   }
@@ -801,12 +765,6 @@ ConSplitterTextOutConstructor (
   TextOutSetMode (ConOutPrivate, 0);
 
 
-  if (FeaturePcdGet (PcdConOutUgaSupport)) {
-    //
-    // Setup the UgaDraw to 800 x 600 x 32 bits per pixel, 60Hz.
-    //
-    ConSplitterUgaDrawSetMode (&ConOutPrivate->UgaDraw, 800, 600, 32, 60);
-  }
   if (FeaturePcdGet (PcdConOutGopSupport)) {
     //
     // Setup resource for mode information in Graphics Output Protocol interface
@@ -1332,7 +1290,6 @@ ConSplitterConOutDriverBindingStart (
   EFI_STATUS                           Status;
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL      *TextOut;
   EFI_GRAPHICS_OUTPUT_PROTOCOL         *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL                *UgaDraw;
   UINTN                                SizeOfInfo;
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
 
@@ -1353,7 +1310,6 @@ ConSplitterConOutDriverBindingStart (
   }
 
   GraphicsOutput = NULL;
-  UgaDraw        = NULL;
   //
   // Try to Open Graphics Output protocol
   //
@@ -1366,20 +1322,6 @@ ConSplitterConOutDriverBindingStart (
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL
                   );
 
-  if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
-    //
-    // Open UGA DRAW protocol
-    //
-    gBS->OpenProtocol (
-           ControllerHandle,
-           &gEfiUgaDrawProtocolGuid,
-           (VOID **) &UgaDraw,
-           This->DriverBindingHandle,
-           mConOut.VirtualHandle,
-           EFI_OPEN_PROTOCOL_GET_PROTOCOL
-           );
-  }
-
   //
   // When new console device is added, the new mode will be set later,
   // so put current mode back to init state.
@@ -1390,36 +1332,17 @@ ConSplitterConOutDriverBindingStart (
   // If both ConOut and StdErr incorporate the same Text Out device,
   // their MaxMode and QueryData should be the intersection of both.
   //
-  Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);
+  Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput);
   ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
 
-  if (FeaturePcdGet (PcdConOutUgaSupport)) {
-    //
-    // Get the UGA mode data of ConOut from the current mode
-    //
-    if (GraphicsOutput != NULL) {
-      Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);
-      if (EFI_ERROR (Status)) {
-        return Status;
-      }
-      ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
-
-      mConOut.UgaHorizontalResolution = Info->HorizontalResolution;
-      mConOut.UgaVerticalResolution   = Info->VerticalResolution;
-      mConOut.UgaColorDepth           = 32;
-      mConOut.UgaRefreshRate          = 60;
-
-      FreePool (Info);
-
-    } else if (UgaDraw != NULL) {
-      Status = UgaDraw->GetMode (
-                 UgaDraw,
-                 &mConOut.UgaHorizontalResolution,
-                 &mConOut.UgaVerticalResolution,
-                 &mConOut.UgaColorDepth,
-                 &mConOut.UgaRefreshRate
-                 );
+  if (GraphicsOutput != NULL) {
+    Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);
+    if (EFI_ERROR (Status)) {
+      return Status;
     }
+    ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+
+    FreePool (Info);
   }
 
   return Status;
@@ -1475,7 +1398,7 @@ ConSplitterStdErrDriverBindingStart (
   // If both ConOut and StdErr incorporate the same Text Out device,
   // their MaxMode and QueryData should be the intersection of both.
   //
-  Status = ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL, NULL);
+  Status = ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL);
   ConSplitterTextOutSetAttribute (&mStdErr.TextOut, EFI_TEXT_ATTR (EFI_MAGENTA, EFI_BLACK));
 
   return Status;
@@ -2729,7 +2652,6 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr (
 
   @param  Private               Text Out Splitter pointer.
   @param  GraphicsOutput        Graphics Output protocol pointer.
-  @param  UgaDraw               UGA Draw protocol pointer.
 
   @retval EFI_SUCCESS           Output mode added successfully.
   @retval other                 Failed to add output mode.
@@ -2738,8 +2660,7 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr (
 EFI_STATUS
 ConSplitterAddGraphicsOutputMode (
   IN  TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private,
-  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL    *GraphicsOutput,
-  IN  EFI_UGA_DRAW_PROTOCOL           *UgaDraw
+  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL    *GraphicsOutput
   )
 {
   EFI_STATUS                           Status;
@@ -2754,12 +2675,8 @@ ConSplitterAddGraphicsOutputMode (
   UINTN                                NumberIndex;
   BOOLEAN                              Match;
   BOOLEAN                              AlreadyExist;
-  UINT32                               UgaHorizontalResolution;
-  UINT32                               UgaVerticalResolution;
-  UINT32                               UgaColorDepth;
-  UINT32                               UgaRefreshRate;
 
-  ASSERT (GraphicsOutput != NULL || UgaDraw != NULL);
+  ASSERT (GraphicsOutput != NULL);
 
   CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;
 
@@ -2767,14 +2684,6 @@ ConSplitterAddGraphicsOutputMode (
   CurrentIndex = 0;
   Status       = EFI_SUCCESS;
 
-  if (Private->CurrentNumberOfUgaDraw != 0) {
-    //
-    // If any UGA device has already been added, then there is no need to
-    // calculate intersection of display mode of different GOP/UGA device,
-    // since only one display mode will be exported (i.e. user-defined mode)
-    //
-    goto Done;
-  }
 
   if (GraphicsOutput != NULL) {
     if (Private->CurrentNumberOfGraphicsOutput == 0) {
@@ -2921,49 +2830,11 @@ ConSplitterAddGraphicsOutputMode (
         }
       }
     }
-  } else if (UgaDraw != NULL) {
-    //
-    // Graphics console driver can ensure the same mode for all GOP devices
-    // so we can get the current mode from this video device
-    //
-    UgaDraw->GetMode (
-               UgaDraw,
-               &UgaHorizontalResolution,
-               &UgaVerticalResolution,
-               &UgaColorDepth,
-               &UgaRefreshRate
-               );
-
-    CurrentGraphicsOutputMode->MaxMode = 1;
-    Info = CurrentGraphicsOutputMode->Info;
-    Info->Version = 0;
-    Info->HorizontalResolution                 = UgaHorizontalResolution;
-    Info->VerticalResolution                   = UgaVerticalResolution;
-    Info->PixelFormat                          = PixelBltOnly;
-    Info->PixelsPerScanLine                    = UgaHorizontalResolution;
-    CurrentGraphicsOutputMode->SizeOfInfo      = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
-    CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL;
-    CurrentGraphicsOutputMode->FrameBufferSize = 0;
-
-    //
-    // Update the private mode buffer
-    //
-    CopyMem (&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
-
-    //
-    // Only mode 0 is available to be set
-    //
-    CurrentIndex = 0;
   }
 
-Done:
-
   if (GraphicsOutput != NULL) {
     Private->CurrentNumberOfGraphicsOutput++;
   }
-  if (UgaDraw != NULL) {
-    Private->CurrentNumberOfUgaDraw++;
-  }
 
   //
   // Force GraphicsOutput mode to be set,
@@ -3108,7 +2979,6 @@ ConsplitterSetConsoleOutMode (
   @param  Private                  Text Out Splitter pointer.
   @param  TextOut                  Simple Text Output protocol pointer.
   @param  GraphicsOutput           Graphics Output protocol pointer.
-  @param  UgaDraw                  UGA Draw protocol pointer.
 
   @retval EFI_SUCCESS              Text Output Device added successfully.
   @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.
@@ -3118,17 +2988,12 @@ EFI_STATUS
 ConSplitterTextOutAddDevice (
   IN  TEXT_OUT_SPLITTER_PRIVATE_DATA     *Private,
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL    *TextOut,
-  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL       *GraphicsOutput,
-  IN  EFI_UGA_DRAW_PROTOCOL              *UgaDraw
+  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL       *GraphicsOutput
   )
 {
   EFI_STATUS                           Status;
   UINTN                                CurrentNumOfConsoles;
   INT32                                MaxMode;
-  UINT32                               UgaHorizontalResolution;
-  UINT32                               UgaVerticalResolution;
-  UINT32                               UgaColorDepth;
-  UINT32                               UgaRefreshRate;
   TEXT_OUT_AND_GOP_DATA                *TextAndGop;
   UINTN                                SizeOfInfo;
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
@@ -3163,7 +3028,6 @@ ConSplitterTextOutAddDevice (
 
   TextAndGop->TextOut        = TextOut;
   TextAndGop->GraphicsOutput = GraphicsOutput;
-  TextAndGop->UgaDraw        = UgaDraw;
 
   if (CurrentNumOfConsoles == 0) {
     //
@@ -3192,77 +3056,21 @@ ConSplitterTextOutAddDevice (
   //
   // This device display mode will be added into Graphics Ouput modes.
   //
-  if ((GraphicsOutput != NULL) || (UgaDraw != NULL)) {
-    DeviceStatus = ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
+  if (GraphicsOutput != NULL) {
+    DeviceStatus = ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput);
   }
 
-  if (FeaturePcdGet (PcdConOutUgaSupport)) {
-    //
-    // If UGA is produced by Consplitter
-    //
-    if (GraphicsOutput != NULL) {
-      Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);
-      if (EFI_ERROR (Status)) {
-        return Status;
-      }
-      ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
-
-      UgaHorizontalResolution = Info->HorizontalResolution;
-      UgaVerticalResolution   = Info->VerticalResolution;
-
-      FreePool (Info);
-
-    } else if (UgaDraw != NULL) {
-      Status = UgaDraw->GetMode (
-                    UgaDraw,
-                    &UgaHorizontalResolution,
-                    &UgaVerticalResolution,
-                    &UgaColorDepth,
-                    &UgaRefreshRate
-                    );
-      if (!EFI_ERROR (Status) && EFI_ERROR (DeviceStatus)) {
-        //
-        // if GetMode is successfully and UGA device hasn't been set, set it
-        //
-        Status = ConSplitterUgaDrawSetMode (
-                    &Private->UgaDraw,
-                    UgaHorizontalResolution,
-                    UgaVerticalResolution,
-                    UgaColorDepth,
-                    UgaRefreshRate
-                    );
-      }
-      //
-      // If GetMode/SetMode is failed, set to 800x600 mode
-      //
-      if(EFI_ERROR (Status)) {
-        Status = ConSplitterUgaDrawSetMode (
-                    &Private->UgaDraw,
-                    800,
-                    600,
-                    32,
-                    60
-                    );
-      }
-    }
+  Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);
+  if (EFI_ERROR (Status)) {
+    return Status;
   }
+  ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+  FreePool (Info);
 
   if (((!EFI_ERROR (DeviceStatus)) || (!EFI_ERROR (Status))) &&
-      ((Private->CurrentNumberOfGraphicsOutput + Private->CurrentNumberOfUgaDraw) == 1)) {
-    if (!FeaturePcdGet (PcdConOutGopSupport)) {
+      ((Private->CurrentNumberOfGraphicsOutput) == 1)) {
       //
-      // If Graphics Outpurt protocol not supported, UGA Draw protocol is installed
-      // on the virtual handle.
-      //
-      Status = gBS->InstallMultipleProtocolInterfaces (
-                      &mConOut.VirtualHandle,
-                      &gEfiUgaDrawProtocolGuid,
-                      &mConOut.UgaDraw,
-                      NULL
-                      );
-    } else if (!FeaturePcdGet (PcdConOutUgaSupport)) {
-      //
-      // If UGA Draw protocol not supported, Graphics Output Protocol is installed
+      // Graphics Output Protocol is installed
       // on virtual handle.
       //
       Status = gBS->InstallMultipleProtocolInterfaces (
@@ -3271,20 +3079,6 @@ ConSplitterTextOutAddDevice (
                       &mConOut.GraphicsOutput,
                       NULL
                       );
-    } else {
-      //
-      // Boot Graphics Output protocol and UGA Draw protocol are supported,
-      // both they will be installed on virtual handle.
-      //
-      Status = gBS->InstallMultipleProtocolInterfaces (
-                      &mConOut.VirtualHandle,
-                      &gEfiGraphicsOutputProtocolGuid,
-                      &mConOut.GraphicsOutput,
-                      &gEfiUgaDrawProtocolGuid,
-                      &mConOut.UgaDraw,
-                      NULL
-                      );
-    }
   }
 
   //
@@ -3329,9 +3123,6 @@ ConSplitterTextOutDeleteDevice (
   TextOutList           = Private->TextOutList;
   while (Index >= 0) {
     if (TextOutList->TextOut == TextOut) {
-      if (TextOutList->UgaDraw != NULL) {
-        Private->CurrentNumberOfUgaDraw--;
-      }
       if (TextOutList->GraphicsOutput != NULL) {
         Private->CurrentNumberOfGraphicsOutput--;
       }
@@ -3350,33 +3141,16 @@ ConSplitterTextOutDeleteDevice (
     return EFI_NOT_FOUND;
   }
 
-  if ((Private->CurrentNumberOfGraphicsOutput == 0) && (Private->CurrentNumberOfUgaDraw == 0)) {
+  if ((Private->CurrentNumberOfGraphicsOutput == 0)) {
     //
-    // If there is not any physical GOP and UGA device in system,
-    // Consplitter GOP or UGA protocol will be uninstalled
+    // If there is not any physical GOP in system,
+    // Consplitter GOP protocol will be uninstalled
     //
-    if (!FeaturePcdGet (PcdConOutGopSupport)) {
-      Status = gBS->UninstallProtocolInterface (
-                      Private->VirtualHandle,
-                      &gEfiUgaDrawProtocolGuid,
-                      &Private->UgaDraw
-                      );
-    } else if (!FeaturePcdGet (PcdConOutUgaSupport)) {
-      Status = gBS->UninstallProtocolInterface (
-                      Private->VirtualHandle,
-                      &gEfiGraphicsOutputProtocolGuid,
-                      &Private->GraphicsOutput
-                      );
-    } else {
-      Status = gBS->UninstallMultipleProtocolInterfaces (
-             Private->VirtualHandle,
-             &gEfiUgaDrawProtocolGuid,
-             &Private->UgaDraw,
-             &gEfiGraphicsOutputProtocolGuid,
-             &Private->GraphicsOutput,
-             NULL
-             );
-    }
+    Status = gBS->UninstallProtocolInterface (
+                    Private->VirtualHandle,
+                    &gEfiGraphicsOutputProtocolGuid,
+                    &Private->GraphicsOutput
+                    );
   }
 
   if (CurrentNumOfConsoles == 0) {
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
index 419635c3f51f..32ad0888544b 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
@@ -21,7 +21,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Protocol/SimpleTextIn.h>
 #include <Protocol/SimpleTextInEx.h>
 #include <Protocol/GraphicsOutput.h>
-#include <Protocol/UgaDraw.h>
 
 #include <Guid/ConsoleInDevice.h>
 #include <Guid/StandardErrorDevice.h>
@@ -187,7 +186,6 @@ typedef struct {
 
 typedef struct {
   EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL            *UgaDraw;
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *TextOut;
 } TEXT_OUT_AND_GOP_DATA;
 
@@ -200,16 +198,9 @@ typedef struct {
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL       TextOut;
   EFI_SIMPLE_TEXT_OUTPUT_MODE           TextOutMode;
 
-  EFI_UGA_DRAW_PROTOCOL                 UgaDraw;
-  UINT32                                UgaHorizontalResolution;
-  UINT32                                UgaVerticalResolution;
-  UINT32                                UgaColorDepth;
-  UINT32                                UgaRefreshRate;
-
   EFI_GRAPHICS_OUTPUT_PROTOCOL          GraphicsOutput;
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  *GraphicsOutputModeBuffer;
   UINTN                                 CurrentNumberOfGraphicsOutput;
-  UINTN                                 CurrentNumberOfUgaDraw;
 
   UINTN                                 CurrentNumberOfConsoles;
   TEXT_OUT_AND_GOP_DATA                 *TextOutList;
@@ -236,13 +227,6 @@ typedef struct {
       TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE              \
       )
 
-#define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
-  CR ((a),                                          \
-      TEXT_OUT_SPLITTER_PRIVATE_DATA,               \
-      UgaDraw,                                      \
-      TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE      \
-      )
-
 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a)  \
   CR ((a),                                                  \
       TEXT_OUT_SPLITTER_PRIVATE_DATA,                       \
@@ -260,7 +244,7 @@ typedef struct {
   Installs driver module protocols and. Creates virtual device handles for ConIn,
   ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
   Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
-  Installs Graphics Output protocol and/or UGA Draw protocol if needed.
+  Installs Graphics Output protocol if needed.
 
   @param[in] ImageHandle    The firmware allocated handle for the EFI image.
   @param[in] SystemTable    A pointer to the EFI System Table.
@@ -1216,7 +1200,6 @@ ConSplitterSimplePointerDeleteDevice (
   @param  Private                  Text Out Splitter pointer.
   @param  TextOut                  Simple Text Output protocol pointer.
   @param  GraphicsOutput           Graphics Output protocol pointer.
-  @param  UgaDraw                  UGA Draw protocol pointer.
 
   @retval EFI_SUCCESS              Text Output Device added successfully.
   @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.
@@ -1226,8 +1209,7 @@ EFI_STATUS
 ConSplitterTextOutAddDevice (
   IN  TEXT_OUT_SPLITTER_PRIVATE_DATA     *Private,
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL    *TextOut,
-  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL       *GraphicsOutput,
-  IN  EFI_UGA_DRAW_PROTOCOL              *UgaDraw
+  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL       *GraphicsOutput
   );
 
 /**
@@ -1871,119 +1853,6 @@ ConSplitterGraphicsOutputBlt (
   IN  UINTN                                         Delta         OPTIONAL
   );
 
-
-/**
-  Return the current video mode information.
-
-  @param  This                  The EFI_UGA_DRAW_PROTOCOL instance.
-  @param  HorizontalResolution  The size of video screen in pixels in the X dimension.
-  @param  VerticalResolution    The size of video screen in pixels in the Y dimension.
-  @param  ColorDepth            Number of bits per pixel, currently defined to be 32.
-  @param  RefreshRate           The refresh rate of the monitor in Hertz.
-
-  @retval EFI_SUCCESS           Mode information returned.
-  @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()
-  @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-EFI_STATUS
-EFIAPI
-ConSplitterUgaDrawGetMode (
-  IN  EFI_UGA_DRAW_PROTOCOL           *This,
-  OUT UINT32                          *HorizontalResolution,
-  OUT UINT32                          *VerticalResolution,
-  OUT UINT32                          *ColorDepth,
-  OUT UINT32                          *RefreshRate
-  );
-
-/**
-  Set the current video mode information.
-
-  @param  This                 The EFI_UGA_DRAW_PROTOCOL instance.
-  @param  HorizontalResolution The size of video screen in pixels in the X dimension.
-  @param  VerticalResolution   The size of video screen in pixels in the Y dimension.
-  @param  ColorDepth           Number of bits per pixel, currently defined to be 32.
-  @param  RefreshRate          The refresh rate of the monitor in Hertz.
-
-  @retval EFI_SUCCESS          Mode information returned.
-  @retval EFI_NOT_STARTED      Video display is not initialized. Call SetMode ()
-  @retval EFI_OUT_OF_RESOURCES Out of resources.
-
-**/
-EFI_STATUS
-EFIAPI
-ConSplitterUgaDrawSetMode (
-  IN  EFI_UGA_DRAW_PROTOCOL           *This,
-  IN UINT32                           HorizontalResolution,
-  IN UINT32                           VerticalResolution,
-  IN UINT32                           ColorDepth,
-  IN UINT32                           RefreshRate
-  );
-
-/**
-  Blt a rectangle of pixels on the graphics screen.
-
-  The following table defines actions for BltOperations.
-
-  EfiUgaVideoFill:
-    Write data from the  BltBuffer pixel (SourceX, SourceY)
-    directly to every pixel of the video display rectangle
-    (DestinationX, DestinationY)
-    (DestinationX + Width, DestinationY + Height).
-    Only one pixel will be used from the BltBuffer. Delta is NOT used.
-  EfiUgaVideoToBltBuffer:
-    Read data from the video display rectangle
-    (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
-    the BltBuffer rectangle (DestinationX, DestinationY )
-    (DestinationX + Width, DestinationY + Height). If DestinationX or
-    DestinationY is not zero then Delta must be set to the length in bytes
-    of a row in the BltBuffer.
-  EfiUgaBltBufferToVideo:
-    Write data from the  BltBuffer rectangle
-    (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
-    video display rectangle (DestinationX, DestinationY)
-    (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
-    not zero then Delta must be set to the length in bytes of a row in the
-    BltBuffer.
-  EfiUgaVideoToVideo:
-    Copy from the video display rectangle
-    (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
-    to the video display rectangle (DestinationX, DestinationY)
-    (DestinationX + Width, DestinationY + Height).
-    The BltBuffer and Delta  are not used in this mode.
-
-  @param  This           Protocol instance pointer.
-  @param  BltBuffer      Buffer containing data to blit into video buffer. This
-                         buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
-  @param  BltOperation   Operation to perform on BlitBuffer and video memory
-  @param  SourceX        X coordinate of source for the BltBuffer.
-  @param  SourceY        Y coordinate of source for the BltBuffer.
-  @param  DestinationX   X coordinate of destination for the BltBuffer.
-  @param  DestinationY   Y coordinate of destination for the BltBuffer.
-  @param  Width          Width of rectangle in BltBuffer in pixels.
-  @param  Height         Hight of rectangle in BltBuffer in pixels.
-  @param  Delta          OPTIONAL
-
-  @retval EFI_SUCCESS            The Blt operation completed.
-  @retval EFI_INVALID_PARAMETER  BltOperation is not valid.
-  @retval EFI_DEVICE_ERROR       A hardware error occured writting to the video buffer.
-
-**/
-EFI_STATUS
-EFIAPI
-ConSplitterUgaDrawBlt (
-  IN  EFI_UGA_DRAW_PROTOCOL                         *This,
-  IN  EFI_UGA_PIXEL                                 *BltBuffer, OPTIONAL
-  IN  EFI_UGA_BLT_OPERATION                         BltOperation,
-  IN  UINTN                                         SourceX,
-  IN  UINTN                                         SourceY,
-  IN  UINTN                                         DestinationX,
-  IN  UINTN                                         DestinationY,
-  IN  UINTN                                         Width,
-  IN  UINTN                                         Height,
-  IN  UINTN                                         Delta         OPTIONAL
-  );
-
 /**
   Sets the output device(s) to a specified mode.
 
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
index 9aa1dade752a..156757aee653 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
@@ -3,12 +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 and/or UGA Draw protocol in system
-# table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). It always
-# consumes Graphics Output protocol which is produced by display device, and consumes UGA Draw
-# protocol which is produced by display device according to PcdUgaConsumeSupport value.
-# Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be
-# set to TRUE.
+# 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
 #
 # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 #
@@ -92,14 +89,9 @@ [Protocols]
   ## SOMETIMES_PRODUCES
   ## SOMETIMES_CONSUMES
   gEfiGraphicsOutputProtocolGuid
-  ## SOMETIMES_PRODUCES
-  ## SOMETIMES_CONSUMES
-  gEfiUgaDrawProtocolGuid
 
 [FeaturePcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport   ## CONSUMES
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport   ## CONSUMES
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport        ## CONSUMES
 
 [Pcd]
   ## SOMETIMES_PRODUCES
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni
index 13c25b2a4ffc..903c505e303c 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni
@@ -3,12 +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 and/or UGA Draw protocol in system
-// table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). It always
-// consumes Graphics Output protocol which is produced by display device, and consumes UGA Draw
-// protocol which is produced by display device according to PcdUgaConsumeSupport value.
-// Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be
-// set to TRUE.
+// 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
 //
 // Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
 //
@@ -19,5 +16,5 @@
 
 #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 and/or UGA Draw protocol in system table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). It always consumes Graphics Output protocol, which is produced by display device, and consumes UGA Draw protocol, which is produced by display device according to PcdUgaConsumeSupport value. Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be set to TRUE."
+#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."
 
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
index ab1d2ddc4dc4..e8926db3e355 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
@@ -118,7 +118,6 @@ ConSplitterGraphicsOutputSetMode (
   UINTN                                  NumberIndex;
   UINTN                                  SizeOfInfo;
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Info;
-  EFI_UGA_DRAW_PROTOCOL                  *UgaDraw;
 
   if (ModeNumber >= This->Mode->MaxMode) {
     return EFI_UNSUPPORTED;
@@ -156,20 +155,6 @@ ConSplitterGraphicsOutputSetMode (
       if (EFI_ERROR (Status)) {
         ReturnStatus = Status;
       }
-    } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-      UgaDraw = Private->TextOutList[Index].UgaDraw;
-      if (UgaDraw != NULL) {
-        Status = UgaDraw->SetMode (
-                            UgaDraw,
-                            Mode->HorizontalResolution,
-                            Mode->VerticalResolution,
-                            32,
-                            60
-                            );
-        if (EFI_ERROR (Status)) {
-          ReturnStatus = Status;
-        }
-      }
     }
   }
 
@@ -262,7 +247,6 @@ ConSplitterGraphicsOutputBlt (
   TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private;
   UINTN                           Index;
   EFI_GRAPHICS_OUTPUT_PROTOCOL    *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL           *UgaDraw;
 
   if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
     return EFI_INVALID_PARAMETER;
@@ -299,297 +283,6 @@ ConSplitterGraphicsOutputBlt (
         return EFI_SUCCESS;
       }
     }
-
-    UgaDraw = Private->TextOutList[Index].UgaDraw;
-    if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
-      Status = UgaDraw->Blt (
-                              UgaDraw,
-                              (EFI_UGA_PIXEL *) BltBuffer,
-                              (EFI_UGA_BLT_OPERATION) BltOperation,
-                              SourceX,
-                              SourceY,
-                              DestinationX,
-                              DestinationY,
-                              Width,
-                              Height,
-                              Delta
-                              );
-      if (EFI_ERROR (Status)) {
-        ReturnStatus = Status;
-      } else if (BltOperation == EfiBltVideoToBltBuffer) {
-        //
-        // Only need to read the data into buffer one time
-        //
-        return EFI_SUCCESS;
-      }
-    }
-  }
-
-  return ReturnStatus;
-}
-
-/**
-  Return the current video mode information.
-
-  @param  This                  The EFI_UGA_DRAW_PROTOCOL instance.
-  @param  HorizontalResolution  The size of video screen in pixels in the X dimension.
-  @param  VerticalResolution    The size of video screen in pixels in the Y dimension.
-  @param  ColorDepth            Number of bits per pixel, currently defined to be 32.
-  @param  RefreshRate           The refresh rate of the monitor in Hertz.
-
-  @retval EFI_SUCCESS           Mode information returned.
-  @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()
-  @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-EFI_STATUS
-EFIAPI
-ConSplitterUgaDrawGetMode (
-  IN  EFI_UGA_DRAW_PROTOCOL           *This,
-  OUT UINT32                          *HorizontalResolution,
-  OUT UINT32                          *VerticalResolution,
-  OUT UINT32                          *ColorDepth,
-  OUT UINT32                          *RefreshRate
-  )
-{
-  TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private;
-
-  if ((HorizontalResolution == NULL) ||
-      (VerticalResolution   == NULL) ||
-      (RefreshRate          == NULL) ||
-      (ColorDepth           == NULL)) {
-    return EFI_INVALID_PARAMETER;
-  }
-  //
-  // retrieve private data
-  //
-  Private               = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
-
-  *HorizontalResolution = Private->UgaHorizontalResolution;
-  *VerticalResolution   = Private->UgaVerticalResolution;
-  *ColorDepth           = Private->UgaColorDepth;
-  *RefreshRate          = Private->UgaRefreshRate;
-
-  return EFI_SUCCESS;
-}
-
-
-/**
-  Set the current video mode information.
-
-  @param  This                 The EFI_UGA_DRAW_PROTOCOL instance.
-  @param  HorizontalResolution The size of video screen in pixels in the X dimension.
-  @param  VerticalResolution   The size of video screen in pixels in the Y dimension.
-  @param  ColorDepth           Number of bits per pixel, currently defined to be 32.
-  @param  RefreshRate          The refresh rate of the monitor in Hertz.
-
-  @retval EFI_SUCCESS          Mode information returned.
-  @retval EFI_NOT_STARTED      Video display is not initialized. Call SetMode ()
-  @retval EFI_OUT_OF_RESOURCES Out of resources.
-
-**/
-EFI_STATUS
-EFIAPI
-ConSplitterUgaDrawSetMode (
-  IN  EFI_UGA_DRAW_PROTOCOL           *This,
-  IN UINT32                           HorizontalResolution,
-  IN UINT32                           VerticalResolution,
-  IN UINT32                           ColorDepth,
-  IN UINT32                           RefreshRate
-  )
-{
-  EFI_STATUS                             Status;
-  TEXT_OUT_SPLITTER_PRIVATE_DATA         *Private;
-  UINTN                                  Index;
-  EFI_STATUS                             ReturnStatus;
-  EFI_GRAPHICS_OUTPUT_PROTOCOL           *GraphicsOutput;
-  UINTN                                  NumberIndex;
-  UINTN                                  SizeOfInfo;
-  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Info;
-  EFI_UGA_DRAW_PROTOCOL                  *UgaDraw;
-
-  Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
-
-  ReturnStatus = EFI_SUCCESS;
-
-  //
-  // Update the Mode data
-  //
-  Private->UgaHorizontalResolution  = HorizontalResolution;
-  Private->UgaVerticalResolution    = VerticalResolution;
-  Private->UgaColorDepth            = ColorDepth;
-  Private->UgaRefreshRate           = RefreshRate;
-
-  //
-  // return the worst status met
-  //
-  for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
-
-    GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
-    if (GraphicsOutput != NULL) {
-      //
-      // Find corresponding ModeNumber of this GraphicsOutput instance
-      //
-      for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {
-        Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);
-        if (EFI_ERROR (Status)) {
-          return Status;
-        }
-        if ((Info->HorizontalResolution == HorizontalResolution) && (Info->VerticalResolution == VerticalResolution)) {
-          FreePool (Info);
-          break;
-        }
-        FreePool (Info);
-      }
-
-      Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);
-      if (EFI_ERROR (Status)) {
-        ReturnStatus = Status;
-      }
-    } else if (FeaturePcdGet (PcdUgaConsumeSupport)){
-      UgaDraw = Private->TextOutList[Index].UgaDraw;
-      if (UgaDraw != NULL) {
-        Status = UgaDraw->SetMode (
-                          UgaDraw,
-                          HorizontalResolution,
-                          VerticalResolution,
-                          ColorDepth,
-                          RefreshRate
-                          );
-        if (EFI_ERROR (Status)) {
-          ReturnStatus = Status;
-        }
-      }
-    }
-  }
-
-  return ReturnStatus;
-}
-
-
-/**
-  Blt a rectangle of pixels on the graphics screen.
-
-  The following table defines actions for BltOperations.
-
-  EfiUgaVideoFill:
-    Write data from the  BltBuffer pixel (SourceX, SourceY)
-    directly to every pixel of the video display rectangle
-    (DestinationX, DestinationY)
-    (DestinationX + Width, DestinationY + Height).
-    Only one pixel will be used from the BltBuffer. Delta is NOT used.
-  EfiUgaVideoToBltBuffer:
-    Read data from the video display rectangle
-    (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
-    the BltBuffer rectangle (DestinationX, DestinationY )
-    (DestinationX + Width, DestinationY + Height). If DestinationX or
-    DestinationY is not zero then Delta must be set to the length in bytes
-    of a row in the BltBuffer.
-  EfiUgaBltBufferToVideo:
-    Write data from the  BltBuffer rectangle
-    (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
-    video display rectangle (DestinationX, DestinationY)
-    (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
-    not zero then Delta must be set to the length in bytes of a row in the
-    BltBuffer.
-  EfiUgaVideoToVideo:
-    Copy from the video display rectangle
-    (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
-    to the video display rectangle (DestinationX, DestinationY)
-    (DestinationX + Width, DestinationY + Height).
-    The BltBuffer and Delta  are not used in this mode.
-
-  @param  This           Protocol instance pointer.
-  @param  BltBuffer      Buffer containing data to blit into video buffer. This
-                         buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
-  @param  BltOperation   Operation to perform on BlitBuffer and video memory
-  @param  SourceX        X coordinate of source for the BltBuffer.
-  @param  SourceY        Y coordinate of source for the BltBuffer.
-  @param  DestinationX   X coordinate of destination for the BltBuffer.
-  @param  DestinationY   Y coordinate of destination for the BltBuffer.
-  @param  Width          Width of rectangle in BltBuffer in pixels.
-  @param  Height         Hight of rectangle in BltBuffer in pixels.
-  @param  Delta          OPTIONAL
-
-  @retval EFI_SUCCESS            The Blt operation completed.
-  @retval EFI_INVALID_PARAMETER  BltOperation is not valid.
-  @retval EFI_DEVICE_ERROR       A hardware error occured writting to the video buffer.
-
-**/
-EFI_STATUS
-EFIAPI
-ConSplitterUgaDrawBlt (
-  IN  EFI_UGA_DRAW_PROTOCOL                         *This,
-  IN  EFI_UGA_PIXEL                                 *BltBuffer, OPTIONAL
-  IN  EFI_UGA_BLT_OPERATION                         BltOperation,
-  IN  UINTN                                         SourceX,
-  IN  UINTN                                         SourceY,
-  IN  UINTN                                         DestinationX,
-  IN  UINTN                                         DestinationY,
-  IN  UINTN                                         Width,
-  IN  UINTN                                         Height,
-  IN  UINTN                                         Delta         OPTIONAL
-  )
-{
-  EFI_STATUS                      Status;
-  TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private;
-  UINTN                           Index;
-  EFI_STATUS                      ReturnStatus;
-  EFI_GRAPHICS_OUTPUT_PROTOCOL    *GraphicsOutput;
-
-  Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
-
-  ReturnStatus = EFI_SUCCESS;
-  //
-  // return the worst status met
-  //
-  for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
-    GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
-    if (GraphicsOutput != NULL) {
-      Status = GraphicsOutput->Blt (
-                              GraphicsOutput,
-                              (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) BltBuffer,
-                              (EFI_GRAPHICS_OUTPUT_BLT_OPERATION) BltOperation,
-                              SourceX,
-                              SourceY,
-                              DestinationX,
-                              DestinationY,
-                              Width,
-                              Height,
-                              Delta
-                              );
-      if (EFI_ERROR (Status)) {
-        ReturnStatus = Status;
-      } else if (BltOperation == EfiUgaVideoToBltBuffer) {
-        //
-        // Only need to read the data into buffer one time
-        //
-        return EFI_SUCCESS;
-      }
-    }
-
-    if (Private->TextOutList[Index].UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
-      Status = Private->TextOutList[Index].UgaDraw->Blt (
-                                                      Private->TextOutList[Index].UgaDraw,
-                                                      BltBuffer,
-                                                      BltOperation,
-                                                      SourceX,
-                                                      SourceY,
-                                                      DestinationX,
-                                                      DestinationY,
-                                                      Width,
-                                                      Height,
-                                                      Delta
-                                                      );
-      if (EFI_ERROR (Status)) {
-        ReturnStatus = Status;
-      } else if (BltOperation == EfiUgaVideoToBltBuffer) {
-        //
-        // Only need to read the data into buffer one time
-        //
-        return EFI_SUCCESS;
-      }
-    }
   }
 
   return ReturnStatus;
-- 
2.25.1.windows.1


  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 ` Guomin Jiang [this message]
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 ` [PATCH 14/18] " Guomin Jiang
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-6-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