From nobody Mon Feb 9 02:12:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+85685+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+85685+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1642121487; cv=none; d=zohomail.com; s=zohoarc; b=IqAC3DpIn2HIk0WjJRY5RSIcpkj1RM79gDc+9KW20/zJ84JRR7YODAcOYG4QD7t53fGintKjObyAWlksrcK4bAJAo54kS8S6cp7rvXf+m46MX+FPmtif4LUlWHkYqxU5lkH5L3foqSULDflFq7Hw5pzU4Tm09rrqHZYT4pQH9CA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642121487; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=WlzVOAhpokXZL6TtJ0sLbGBpAtOdX2A28HnXDu28vOI=; b=l3WGTscka6fK4cpD8Iv/AeiI88UCyMKcI2vNmsOCJdOAjq+CpNMvlnYVVKR7YC1dSn+oMEO8tJUfBwWxnmcZYusih2Yekwjc89sT/HKi9VkLo4TWva+NBppp5NOLyum4UhztK0RSfxSC4IaGdd2Bur4ePs3jkfSZHfRcegf7h74= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+85685+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1642121487299121.53251891173863; Thu, 13 Jan 2022 16:51:27 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id GfuzYY1788612xFSA8WmJuwS; Thu, 13 Jan 2022 16:51:27 -0800 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.1082.1642121466955476862 for ; Thu, 13 Jan 2022 16:51:26 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="241713886" X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="241713886" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 16:51:25 -0800 X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="475564770" X-Received: from guominji-mobl.ccr.corp.intel.com ([10.238.9.87]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 16:51:21 -0800 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Jian J Wang , Liming Gao , Zhichao Gao , Ray Ni , Dandan Bi , Eric Dong Subject: [edk2-devel] [PATCH 08/11] MdeModulePkg/GraphicsConsoleDxe: Remove All UGA Support Date: Fri, 14 Jan 2022 08:50:41 +0800 Message-Id: <20220114005044.1975-9-guomin.jiang@intel.com> In-Reply-To: <20220114005044.1975-1-guomin.jiang@intel.com> References: <20220114005044.1975-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: c21hXr2rGffNMYfk1tp7VPXJx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1642121487; bh=cortruKuwtXWkd6BKg31Ksv1leeCNCGS0to3WxrtURQ=; h=Cc:Date:From:Reply-To:Subject:To; b=Xw0sOdTPRCKIGGF/5yrt6tciTrx6aBcXt3rXnAcZtDHMPaOkIP0Eg3o9LjDQQaWHtZo onQID6Cqe8cOvPguZnaCzSXt82VMwUG/f3tWAOVlXBTyW5p0ZBaG0YEO9t+UvCa1EFIyr ygqwnhs8+7DaHjP/6nV48jXxQn9GZoa+DHk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1642121488849100003 Content-Type: text/plain; charset="utf-8" From: GuoMinJ REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2368 Remove All UGA Support in GraphicsConsoleDxe, remove comment about UGA in HiiDatabaseDxe. Signed-off-by: Guomin Jiang Cc: Jian J Wang Cc: Liming Gao Cc: Zhichao Gao Cc: Ray Ni Cc: Dandan Bi Cc: Eric Dong --- .../GraphicsConsoleDxe/GraphicsConsoleDxe.inf | 8 +- .../GraphicsConsoleDxe/GraphicsConsole.h | 21 +- .../GraphicsConsoleDxe/GraphicsConsole.c | 302 +----------------- MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 4 +- .../GraphicsConsoleDxe/GraphicsConsoleDxe.uni | 6 +- 5 files changed, 24 insertions(+), 317 deletions(-) diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= oleDxe.inf b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= oleDxe.inf index bcfd306eee13..67c6e878efbb 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.= inf +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.= inf @@ -2,9 +2,9 @@ # Console support on graphic devices. # # This driver will install Simple Text Output protocol by consuming Graph= ices Output -# protocol or UGA Draw protocol on graphic devices. +# protocol on graphic devices. # -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
# 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 =20 -[FeaturePcd] - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES - [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## SOMETIMES= _CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution ## SOMETIMES= _CONSUMES diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= ole.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h index e4abad40f49a..ab700f31aa97 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h @@ -1,7 +1,7 @@ /** @file Header file for GraphicsConsole driver. =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include -#include #include #include #include @@ -59,7 +58,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; @@ -417,9 +415,8 @@ GraphicsConsoleConOutEnableCursor ( /** Test to see if Graphics Console could be supported on the Controller. =20 - Graphics Console could be supported if Graphics Output Protocol or UGADr= aw - 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. =20 @param This Protocol instance pointer. @param Controller Handle of device to test. @@ -439,9 +436,8 @@ GraphicsConsoleControllerDriverSupported ( ); =20 /** - 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 FA= LSE.) + Start this driver on Controller by opening Graphics Output protocol + and installing Simple Text Out protocol on Controller. =20 @param This Protocol instance pointer. @param Controller Handle of device to bind driver to @@ -462,9 +458,7 @@ GraphicsConsoleControllerDriverStart ( =20 /** Stop this driver on Controller by removing Simple Text Out protocol - and closing the Graphics Output Protocol or UGA Draw protocol on Control= ler. - (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FA= LSE.) - + and closing the Graphics Output Protocol on Controller. =20 @param This Protocol instance pointer. @param Controller Handle of device to stop driver on @@ -526,8 +520,7 @@ GetTextColors ( @param Count The count of Unicode string. =20 @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 success= fully. =20 **/ diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= ole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index 8f0cba9fcde9..65196e16d8f4 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -1,7 +1,7 @@ /** @file This is the main routine for initializing the Graphics Console support r= outines. =20 -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -14,7 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent GRAPHICS_CONSOLE_DEV mGraphicsConsoleDevTemplate =3D { GRAPHICS_CONSOLE_DEV_SIGNATURE, (EFI_GRAPHICS_OUTPUT_PROTOCOL *)NULL, - (EFI_UGA_DRAW_PROTOCOL *)NULL, { GraphicsConsoleConOutReset, GraphicsConsoleConOutOutputString, @@ -101,9 +100,8 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBind= ing =3D { /** Test to see if Graphics Console could be supported on the Controller. =20 - Graphics Console could be supported if Graphics Output Protocol or UGA D= raw - 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. =20 @param This Protocol instance pointer. @param Controller Handle of device to test. @@ -124,11 +122,9 @@ GraphicsConsoleControllerDriverSupported ( { EFI_STATUS Status; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; EFI_DEVICE_PATH_PROTOCOL *DevicePath; =20 GraphicsOutput =3D NULL; - UgaDraw =3D NULL; // // Open the IO Abstraction(s) needed to perform the supported test // @@ -140,21 +136,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 =3D gBS->OpenProtocol ( - Controller, - &gEfiUgaDrawProtocolGuid, - (VOID **)&UgaDraw, - This->DriverBindingHandle, - Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER - ); - } - if (EFI_ERROR (Status)) { return Status; } @@ -199,13 +180,6 @@ GraphicsConsoleControllerDriverSupported ( This->DriverBindingHandle, Controller ); - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - gBS->CloseProtocol ( - Controller, - &gEfiUgaDrawProtocolGuid, - This->DriverBindingHandle, - Controller - ); } =20 return Status; @@ -366,9 +340,8 @@ InitializeGraphicsConsoleTextMode ( } =20 /** - 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 FA= LSE.) + Start this driver on Controller by opening Graphics Output protocol + and installing Simple Text Out protocol on Controller. =20 @param This Protocol instance pointer. @param Controller Handle of device to bind driver to @@ -391,8 +364,6 @@ GraphicsConsoleControllerDriverStart ( GRAPHICS_CONSOLE_DEV *Private; UINT32 HorizontalResolution; UINT32 VerticalResolution; - UINT32 ColorDepth; - UINT32 RefreshRate; UINT32 ModeIndex; UINTN MaxMode; UINT32 ModeNumber; @@ -429,18 +400,6 @@ GraphicsConsoleControllerDriverStart ( Controller, EFI_OPEN_PROTOCOL_BY_DRIVER ); - - if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) { - Status =3D gBS->OpenProtocol ( - Controller, - &gEfiUgaDrawProtocolGuid, - (VOID **)&Private->UgaDraw, - This->DriverBindingHandle, - Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER - ); - } - if (EFI_ERROR (Status)) { goto Error; } @@ -531,43 +490,6 @@ GraphicsConsoleControllerDriverStart ( goto Error; } } - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - // - // At first try to set user-defined resolution - // - ColorDepth =3D 32; - RefreshRate =3D 60; - Status =3D 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 =3D Private->UgaDraw->SetMode ( - Private->UgaDraw, - 800, - 600, - ColorDepth, - RefreshRate - ); - if (EFI_ERROR (Status)) { - Status =3D Private->UgaDraw->GetMode ( - Private->UgaDraw, - &HorizontalResolution, - &VerticalResolution, - &ColorDepth, - &RefreshRate - ); - if (EFI_ERROR (Status)) { - goto Error; - } - } - } } =20 DEBUG ((DEBUG_INFO, "GraphicsConsole video resolution %d x %d\n", Horizo= ntalResolution, VerticalResolution)); @@ -635,7 +557,7 @@ GraphicsConsoleControllerDriverStart ( Error: if (EFI_ERROR (Status)) { // - // Close the GOP and UGA Draw Protocol + // Close the GOP // if (Private->GraphicsOutput !=3D NULL) { gBS->CloseProtocol ( @@ -644,13 +566,6 @@ GraphicsConsoleControllerDriverStart ( This->DriverBindingHandle, Controller ); - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - gBS->CloseProtocol ( - Controller, - &gEfiUgaDrawProtocolGuid, - This->DriverBindingHandle, - Controller - ); } =20 if (Private->LineBuffer !=3D NULL) { @@ -672,9 +587,7 @@ GraphicsConsoleControllerDriverStart ( =20 /** Stop this driver on Controller by removing Simple Text Out protocol - and closing the Graphics Output Protocol or UGA Draw protocol on Control= ler. - (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FA= LSE.) - + and closing the Graphics Output Protocol on Controller. =20 @param This Protocol instance pointer. @param Controller Handle of device to stop driver on @@ -723,7 +636,7 @@ GraphicsConsoleControllerDriverStop ( =20 if (!EFI_ERROR (Status)) { // - // Close the GOP or UGA IO Protocol + // Close the GOP Protocol // if (Private->GraphicsOutput !=3D NULL) { gBS->CloseProtocol ( @@ -732,13 +645,6 @@ GraphicsConsoleControllerDriverStop ( This->DriverBindingHandle, Controller ); - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - gBS->CloseProtocol ( - Controller, - &gEfiUgaDrawProtocolGuid, - This->DriverBindingHandle, - Controller - ); } =20 if (Private->LineBuffer !=3D NULL) { @@ -930,7 +836,6 @@ GraphicsConsoleConOutOutputString ( { GRAPHICS_CONSOLE_DEV *Private; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; INTN Mode; UINTN MaxColumn; UINTN MaxRow; @@ -964,7 +869,6 @@ GraphicsConsoleConOutOutputString ( Mode =3D This->Mode->Mode; Private =3D GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This); GraphicsOutput =3D Private->GraphicsOutput; - UgaDraw =3D Private->UgaDraw; =20 MaxColumn =3D Private->ModeData[Mode].Columns; MaxRow =3D Private->ModeData[Mode].Rows; @@ -1052,38 +956,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++; @@ -1317,19 +1189,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; =20 OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY); =20 Private =3D GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This); GraphicsOutput =3D Private->GraphicsOutput; - UgaDraw =3D Private->UgaDraw; =20 // // Make sure the requested mode number is supported @@ -1363,7 +1229,7 @@ GraphicsConsoleConOutSetMode ( } =20 // - // Otherwise, the size of the text console and/or the GOP/UGA mode wil= l 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); @@ -1419,51 +1285,6 @@ GraphicsConsoleConOutSetMode ( 0 ); } - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - // - // Get the current UGA Draw mode information - // - Status =3D UgaDraw->GetMode ( - UgaDraw, - &HorizontalResolution, - &VerticalResolution, - &ColorDepth, - &RefreshRate - ); - if (EFI_ERROR (Status) || (HorizontalResolution !=3D ModeData->GopWidt= h) || (VerticalResolution !=3D ModeData->GopHeight)) { - // - // Either no graphics mode is currently set, or it is set to the wro= ng resolution, so set the new graphics mode - // - Status =3D 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 =3D UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *)(UINTN)&mGraphicsEfiColors[0], - EfiUgaVideoFill, - 0, - 0, - 0, - 0, - ModeData->GopWidth, - ModeData->GopHeight, - 0 - ); - } } =20 // @@ -1555,7 +1376,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; @@ -1571,7 +1391,6 @@ GraphicsConsoleConOutClearScreen ( =20 Private =3D GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This); GraphicsOutput =3D Private->GraphicsOutput; - UgaDraw =3D Private->UgaDraw; ModeData =3D &(Private->ModeData[This->Mode->Mode]); =20 GetTextColors (This, &Foreground, &Background); @@ -1588,19 +1407,6 @@ GraphicsConsoleConOutClearScreen ( ModeData->GopHeight, 0 ); - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - Status =3D UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *)(UINTN)&Background, - EfiUgaVideoFill, - 0, - 0, - 0, - 0, - ModeData->GopWidth, - ModeData->GopHeight, - 0 - ); } else { Status =3D EFI_UNSUPPORTED; } @@ -1761,7 +1567,7 @@ GetTextColors ( @param Count The count of Unicode string. =20 @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 success= fully. =20 @@ -1778,9 +1584,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; =20 Private =3D GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This); Blt =3D (EFI_IMAGE_OUTPUT *)AllocateZeroPool (sizeof (EFI_IMAGE_OUTP= UT)); @@ -1832,63 +1635,6 @@ DrawUnicodeWeightAtCursorN ( NULL, NULL ); - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - // - // If Graphics Output protocol cannot be found and PcdUgaConsumeSuppor= t enabled, - // using UGA Draw protocol to draw. - // - ASSERT (Private->UgaDraw !=3D NULL); - - UgaDraw =3D Private->UgaDraw; - - Blt->Image.Bitmap =3D AllocateZeroPool (Blt->Width * Blt->Height * siz= eof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); - if (Blt->Image.Bitmap =3D=3D NULL) { - FreePool (Blt); - FreePool (String); - return EFI_OUT_OF_RESOURCES; - } - - RowInfoArray =3D NULL; - // - // StringToImage only support blt'ing image to device using GOP proto= col. If GOP is not supported in this platform, - // we ask StringToImage to print the string to blt buffer, then blt t= o device using UgaDraw. - // - Status =3D mHiiFont->StringToImage ( - mHiiFont, - EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_IGNORE_LINE_= BREAK, - String, - FontInfo, - &Blt, - This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Priv= ate->ModeData[This->Mode->Mode].DeltaX, - This->Mode->CursorRow * EFI_GLYPH_HEIGHT + Privat= e->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 printe= d). ASSERT here to make sure. - // - ASSERT (RowInfoArraySize <=3D 1); - - Status =3D UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *)Blt->Image.Bitmap, - EfiUgaBltBufferToVideo, - This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Pr= ivate->ModeData[This->Mode->Mode].DeltaX, - (This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Pri= vate->ModeData[This->Mode->Mode].DeltaY, - This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Pr= ivate->ModeData[This->Mode->Mode].DeltaX, - (This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Pri= vate->ModeData[This->Mode->Mode].DeltaY, - RowInfoArray[0].LineWidth, - RowInfoArray[0].LineHeight, - Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIX= EL) - ); - } - - FreePool (RowInfoArray); - FreePool (Blt->Image.Bitmap); } else { Status =3D EFI_UNSUPPORTED; } @@ -1931,7 +1677,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]; @@ -1946,7 +1691,6 @@ FlushCursor ( =20 Private =3D GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This); GraphicsOutput =3D Private->GraphicsOutput; - UgaDraw =3D Private->UgaDraw; =20 // // In this driver, only narrow character was supported. @@ -1969,19 +1713,6 @@ FlushCursor ( EFI_GLYPH_HEIGHT, EFI_GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PI= XEL) ); - } 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) - ); } =20 GetTextColors (This, &Foreground.Pixel, &Background.Pixel); @@ -2010,19 +1741,6 @@ FlushCursor ( EFI_GLYPH_HEIGHT, EFI_GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PI= XEL) ); - } 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) - ); } =20 return EFI_SUCCESS; diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/U= niversal/HiiDatabaseDxe/Image.c index b5b962596968..cd4e009291dc 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_IMAGE_PROTOCOL. =20 =20 -Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -1401,7 +1401,7 @@ HiiDrawImage ( // if ((Flags & EFI_HII_DIRECT_TO_SCREEN) =3D=3D 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. // =20 // diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= oleDxe.uni b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsCons= oleDxe.uni index aec5d57f9038..0dc88a1ca45f 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.= uni +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.= uni @@ -2,9 +2,9 @@ // Console support on graphic devices. // // This driver will install Simple Text Output protocol by consuming Graph= ices Output -// protocol or UGA Draw protocol on graphic devices. +// protocol on graphic devices. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -14,5 +14,5 @@ #string STR_MODULE_ABSTRACT #language en-US "Console support o= n graphic devices" =20 #string STR_MODULE_DESCRIPTION #language en-US "This driver will = install SimpleTextOutputProtocol by consuming GraphicesOutput\n" - "Protocol or UgaDr= awProtocol on graphics devices." + "Protocol on graph= ics devices." =20 --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85685): https://edk2.groups.io/g/devel/message/85685 Mute This Topic: https://groups.io/mt/88411253/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-