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>, Dandan Bi <dandan.bi@intel.com>,
	Eric Dong <eric.dong@intel.com>,
	Zhichao Gao <zhichao.gao@intel.com>, Ray Ni <ray.ni@intel.com>
Subject: [PATCH 06/18] MdeModulePkg/GraphicsConsoleDxe: Remove All UGA Support
Date: Fri,  8 May 2020 16:38:12 +0800	[thread overview]
Message-ID: <20200508083824.1785-7-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 GraphicsConsoleDxe, remove comment about UGA
in HiiDatabaseDxe.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
---
 .../GraphicsConsoleDxe/GraphicsConsole.c      | 299 +-----------------
 .../GraphicsConsoleDxe/GraphicsConsole.h      |  19 +-
 .../GraphicsConsoleDxe/GraphicsConsoleDxe.inf |   6 +-
 .../GraphicsConsoleDxe/GraphicsConsoleDxe.uni |   4 +-
 MdeModulePkg/Universal/HiiDatabaseDxe/Image.c |   2 +-
 5 files changed, 19 insertions(+), 311 deletions(-)

diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index c042451a9b52..55c9e8f5ebf4 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -14,7 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 GRAPHICS_CONSOLE_DEV    mGraphicsConsoleDevTemplate = {
   GRAPHICS_CONSOLE_DEV_SIGNATURE,
   (EFI_GRAPHICS_OUTPUT_PROTOCOL *) NULL,
-  (EFI_UGA_DRAW_PROTOCOL *) NULL,
   {
     GraphicsConsoleConOutReset,
     GraphicsConsoleConOutOutputString,
@@ -99,9 +98,8 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = {
 /**
   Test to see if Graphics Console could be supported on the Controller.
 
-  Graphics Console could be supported if Graphics Output Protocol or UGA Draw
-  Protocol exists on the Controller. (UGA Draw Protocol could be skipped
-  if PcdUgaConsumeSupport is set to FALSE.)
+  Graphics Console could be supported if Graphics Output Protocol
+  exists on the Controller.
 
   @param  This                Protocol instance pointer.
   @param  Controller          Handle of device to test.
@@ -122,11 +120,9 @@ GraphicsConsoleControllerDriverSupported (
 {
   EFI_STATUS                   Status;
   EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL        *UgaDraw;
   EFI_DEVICE_PATH_PROTOCOL     *DevicePath;
 
   GraphicsOutput = NULL;
-  UgaDraw        = NULL;
   //
   // Open the IO Abstraction(s) needed to perform the supported test
   //
@@ -138,20 +134,6 @@ GraphicsConsoleControllerDriverSupported (
                   Controller,
                   EFI_OPEN_PROTOCOL_BY_DRIVER
                   );
-
-  if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
-    //
-    // Open Graphics Output Protocol failed, try to open UGA Draw Protocol
-    //
-    Status = gBS->OpenProtocol (
-                    Controller,
-                    &gEfiUgaDrawProtocolGuid,
-                    (VOID **) &UgaDraw,
-                    This->DriverBindingHandle,
-                    Controller,
-                    EFI_OPEN_PROTOCOL_BY_DRIVER
-                    );
-  }
   if (EFI_ERROR (Status)) {
     return Status;
   }
@@ -196,13 +178,6 @@ GraphicsConsoleControllerDriverSupported (
           This->DriverBindingHandle,
           Controller
           );
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    gBS->CloseProtocol (
-          Controller,
-          &gEfiUgaDrawProtocolGuid,
-          This->DriverBindingHandle,
-          Controller
-          );
   }
   return Status;
 }
@@ -351,9 +326,8 @@ InitializeGraphicsConsoleTextMode (
 }
 
 /**
-  Start this driver on Controller by opening Graphics Output protocol or
-  UGA Draw protocol, and installing Simple Text Out protocol on Controller.
-  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
+  Start this driver on Controller by opening Graphics Output protocol
+  and installing Simple Text Out protocol on Controller.
 
   @param  This                 Protocol instance pointer.
   @param  Controller           Handle of device to bind driver to
@@ -376,8 +350,6 @@ GraphicsConsoleControllerDriverStart (
   GRAPHICS_CONSOLE_DEV                 *Private;
   UINT32                               HorizontalResolution;
   UINT32                               VerticalResolution;
-  UINT32                               ColorDepth;
-  UINT32                               RefreshRate;
   UINT32                               ModeIndex;
   UINTN                                MaxMode;
   UINT32                               ModeNumber;
@@ -414,18 +386,6 @@ GraphicsConsoleControllerDriverStart (
                   Controller,
                   EFI_OPEN_PROTOCOL_BY_DRIVER
                   );
-
-  if (EFI_ERROR(Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
-    Status = gBS->OpenProtocol (
-                    Controller,
-                    &gEfiUgaDrawProtocolGuid,
-                    (VOID **) &Private->UgaDraw,
-                    This->DriverBindingHandle,
-                    Controller,
-                    EFI_OPEN_PROTOCOL_BY_DRIVER
-                    );
-  }
-
   if (EFI_ERROR (Status)) {
     goto Error;
   }
@@ -512,43 +472,6 @@ GraphicsConsoleControllerDriverStart (
         goto Error;
       }
     }
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    //
-    // At first try to set user-defined resolution
-    //
-    ColorDepth            = 32;
-    RefreshRate           = 60;
-    Status = Private->UgaDraw->SetMode (
-                                Private->UgaDraw,
-                                HorizontalResolution,
-                                VerticalResolution,
-                                ColorDepth,
-                                RefreshRate
-                                );
-    if (EFI_ERROR (Status)) {
-      //
-      // Try to set 800*600 which is required by UEFI/EFI spec
-      //
-      Status = Private->UgaDraw->SetMode (
-                                  Private->UgaDraw,
-                                  800,
-                                  600,
-                                  ColorDepth,
-                                  RefreshRate
-                                  );
-      if (EFI_ERROR (Status)) {
-        Status = Private->UgaDraw->GetMode (
-                                    Private->UgaDraw,
-                                    &HorizontalResolution,
-                                    &VerticalResolution,
-                                    &ColorDepth,
-                                    &RefreshRate
-                                    );
-        if (EFI_ERROR (Status)) {
-          goto Error;
-        }
-      }
-    }
   }
 
   DEBUG ((EFI_D_INFO, "GraphicsConsole video resolution %d x %d\n", HorizontalResolution, VerticalResolution));
@@ -613,7 +536,7 @@ GraphicsConsoleControllerDriverStart (
 Error:
   if (EFI_ERROR (Status)) {
     //
-    // Close the GOP and UGA Draw Protocol
+    // Close the GOP
     //
     if (Private->GraphicsOutput != NULL) {
       gBS->CloseProtocol (
@@ -622,13 +545,6 @@ GraphicsConsoleControllerDriverStart (
              This->DriverBindingHandle,
              Controller
              );
-    } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-      gBS->CloseProtocol (
-             Controller,
-             &gEfiUgaDrawProtocolGuid,
-             This->DriverBindingHandle,
-             Controller
-             );
     }
 
     if (Private->LineBuffer != NULL) {
@@ -650,9 +566,7 @@ GraphicsConsoleControllerDriverStart (
 
 /**
   Stop this driver on Controller by removing Simple Text Out protocol
-  and closing the Graphics Output Protocol or UGA Draw protocol on Controller.
-  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
-
+  and closing the Graphics Output Protocol on Controller.
 
   @param  This              Protocol instance pointer.
   @param  Controller        Handle of device to stop driver on
@@ -701,7 +615,7 @@ GraphicsConsoleControllerDriverStop (
 
   if (!EFI_ERROR (Status)) {
     //
-    // Close the GOP or UGA IO Protocol
+    // Close the GOP Protocol
     //
     if (Private->GraphicsOutput != NULL) {
       gBS->CloseProtocol (
@@ -710,13 +624,6 @@ GraphicsConsoleControllerDriverStop (
             This->DriverBindingHandle,
             Controller
             );
-    } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-      gBS->CloseProtocol (
-            Controller,
-            &gEfiUgaDrawProtocolGuid,
-            This->DriverBindingHandle,
-            Controller
-            );
     }
 
     if (Private->LineBuffer != NULL) {
@@ -905,7 +812,6 @@ GraphicsConsoleConOutOutputString (
 {
   GRAPHICS_CONSOLE_DEV  *Private;
   EFI_GRAPHICS_OUTPUT_PROTOCOL   *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL *UgaDraw;
   INTN                  Mode;
   UINTN                 MaxColumn;
   UINTN                 MaxRow;
@@ -939,7 +845,6 @@ GraphicsConsoleConOutOutputString (
   Mode      = This->Mode->Mode;
   Private   = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
   GraphicsOutput = Private->GraphicsOutput;
-  UgaDraw   = Private->UgaDraw;
 
   MaxColumn = Private->ModeData[Mode].Columns;
   MaxRow    = Private->ModeData[Mode].Rows;
@@ -1029,38 +934,6 @@ GraphicsConsoleConOutOutputString (
                     EFI_GLYPH_HEIGHT,
                     Delta
                     );
-        } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-          //
-          // Scroll Screen Up One Row
-          //
-          UgaDraw->Blt (
-                    UgaDraw,
-                    NULL,
-                    EfiUgaVideoToVideo,
-                    DeltaX,
-                    DeltaY + EFI_GLYPH_HEIGHT,
-                    DeltaX,
-                    DeltaY,
-                    Width,
-                    Height,
-                    Delta
-                    );
-
-          //
-          // Print Blank Line at last line
-          //
-          UgaDraw->Blt (
-                    UgaDraw,
-                    (EFI_UGA_PIXEL *) (UINTN) &Background,
-                    EfiUgaVideoFill,
-                    0,
-                    0,
-                    DeltaX,
-                    DeltaY + Height,
-                    Width,
-                    EFI_GLYPH_HEIGHT,
-                    Delta
-                    );
         }
       } else {
         This->Mode->CursorRow++;
@@ -1300,19 +1173,13 @@ GraphicsConsoleConOutSetMode (
   GRAPHICS_CONSOLE_DEV            *Private;
   GRAPHICS_CONSOLE_MODE_DATA      *ModeData;
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL   *NewLineBuffer;
-  UINT32                          HorizontalResolution;
-  UINT32                          VerticalResolution;
   EFI_GRAPHICS_OUTPUT_PROTOCOL    *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL           *UgaDraw;
-  UINT32                          ColorDepth;
-  UINT32                          RefreshRate;
   EFI_TPL                         OldTpl;
 
   OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
 
   Private   = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
   GraphicsOutput = Private->GraphicsOutput;
-  UgaDraw   = Private->UgaDraw;
 
   //
   // Make sure the requested mode number is supported
@@ -1345,7 +1212,7 @@ GraphicsConsoleConOutSetMode (
       goto Done;
     }
     //
-    // Otherwise, the size of the text console and/or the GOP/UGA mode will be changed,
+    // Otherwise, the size of the text console and/or the GOP mode will be changed,
     // so erase the cursor, and free the LineBuffer for the current mode
     //
     FlushCursor (This);
@@ -1401,51 +1268,6 @@ GraphicsConsoleConOutSetMode (
                           0
                           );
     }
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    //
-    // Get the current UGA Draw mode information
-    //
-    Status = UgaDraw->GetMode (
-                        UgaDraw,
-                        &HorizontalResolution,
-                        &VerticalResolution,
-                        &ColorDepth,
-                        &RefreshRate
-                        );
-    if (EFI_ERROR (Status) || HorizontalResolution != ModeData->GopWidth || VerticalResolution != ModeData->GopHeight) {
-      //
-      // Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new graphics mode
-      //
-      Status = UgaDraw->SetMode (
-                          UgaDraw,
-                          ModeData->GopWidth,
-                          ModeData->GopHeight,
-                          32,
-                          60
-                          );
-      if (EFI_ERROR (Status)) {
-        //
-        // The mode set operation failed
-        //
-        goto Done;
-      }
-    } else {
-      //
-      // The current graphics mode is correct, so simply clear the entire display
-      //
-      Status = UgaDraw->Blt (
-                          UgaDraw,
-                          (EFI_UGA_PIXEL *) (UINTN) &mGraphicsEfiColors[0],
-                          EfiUgaVideoFill,
-                          0,
-                          0,
-                          0,
-                          0,
-                          ModeData->GopWidth,
-                          ModeData->GopHeight,
-                          0
-                          );
-    }
   }
 
   //
@@ -1539,7 +1361,6 @@ GraphicsConsoleConOutClearScreen (
   GRAPHICS_CONSOLE_DEV          *Private;
   GRAPHICS_CONSOLE_MODE_DATA    *ModeData;
   EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL         *UgaDraw;
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
   EFI_TPL                       OldTpl;
@@ -1555,7 +1376,6 @@ GraphicsConsoleConOutClearScreen (
 
   Private   = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
   GraphicsOutput = Private->GraphicsOutput;
-  UgaDraw   = Private->UgaDraw;
   ModeData  = &(Private->ModeData[This->Mode->Mode]);
 
   GetTextColors (This, &Foreground, &Background);
@@ -1572,19 +1392,6 @@ GraphicsConsoleConOutClearScreen (
                         ModeData->GopHeight,
                         0
                         );
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    Status = UgaDraw->Blt (
-                        UgaDraw,
-                        (EFI_UGA_PIXEL *) (UINTN) &Background,
-                        EfiUgaVideoFill,
-                        0,
-                        0,
-                        0,
-                        0,
-                        ModeData->GopWidth,
-                        ModeData->GopHeight,
-                        0
-                        );
   } else {
     Status = EFI_UNSUPPORTED;
   }
@@ -1747,7 +1554,7 @@ GetTextColors (
   @param  Count                 The count of Unicode string.
 
   @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.
-  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw
+  @retval EFI_UNSUPPORTED       If no Graphics Output protocol
                                 protocol exist.
   @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.
 
@@ -1764,9 +1571,6 @@ DrawUnicodeWeightAtCursorN (
   EFI_IMAGE_OUTPUT                  *Blt;
   EFI_STRING                        String;
   EFI_FONT_DISPLAY_INFO             *FontInfo;
-  EFI_UGA_DRAW_PROTOCOL             *UgaDraw;
-  EFI_HII_ROW_INFO                  *RowInfoArray;
-  UINTN                             RowInfoArraySize;
 
   Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
   Blt = (EFI_IMAGE_OUTPUT *) AllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT));
@@ -1817,63 +1621,6 @@ DrawUnicodeWeightAtCursorN (
                          NULL
                          );
 
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    //
-    // If Graphics Output protocol cannot be found and PcdUgaConsumeSupport enabled,
-    // using UGA Draw protocol to draw.
-    //
-    ASSERT (Private->UgaDraw!= NULL);
-
-    UgaDraw = Private->UgaDraw;
-
-    Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
-    if (Blt->Image.Bitmap == NULL) {
-      FreePool (Blt);
-      FreePool (String);
-      return EFI_OUT_OF_RESOURCES;
-    }
-
-    RowInfoArray = NULL;
-    //
-    //  StringToImage only support blt'ing image to device using GOP protocol. If GOP is not supported in this platform,
-    //  we ask StringToImage to print the string to blt buffer, then blt to device using UgaDraw.
-    //
-    Status = mHiiFont->StringToImage (
-                          mHiiFont,
-                          EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_IGNORE_LINE_BREAK,
-                          String,
-                          FontInfo,
-                          &Blt,
-                          This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
-                          This->Mode->CursorRow * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
-                          &RowInfoArray,
-                          &RowInfoArraySize,
-                          NULL
-                          );
-
-    if (!EFI_ERROR (Status)) {
-      //
-      // Line breaks are handled by caller of DrawUnicodeWeightAtCursorN, so the updated parameter RowInfoArraySize by StringToImage will
-      // always be 1 or 0 (if there is no valid Unicode Char can be printed). ASSERT here to make sure.
-      //
-      ASSERT (RowInfoArraySize <= 1);
-
-      Status = UgaDraw->Blt (
-                          UgaDraw,
-                          (EFI_UGA_PIXEL *) Blt->Image.Bitmap,
-                          EfiUgaBltBufferToVideo,
-                          This->Mode->CursorColumn * EFI_GLYPH_WIDTH  + Private->ModeData[This->Mode->Mode].DeltaX,
-                          (This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
-                          This->Mode->CursorColumn * EFI_GLYPH_WIDTH  + Private->ModeData[This->Mode->Mode].DeltaX,
-                          (This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
-                          RowInfoArray[0].LineWidth,
-                          RowInfoArray[0].LineHeight,
-                          Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
-                          );
-    }
-
-    FreePool (RowInfoArray);
-    FreePool (Blt->Image.Bitmap);
   } else {
     Status = EFI_UNSUPPORTED;
   }
@@ -1913,7 +1660,6 @@ FlushCursor (
   INTN                                GlyphX;
   INTN                                GlyphY;
   EFI_GRAPHICS_OUTPUT_PROTOCOL        *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL               *UgaDraw;
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Foreground;
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Background;
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION BltChar[EFI_GLYPH_HEIGHT][EFI_GLYPH_WIDTH];
@@ -1928,7 +1674,6 @@ FlushCursor (
 
   Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
   GraphicsOutput = Private->GraphicsOutput;
-  UgaDraw = Private->UgaDraw;
 
   //
   // In this driver, only narrow character was supported.
@@ -1951,19 +1696,6 @@ FlushCursor (
               EFI_GLYPH_HEIGHT,
               EFI_GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
               );
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    UgaDraw->Blt (
-              UgaDraw,
-              (EFI_UGA_PIXEL *) (UINTN) BltChar,
-              EfiUgaVideoToBltBuffer,
-              GlyphX,
-              GlyphY,
-              0,
-              0,
-              EFI_GLYPH_WIDTH,
-              EFI_GLYPH_HEIGHT,
-              EFI_GLYPH_WIDTH * sizeof (EFI_UGA_PIXEL)
-              );
   }
 
   GetTextColors (This, &Foreground.Pixel, &Background.Pixel);
@@ -1992,19 +1724,6 @@ FlushCursor (
               EFI_GLYPH_HEIGHT,
               EFI_GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
               );
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
-    UgaDraw->Blt (
-              UgaDraw,
-              (EFI_UGA_PIXEL *) (UINTN) BltChar,
-              EfiUgaBltBufferToVideo,
-              0,
-              0,
-              GlyphX,
-              GlyphY,
-              EFI_GLYPH_WIDTH,
-              EFI_GLYPH_HEIGHT,
-              EFI_GLYPH_WIDTH * sizeof (EFI_UGA_PIXEL)
-              );
   }
 
   return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
index 28d47ac7cb1e..de10e133809a 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
@@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Uefi.h>
 #include <Protocol/SimpleTextOut.h>
 #include <Protocol/GraphicsOutput.h>
-#include <Protocol/UgaDraw.h>
 #include <Protocol/DevicePath.h>
 #include <Library/DebugLib.h>
 #include <Library/UefiDriverEntryPoint.h>
@@ -60,7 +59,6 @@ typedef struct {
 typedef struct {
   UINTN                            Signature;
   EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL            *UgaDraw;
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  SimpleTextOutput;
   EFI_SIMPLE_TEXT_OUTPUT_MODE      SimpleTextOutputMode;
   GRAPHICS_CONSOLE_MODE_DATA       *ModeData;
@@ -422,9 +420,8 @@ GraphicsConsoleConOutEnableCursor (
 /**
   Test to see if Graphics Console could be supported on the Controller.
 
-  Graphics Console could be supported if Graphics Output Protocol or UGA Draw
-  Protocol exists on the Controller. (UGA Draw Protocol could be skipped
-  if PcdUgaConsumeSupport is set to FALSE.)
+  Graphics Console could be supported if Graphics Output Protocol
+  exists on the Controller.
 
   @param  This                Protocol instance pointer.
   @param  Controller          Handle of device to test.
@@ -445,9 +442,8 @@ GraphicsConsoleControllerDriverSupported (
 
 
 /**
-  Start this driver on Controller by opening Graphics Output protocol or
-  UGA Draw protocol, and installing Simple Text Out protocol on Controller.
-  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
+  Start this driver on Controller by opening Graphics Output protocol
+  and installing Simple Text Out protocol on Controller.
 
   @param  This                 Protocol instance pointer.
   @param  Controller           Handle of device to bind driver to
@@ -468,9 +464,7 @@ GraphicsConsoleControllerDriverStart (
 
 /**
   Stop this driver on Controller by removing Simple Text Out protocol
-  and closing the Graphics Output Protocol or UGA Draw protocol on Controller.
-  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
-
+  and closing the Graphics Output Protocol on Controller.
 
   @param  This              Protocol instance pointer.
   @param  Controller        Handle of device to stop driver on
@@ -534,8 +528,7 @@ GetTextColors (
   @param  Count                 The count of Unicode string.
 
   @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.
-  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw
-                                protocol exist.
+  @retval EFI_UNSUPPORTED       If no Graphics Output protocol exist.
   @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.
 
 **/
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
index bcfd306eee13..975871b76d05 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
@@ -2,7 +2,7 @@
 #  Console support on graphic devices.
 #
 #  This driver will install Simple Text Output protocol by consuming Graphices Output
-#  protocol or UGA Draw protocol on graphic devices.
+#  protocol on graphic devices.
 #
 #  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -53,15 +53,11 @@ [Protocols]
   gEfiDevicePathProtocolGuid                    ## TO_START
   gEfiSimpleTextOutProtocolGuid                 ## BY_START
   gEfiGraphicsOutputProtocolGuid                ## TO_START
-  gEfiUgaDrawProtocolGuid                       ## TO_START
   gEfiHiiFontProtocolGuid                       ## TO_START
   ## TO_START
   ## NOTIFY
   gEfiHiiDatabaseProtocolGuid
 
-[FeaturePcd]
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
-
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution   ## SOMETIMES_CONSUMES
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.uni b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.uni
index aec5d57f9038..45dbb24c8bca 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.uni
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.uni
@@ -2,7 +2,7 @@
 // Console support on graphic devices.
 //
 // This driver will install Simple Text Output protocol by consuming Graphices Output
-// protocol or UGA Draw protocol on graphic devices.
+// protocol on graphic devices.
 //
 // Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
 //
@@ -14,5 +14,5 @@
 #string STR_MODULE_ABSTRACT             #language en-US "Console support on graphic devices"
 
 #string STR_MODULE_DESCRIPTION          #language en-US "This driver will install SimpleTextOutputProtocol by consuming GraphicesOutput\n"
-                                                        "Protocol or UgaDrawProtocol on graphics devices."
+                                                        "Protocol on graphics devices."
 
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index a108fc6157a2..57f6fad15ea3 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -1381,7 +1381,7 @@ HiiDrawImage (
     //
     if ((Flags & EFI_HII_DIRECT_TO_SCREEN) == EFI_HII_DIRECT_TO_SCREEN) {
       //
-      // Caller should make sure the current UGA console is grarphic mode.
+      // Caller should make sure the current console is grarphic mode.
       //
 
       //
-- 
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 ` [PATCH 05/18] MdeModulePkg/ConSplitterDxe: " Guomin Jiang
2020-05-08  8:38 ` Guomin Jiang [this message]
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-7-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