From nobody Mon Feb 9 23:38:47 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+91399+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+91399+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1657849969; cv=none; d=zohomail.com; s=zohoarc; b=FqU6926+cnMmZJINlVnncmxaOCBY1QQEmd4jJGgm4A4jg8iYuQfucLitvxmMFsQNhA+6rCjg3z14vB/OIl3wyTXzATmONG8r6438inmoHyipp+UShoBbeIpYT9FZXV1GoH6b6ZrfPyhjW/ynDdbmUUZ6aQ4nr5ida1n2NHKAsEA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657849969; 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=EG15MEEvHYo54gNfrVbgMScwNv4i2d8eOv2GxcI5dNM=; b=k91uNMSccH8fkuJt6xbMgDu4q+9TkaYYLtBPzCSIfiWIaarYomosVo1xkQRa+kyCkSzOcSboeLX4jxlcSS/SHkVwQqlkip2cGzFzeeV/Y7VL9PUg3z2q5MlR3dlGUOqQVf6GP+NlKKyKevFsZE9Sb6AcidNO69rQWkf9XdZeDDI= 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+91399+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 1657849969872722.9398198562525; Thu, 14 Jul 2022 18:52:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 8XPzYY1788612xzIrX0U0Sw1; Thu, 14 Jul 2022 18:52:49 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.1854.1657849968056452145 for ; Thu, 14 Jul 2022 18:52:48 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="347355573" X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="347355573" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 18:51:31 -0700 X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="923318657" X-Received: from guominji-mobl1.ccr.corp.intel.com ([10.238.11.184]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 18:51:29 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Andrew Fish , Ray Ni Subject: [edk2-devel] [Patch v2 04/11] EmulatorPkg: Remove All UGA Support Date: Fri, 15 Jul 2022 09:50:59 +0800 Message-Id: <20220715015106.1553-5-guomin.jiang@intel.com> In-Reply-To: <20220715015106.1553-1-guomin.jiang@intel.com> References: <20220715015106.1553-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: kI9bSqv8G96XNfR6gbX1rIFSx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1657849969; bh=1Or/MOi8l4gTjSd/WU0z9gMFV3FWH9o5t5B4xUCo1ro=; h=Cc:Date:From:Reply-To:Subject:To; b=ahsMU0R1kGpoT7IBnNMHVgF1mNorDOBi7Ma3SNTUKmWaFQmcqO1Ht0ybpgD0x4+IjmW 0wbxidN8AHws1nsR/zuvZJHfNGW9ZCFLHYmsYxtCRP+r3lniHxZ5ucHFddt2uMVuW0TSt J68MpgSEtLT6+jY528Qy6kSPvvVJUT2XQh0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1657849970240100020 Content-Type: text/plain; charset="utf-8" From: GuoMinJ REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2368 Remove All UGA Support in EmulatorPkg. Signed-off-by: Guomin Jiang Cc: Andrew Fish Cc: Ray Ni Reviewed-by: Ray Ni --- EmulatorPkg/EmuGopDxe/Gop.h | 10 +-- EmulatorPkg/EmuGopDxe/GopScreen.c | 14 ++-- EmulatorPkg/Include/Protocol/EmuFileSystem.h | 24 +++--- .../Include/Protocol/EmuGraphicsWindow.h | 18 ++-- .../Library/PlatformBmLib/PlatformBm.h | 4 +- .../Library/PlatformBmLib/PlatformBmData.c | 6 +- EmulatorPkg/Unix/Host/Gasket.h | 12 +-- EmulatorPkg/Unix/Host/Host.h | 3 +- EmulatorPkg/Unix/Host/Ia32/Gasket.S | 2 +- EmulatorPkg/Unix/Host/X11GraphicsWindow.c | 82 +++++++++---------- EmulatorPkg/Unix/Host/X64/Gasket.S | 2 +- EmulatorPkg/Win/Host/WinGopScreen.c | 10 +-- 12 files changed, 92 insertions(+), 95 deletions(-) diff --git a/EmulatorPkg/EmuGopDxe/Gop.h b/EmulatorPkg/EmuGopDxe/Gop.h index 7f7dc4e8eb9f..59ebfda912eb 100644 --- a/EmulatorPkg/EmuGopDxe/Gop.h +++ b/EmulatorPkg/EmuGopDxe/Gop.h @@ -1,13 +1,13 @@ /*++ @file =20 -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2010,Apple Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 -#ifndef __UGA_H_ -#define __UGA_H_ +#ifndef GOP_H_ +#define GOP_H_ =20 #include =20 @@ -60,8 +60,6 @@ typedef struct { extern EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding; extern EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName; =20 -#define EMU_UGA_CLASS_NAME L"EmuGopWindow" - #define GOP_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('G', 'o', 'p', 'N') typedef struct { UINT64 Signature; @@ -83,7 +81,7 @@ typedef struct { GOP_MODE_DATA *ModeData; =20 // - // UGA Private Data knowing when to start hardware + // Private Data knowing when to start hardware // BOOLEAN HardwareNeedsStarting; =20 diff --git a/EmulatorPkg/EmuGopDxe/GopScreen.c b/EmulatorPkg/EmuGopDxe/GopS= creen.c index 88d95b88e162..113b496861b4 100644 --- a/EmulatorPkg/EmuGopDxe/GopScreen.c +++ b/EmulatorPkg/EmuGopDxe/GopScreen.c @@ -10,7 +10,7 @@ Module Name: =20 Abstract: =20 - This file produces the graphics abstration of UGA. It is called by + This file produces the graphics abstration of GOP. It is called by EmuGopDriver.c file which deals with the EFI 1.1 driver model. This file just does graphics. =20 @@ -209,7 +209,7 @@ EmuGopBlt ( // the number of bytes in each row can be computed. // if (Delta =3D=3D 0) { - Delta =3D Width * sizeof (EFI_UGA_PIXEL); + Delta =3D Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); } =20 // @@ -220,8 +220,8 @@ EmuGopBlt ( OriginalTPL =3D gBS->RaiseTPL (TPL_NOTIFY); =20 // - // Pack UGA Draw protocol parameters to EMU_GRAPHICS_WINDOWS__BLT_ARGS s= tructure to adapt to - // GopBlt() API of Unix UGA IO protocol. + // Pack GOP protocol parameters to EMU_GRAPHICS_WINDOWS__BLT_ARGS struct= ure to adapt to + // GopBlt() API of GOP protocol. // GopBltArgs.DestinationX =3D DestinationX; GopBltArgs.DestinationY =3D DestinationY; @@ -232,8 +232,8 @@ EmuGopBlt ( GopBltArgs.Delta =3D Delta; Status =3D Private->EmuGraphicsWindow->Blt ( Private->EmuGrap= hicsWindow, - (EFI_UGA_PIXEL *= )BltBuffer, - (EFI_UGA_BLT_OPE= RATION)BltOperation, + BltBuffer, + BltOperation, &GopBltArgs ); =20 @@ -384,7 +384,7 @@ ShutdownGopEvent ( =20 Routine Description: =20 - This is the UGA screen's callback notification function for exit-boot-se= rvices. + This is the screen's callback notification function for exit-boot-servic= es. All we do here is call EmuGopDestructor(). =20 Arguments: diff --git a/EmulatorPkg/Include/Protocol/EmuFileSystem.h b/EmulatorPkg/Inc= lude/Protocol/EmuFileSystem.h index 15de43ac022e..062508fafc9d 100644 --- a/EmulatorPkg/Include/Protocol/EmuFileSystem.h +++ b/EmulatorPkg/Include/Protocol/EmuFileSystem.h @@ -7,19 +7,19 @@ =20 UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSyst= em. =20 -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 -#ifndef _EMU_UGA_IO_H_ -#define _EMU_UGA_IO_H_ +#ifndef EMU_GRAPHICS_WINDOW_H_ +#define EMU_GRAPHICS_WINDOW_H_ =20 #include #include #include -#include +#include =20 #define EMU_GRAPHICS_WINDOW_PROTOCOL_GUID \ { 0x30FD316A, 0x6728, 0x2E41, { 0xA6, 0x90, 0x0D, 0x13, 0x33, 0xD8, 0xCA,= 0xC1 } } @@ -29,13 +29,13 @@ typedef struct _EMU_GRAPHICS_WINDOW_PROTOCOL EMU_GRAPHI= CS_WINDOW_PROTOCOL; typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CLOSE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows ); =20 typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, UINT32 Width, UINT32 Height ); @@ -43,13 +43,13 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CHECK_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows ); =20 typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, EFI_KEY_DATA *key ); =20 @@ -88,10 +88,10 @@ typedef struct { typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_BLT)( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ); =20 typedef diff --git a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h b/EmulatorPkg= /Include/Protocol/EmuGraphicsWindow.h index 7c495b25eb1b..ed7b71611f90 100644 --- a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h +++ b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h @@ -6,13 +6,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 -#ifndef _EMU_UGA_IO_H_ -#define _EMU_UGA_IO_H_ +#ifndef EMU_GRAPHICS_WINDOW_H_ +#define EMU_GRAPHICS_WINDOW_H_ =20 #include #include #include -#include +#include =20 #define EMU_GRAPHICS_WINDOW_PROTOCOL_GUID \ { 0x30FD316A, 0x6728, 0x2E41, { 0xA6, 0x90, 0x0D, 0x13, 0x33, 0xD8, 0xCA,= 0xC1 } } @@ -22,13 +22,13 @@ typedef struct _EMU_GRAPHICS_WINDOW_PROTOCOL EMU_GRAPHI= CS_WINDOW_PROTOCOL; typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CLOSE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow ); =20 typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow, UINT32 Width, UINT32 Height ); @@ -36,13 +36,13 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_CHECK_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow ); =20 typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)( - EMU_GRAPHICS_WINDOW_PROTOCOL *Uga, + EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindow, EFI_KEY_DATA *key ); =20 @@ -83,8 +83,8 @@ typedef EFI_STATUS (EFIAPI *EMU_GRAPHICS_WINDOWS_BLT)( IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ); =20 diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h b/EmulatorPkg/L= ibrary/PlatformBmLib/PlatformBm.h index b89ffd77e4de..462049e2b048 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBm.h @@ -1,6 +1,6 @@ /*++ @file =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -60,7 +60,7 @@ typedef struct { EMU_VENDOR_DEVICE_PATH_NODE EmuBus; EMU_VENDOR_DEVICE_PATH_NODE EmuGraphicsWindow; EFI_DEVICE_PATH_PROTOCOL End; -} EMU_PLATFORM_UGA_DEVICE_PATH; +} EMU_PLATFORM_GRAPHICS_WINDOW_DEVICE_PATH; =20 // // Platform BDS Functions diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c b/EmulatorP= kg/Library/PlatformBmLib/PlatformBmData.c index efb03def37eb..b69c4728d1a7 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c @@ -1,6 +1,6 @@ /*++ @file =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -8,7 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include "PlatformBm.h" =20 -EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath =3D { +EMU_PLATFORM_GRAPHICS_WINDOW_DEVICE_PATH gGopDevicePath =3D { { { { @@ -40,7 +40,7 @@ EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath =3D { gEndEntire }; =20 -EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath2 =3D { +EMU_PLATFORM_GRAPHICS_WINDOW_DEVICE_PATH gGopDevicePath2 =3D { { { { diff --git a/EmulatorPkg/Unix/Host/Gasket.h b/EmulatorPkg/Unix/Host/Gasket.h index 6dafc903cfce..1ffdfb334524 100644 --- a/EmulatorPkg/Unix/Host/Gasket.h +++ b/EmulatorPkg/Unix/Host/Gasket.h @@ -1,7 +1,7 @@ /** @file =20 Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
- Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2022, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -200,7 +200,7 @@ ReverseGasketUint64Uint64 ( ); =20 // -// Gasket functions for EFI_EMU_UGA_IO_PROTOCOL +// Gasket functions for EFI_EMU_GRAPHICS_WINDOW_PROTOCOL // =20 EFI_STATUS @@ -243,10 +243,10 @@ GasketX11RegisterKeyNotify ( EFI_STATUS EFIAPI GasketX11Blt ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ); =20 EFI_STATUS diff --git a/EmulatorPkg/Unix/Host/Host.h b/EmulatorPkg/Unix/Host/Host.h index 0c81cdfc01f5..ff30f5dce567 100644 --- a/EmulatorPkg/Unix/Host/Host.h +++ b/EmulatorPkg/Unix/Host/Host.h @@ -1,6 +1,6 @@ /*++ @file =20 -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent @@ -106,7 +106,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include -#include #include =20 #include diff --git a/EmulatorPkg/Unix/Host/Ia32/Gasket.S b/EmulatorPkg/Unix/Host/Ia= 32/Gasket.S index 36197ff26028..6fcdd265cf30 100644 --- a/EmulatorPkg/Unix/Host/Ia32/Gasket.S +++ b/EmulatorPkg/Unix/Host/Ia32/Gasket.S @@ -371,7 +371,7 @@ ASM_PFX(GasketSecEmuThunkAddress): ret =20 // -// Gasket functions for EFI_EMU_UGA_IO_PROTOCOL +// Gasket functions for EFI_EMU_GRAPHICS_WINDOW_PROTOCOL // =20 ASM_GLOBAL ASM_PFX(GasketX11Size) diff --git a/EmulatorPkg/Unix/Host/X11GraphicsWindow.c b/EmulatorPkg/Unix/H= ost/X11GraphicsWindow.c index a30cc19dbe0a..b3880e198855 100644 --- a/EmulatorPkg/Unix/Host/X11GraphicsWindow.c +++ b/EmulatorPkg/Unix/Host/X11GraphicsWindow.c @@ -1,6 +1,6 @@ /*++ @file =20 -Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2022, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent @@ -700,8 +700,8 @@ HandleEvents ( =20 unsigned long X11PixelToColor ( - IN GRAPHICS_IO_PRIVATE *Drv, - IN EFI_UGA_PIXEL pixel + IN GRAPHICS_IO_PRIVATE *Drv, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel ) { return ((pixel.Red >> Drv->r.csize) << Drv->r.shift) @@ -709,15 +709,15 @@ X11PixelToColor ( | ((pixel.Blue >> Drv->b.csize) << Drv->b.shift); } =20 -EFI_UGA_PIXEL +EFI_GRAPHICS_OUTPUT_BLT_PIXEL X11ColorToPixel ( IN GRAPHICS_IO_PRIVATE *Drv, IN unsigned long val ) { - EFI_UGA_PIXEL Pixel; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; =20 - memset (&Pixel, 0, sizeof (EFI_UGA_PIXEL)); + memset (&Pixel, 0, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); =20 // Truncation not an issue since X11 and EFI are both using 8 bits per c= olor Pixel.Red =3D (val >> Drv->r.shift) << Drv->r.csize; @@ -782,7 +782,7 @@ X11KeySetState ( if ((Drv->KeyState.KeyToggleState & EFI_CAPS_LOCK_ACTIVE) =3D=3D 0) { // // We could create an XKeyEvent and send a XK_Caps_Lock to - // the UGA/GOP Window + // the GOP Window // } } @@ -812,32 +812,32 @@ X11RegisterKeyNotify ( =20 EFI_STATUS X11Blt ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ) { - GRAPHICS_IO_PRIVATE *Private; - UINTN DstY; - UINTN SrcY; - UINTN DstX; - UINTN SrcX; - UINTN Index; - EFI_UGA_PIXEL *Blt; - UINT8 *Dst; - UINT8 *Src; - UINTN Nbr; - unsigned long Color; - XEvent ev; + GRAPHICS_IO_PRIVATE *Private; + UINTN DstY; + UINTN SrcY; + UINTN DstX; + UINTN SrcX; + UINTN Index; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt; + UINT8 *Dst; + UINT8 *Src; + UINTN Nbr; + unsigned long Color; + XEvent ev; =20 Private =3D (GRAPHICS_IO_PRIVATE *)GraphicsIo; =20 // // Check bounds // - if ( (BltOperation =3D=3D EfiUgaVideoToBltBuffer) - || (BltOperation =3D=3D EfiUgaVideoToVideo)) + if ( (BltOperation =3D=3D EfiBltVideoToBltBuffer) + || (BltOperation =3D=3D EfiBltVideoToVideo)) { // // Source is Video. @@ -851,9 +851,9 @@ X11Blt ( } } =20 - if ( (BltOperation =3D=3D EfiUgaBltBufferToVideo) - || (BltOperation =3D=3D EfiUgaVideoToVideo) - || (BltOperation =3D=3D EfiUgaVideoFill)) + if ( (BltOperation =3D=3D EfiBltBufferToVideo) + || (BltOperation =3D=3D EfiBltVideoToVideo) + || (BltOperation =3D=3D EfiBltVideoFill)) { // // Destination is Video @@ -868,32 +868,32 @@ X11Blt ( } =20 switch (BltOperation) { - case EfiUgaVideoToBltBuffer: - Blt =3D (EFI_UGA_PIXEL *)((UINT8 *)BltBuffer + (Args->Desti= nationY * Args->Delta) + Args->DestinationX * sizeof (EFI_UGA_PIXEL)); - Args->Delta -=3D Args->Width * sizeof (EFI_UGA_PIXEL); + case EfiBltVideoToBltBuffer: + Blt =3D (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)BltBuffe= r + (Args->DestinationY * Args->Delta) + Args->DestinationX * sizeof (EFI_G= RAPHICS_OUTPUT_BLT_PIXEL)); + Args->Delta -=3D Args->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL= ); for (SrcY =3D Args->SourceY; SrcY < (Args->Height + Args->SourceY); = SrcY++) { for (SrcX =3D Args->SourceX; SrcX < (Args->Width + Args->SourceX);= SrcX++) { *Blt++ =3D X11ColorToPixel (Private, XGetPixel (Private->image, = SrcX, SrcY)); } =20 - Blt =3D (EFI_UGA_PIXEL *)((UINT8 *)Blt + Args->Delta); + Blt =3D (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)Blt + Args->Del= ta); } =20 break; - case EfiUgaBltBufferToVideo: - Blt =3D (EFI_UGA_PIXEL *)((UINT8 *)BltBuffer + (Args->Sourc= eY * Args->Delta) + Args->SourceX * sizeof (EFI_UGA_PIXEL)); - Args->Delta -=3D Args->Width * sizeof (EFI_UGA_PIXEL); + case EfiBltBufferToVideo: + Blt =3D (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)BltBuffe= r + (Args->SourceY * Args->Delta) + Args->SourceX * sizeof (EFI_GRAPHICS_OU= TPUT_BLT_PIXEL)); + Args->Delta -=3D Args->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL= ); for (DstY =3D Args->DestinationY; DstY < (Args->Height + Args->Desti= nationY); DstY++) { for (DstX =3D Args->DestinationX; DstX < (Args->Width + Args->Dest= inationX); DstX++) { XPutPixel (Private->image, DstX, DstY, X11PixelToColor (Private,= *Blt)); Blt++; } =20 - Blt =3D (EFI_UGA_PIXEL *)((UINT8 *)Blt + Args->Delta); + Blt =3D (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)((UINT8 *)Blt + Args->Del= ta); } =20 break; - case EfiUgaVideoToVideo: + case EfiBltVideoToVideo: Dst =3D Private->image_data + (Args->DestinationX << Private->pixel_= shift) + Args->DestinationY * Private->line_bytes; Src =3D Private->image_data + (Args->SourceX << Private->pixel_shift) @@ -920,7 +920,7 @@ X11Blt ( } =20 break; - case EfiUgaVideoFill: + case EfiBltVideoFill: Color =3D X11PixelToColor (Private, *BltBuffer); for (DstY =3D Args->DestinationY; DstY < (Args->Height + Args->Desti= nationY); DstY++) { for (DstX =3D Args->DestinationX; DstX < (Args->Width + Args->Dest= inationX); DstX++) { @@ -937,7 +937,7 @@ X11Blt ( // Refresh screen. // switch (BltOperation) { - case EfiUgaVideoToVideo: + case EfiBltVideoToVideo: XCopyArea ( Private->display, Private->win, @@ -960,7 +960,7 @@ X11Blt ( } =20 break; - case EfiUgaVideoFill: + case EfiBltVideoFill: Color =3D X11PixelToColor (Private, *BltBuffer); XSetForeground (Private->display, Private->gc, Color); XFillRectangle ( @@ -974,7 +974,7 @@ X11Blt ( ); XFlush (Private->display); break; - case EfiUgaBltBufferToVideo: + case EfiBltBufferToVideo: Redraw (Private, Args->DestinationX, Args->DestinationY, Args->Width= , Args->Height); break; default: diff --git a/EmulatorPkg/Unix/Host/X64/Gasket.S b/EmulatorPkg/Unix/Host/X64= /Gasket.S index 030faa8e4c36..1b4614ab618d 100644 --- a/EmulatorPkg/Unix/Host/X64/Gasket.S +++ b/EmulatorPkg/Unix/Host/X64/Gasket.S @@ -427,7 +427,7 @@ ASM_PFX(GasketSecEmuThunkAddress): ret =20 // -// Gasket functions for EFI_EMU_UGA_IO_PROTOCOL +// Gasket functions for EFI_EMU_GRAPHICS_WINDOW_PROTOCOL // =20 ASM_GLOBAL ASM_PFX(GasketX11Size) diff --git a/EmulatorPkg/Win/Host/WinGopScreen.c b/EmulatorPkg/Win/Host/Win= GopScreen.c index 661573d7771c..69abcfc79564 100644 --- a/EmulatorPkg/Win/Host/WinGopScreen.c +++ b/EmulatorPkg/Win/Host/WinGopScreen.c @@ -1,6 +1,6 @@ /** @file =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 Module Name: @@ -396,10 +396,10 @@ WinNtWndSize ( // TODO: Delta - add argument and description to function comment EFI_STATUS WinNtWndBlt ( - IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args + IN EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsIo, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args ) { RETURN_STATUS RStatus; --=20 2.26.2.windows.1 -=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 (#91399): https://edk2.groups.io/g/devel/message/91399 Mute This Topic: https://groups.io/mt/92393247/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-