From nobody Mon Feb 9 16:13:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58851+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58851+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588927131; cv=none; d=zohomail.com; s=zohoarc; b=U/UrIFeivnDqrjTTaOpoo1PzxlvS7cbq5VVfpRcEkbxyOSwPvFulArYEWkQAHI5CZ8UC1NugJoOuuGyZ0lE36L1LJp+wOehIJarbEE/nBnwSchb0ugGrZ4IMGcD5xdeTblc0VDbrh8vHz4M8mXCUJrpDIngM3MP4JeeE7tn89TY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588927131; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=RApjwsKTgmUcV3vH56REqo9fcuRQfeGPu37MfUnyNTw=; b=aiCO1YCbNr5M6w2SzaKJz8uLERhY4eeLmpmSNCDOo0CevEMEXrsP7/JPqbDsMgYbaC0E+ztF/SgAGZXfMiWpC3F3F/qGnzTsWwL+8sP6SWuzU/Jav7VW4zU9Y1XKVis8WPzjhY72j7KOq2G4rOQjS6WlGg4umyq6CqS7k52xJ+s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58851+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1588927131017305.7394549384953; Fri, 8 May 2020 01:38:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id tCpkYY1788612xavb4qDKaGL; Fri, 08 May 2020 01:38:50 -0700 X-Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web12.6878.1588927126653624329 for ; Fri, 08 May 2020 01:38:48 -0700 IronPort-SDR: O0Qdljuk3p6wkX0rEOvn8QmXDDqN/PLC5xGWJGVP+85RBtYKI7WBN47cZMrSPjkBFyDj+01sld Ae966LCCfkYw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 01:38:34 -0700 IronPort-SDR: 4H8EQZocXdxKUJ8TR/ynEBWxsFTx7doglb39+f1gXNKCBcGsTyuhPz3U2ukildnpGhBi6xDDTL vAjc5Q4bjbGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,367,1583222400"; d="scan'208";a="305366584" X-Received: from guominji-mobl.ccr.corp.intel.com ([10.238.4.95]) by FMSMGA003.fm.intel.com with ESMTP; 08 May 2020 01:38:32 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Zhichao Gao , Ray Ni Subject: [edk2-devel] [PATCH 05/18] MdeModulePkg/ConSplitterDxe: Remove All UGA Support Date: Fri, 8 May 2020 16:38:11 +0800 Message-Id: <20200508083824.1785-6-guomin.jiang@intel.com> In-Reply-To: <20200508083824.1785-1-guomin.jiang@intel.com> References: <20200508083824.1785-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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: kfwFXHdrAHxbZoanwUD9ahvMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588927130; bh=6b0pR0o8dXdp1cHkjdVZgB+0TrmcrG3CI/XSJ0HJplQ=; h=Cc:Date:From:Reply-To:Subject:To; b=w5baUnFPsaWT8UpPCuMaBC1fRuyZ/juTNjXaI8OC9x64oSjwDU1N1QwKrlidYZx9EZg 3s3Cmu/9hTbMD20SC6o+1bRCL6vjqlDl1AXV1lYw8q+zrVUn1AzwTYMun4mu4Pg6wfCTa mP5fZ1zs+LSpd6xCxIce7gk0d8eVE5R1z4o= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: GuoMinJ REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2368 Remove All UGA Support in ConSplitterDxe component. Cc: Zhichao Gao Cc: Ray Ni Signed-off-by: Guomin Jiang --- .../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 =3D { FALSE }; =20 - -// -// Uga Draw Protocol Private Data template -// -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTempla= te =3D { - ConSplitterUgaDrawGetMode, - ConSplitterUgaDrawSetMode, - ConSplitterUgaDrawBlt -}; - // // Graphics Output Protocol Private Data template // @@ -155,16 +145,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVAT= E_DATA mConOut =3D { FALSE, }, =20 - { - NULL, - NULL, - NULL - }, - 0, - 0, - 0, - 0, - { NULL, NULL, @@ -173,7 +153,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE= _DATA mConOut =3D { }, (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL, 0, - 0, =20 0, (TEXT_OUT_AND_GOP_DATA *) NULL, @@ -211,16 +190,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVAT= E_DATA mStdErr =3D { FALSE, }, =20 - { - NULL, - NULL, - NULL - }, - 0, - 0, - 0, - 0, - { NULL, NULL, @@ -229,7 +198,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE= _DATA mStdErr =3D { }, (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL, 0, - 0, =20 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 hand= lers. - Installs Graphics Output protocol and/or UGA Draw protocol if needed. + Installs Graphics Output protocol. =20 @param[in] ImageHandle The firmware allocated handle for the EFI imag= e. @param[in] SystemTable A pointer to the EFI System Table. @@ -494,10 +462,9 @@ ConSplitterDriverEntry( ASSERT_EFI_ERROR (Status); =20 // - // Either Graphics Output protocol or UGA Draw protocol must be supporte= d. + // Graphics Output protocol must be supported. // - ASSERT (FeaturePcdGet (PcdConOutGopSupport) || - FeaturePcdGet (PcdConOutUgaSupport)); + ASSERT (FeaturePcdGet (PcdConOutGopSupport)); =20 // // 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 (E= FI_UGA_DRAW_PROTOCOL)); - } if (FeaturePcdGet (PcdConOutGopSupport)) { CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTempl= ate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL)); } @@ -801,12 +765,6 @@ ConSplitterTextOutConstructor ( TextOutSetMode (ConOutPrivate, 0); =20 =20 - 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 int= erface @@ -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; =20 @@ -1353,7 +1310,6 @@ ConSplitterConOutDriverBindingStart ( } =20 GraphicsOutput =3D NULL; - UgaDraw =3D NULL; // // Try to Open Graphics Output protocol // @@ -1366,20 +1322,6 @@ ConSplitterConOutDriverBindingStart ( EFI_OPEN_PROTOCOL_GET_PROTOCOL ); =20 - 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 =3D ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutpu= t, UgaDraw); + Status =3D ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutpu= t); ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIG= HTGRAY, EFI_BLACK)); =20 - if (FeaturePcdGet (PcdConOutUgaSupport)) { - // - // Get the UGA mode data of ConOut from the current mode - // - if (GraphicsOutput !=3D NULL) { - Status =3D GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput= ->Mode->Mode, &SizeOfInfo, &Info); - if (EFI_ERROR (Status)) { - return Status; - } - ASSERT ( SizeOfInfo <=3D sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATIO= N)); - - mConOut.UgaHorizontalResolution =3D Info->HorizontalResolution; - mConOut.UgaVerticalResolution =3D Info->VerticalResolution; - mConOut.UgaColorDepth =3D 32; - mConOut.UgaRefreshRate =3D 60; - - FreePool (Info); - - } else if (UgaDraw !=3D NULL) { - Status =3D UgaDraw->GetMode ( - UgaDraw, - &mConOut.UgaHorizontalResolution, - &mConOut.UgaVerticalResolution, - &mConOut.UgaColorDepth, - &mConOut.UgaRefreshRate - ); + if (GraphicsOutput !=3D NULL) { + Status =3D GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->= Mode->Mode, &SizeOfInfo, &Info); + if (EFI_ERROR (Status)) { + return Status; } + ASSERT ( SizeOfInfo <=3D sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)= ); + + FreePool (Info); } =20 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 =3D ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL, NULL); + Status =3D ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL); ConSplitterTextOutSetAttribute (&mStdErr.TextOut, EFI_TEXT_ATTR (EFI_MAG= ENTA, EFI_BLACK)); =20 return Status; @@ -2729,7 +2652,6 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr ( =20 @param Private Text Out Splitter pointer. @param GraphicsOutput Graphics Output protocol pointer. - @param UgaDraw UGA Draw protocol pointer. =20 @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; =20 - ASSERT (GraphicsOutput !=3D NULL || UgaDraw !=3D NULL); + ASSERT (GraphicsOutput !=3D NULL); =20 CurrentGraphicsOutputMode =3D Private->GraphicsOutput.Mode; =20 @@ -2767,14 +2684,6 @@ ConSplitterAddGraphicsOutputMode ( CurrentIndex =3D 0; Status =3D EFI_SUCCESS; =20 - if (Private->CurrentNumberOfUgaDraw !=3D 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 mod= e) - // - goto Done; - } =20 if (GraphicsOutput !=3D NULL) { if (Private->CurrentNumberOfGraphicsOutput =3D=3D 0) { @@ -2921,49 +2830,11 @@ ConSplitterAddGraphicsOutputMode ( } } } - } else if (UgaDraw !=3D 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 =3D 1; - Info =3D CurrentGraphicsOutputMode->Info; - Info->Version =3D 0; - Info->HorizontalResolution =3D UgaHorizontalResolution; - Info->VerticalResolution =3D UgaVerticalResolution; - Info->PixelFormat =3D PixelBltOnly; - Info->PixelsPerScanLine =3D UgaHorizontalResolution; - CurrentGraphicsOutputMode->SizeOfInfo =3D sizeof (EFI_GRAPHICS_OU= TPUT_MODE_INFORMATION); - CurrentGraphicsOutputMode->FrameBufferBase =3D (EFI_PHYSICAL_ADDRESS) = (UINTN) NULL; - CurrentGraphicsOutputMode->FrameBufferSize =3D 0; - - // - // Update the private mode buffer - // - CopyMem (&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAP= HICS_OUTPUT_MODE_INFORMATION)); - - // - // Only mode 0 is available to be set - // - CurrentIndex =3D 0; } =20 -Done: - if (GraphicsOutput !=3D NULL) { Private->CurrentNumberOfGraphicsOutput++; } - if (UgaDraw !=3D NULL) { - Private->CurrentNumberOfUgaDraw++; - } =20 // // 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. =20 @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 ( =20 TextAndGop->TextOut =3D TextOut; TextAndGop->GraphicsOutput =3D GraphicsOutput; - TextAndGop->UgaDraw =3D UgaDraw; =20 if (CurrentNumOfConsoles =3D=3D 0) { // @@ -3192,77 +3056,21 @@ ConSplitterTextOutAddDevice ( // // This device display mode will be added into Graphics Ouput modes. // - if ((GraphicsOutput !=3D NULL) || (UgaDraw !=3D NULL)) { - DeviceStatus =3D ConSplitterAddGraphicsOutputMode (Private, GraphicsOu= tput, UgaDraw); + if (GraphicsOutput !=3D NULL) { + DeviceStatus =3D ConSplitterAddGraphicsOutputMode (Private, GraphicsOu= tput); } =20 - if (FeaturePcdGet (PcdConOutUgaSupport)) { - // - // If UGA is produced by Consplitter - // - if (GraphicsOutput !=3D NULL) { - Status =3D GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput= ->Mode->Mode, &SizeOfInfo, &Info); - if (EFI_ERROR (Status)) { - return Status; - } - ASSERT ( SizeOfInfo <=3D sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATIO= N)); - - UgaHorizontalResolution =3D Info->HorizontalResolution; - UgaVerticalResolution =3D Info->VerticalResolution; - - FreePool (Info); - - } else if (UgaDraw !=3D NULL) { - Status =3D 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 =3D ConSplitterUgaDrawSetMode ( - &Private->UgaDraw, - UgaHorizontalResolution, - UgaVerticalResolution, - UgaColorDepth, - UgaRefreshRate - ); - } - // - // If GetMode/SetMode is failed, set to 800x600 mode - // - if(EFI_ERROR (Status)) { - Status =3D ConSplitterUgaDrawSetMode ( - &Private->UgaDraw, - 800, - 600, - 32, - 60 - ); - } - } + Status =3D GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mo= de->Mode, &SizeOfInfo, &Info); + if (EFI_ERROR (Status)) { + return Status; } + ASSERT ( SizeOfInfo <=3D sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)); + FreePool (Info); =20 if (((!EFI_ERROR (DeviceStatus)) || (!EFI_ERROR (Status))) && - ((Private->CurrentNumberOfGraphicsOutput + Private->CurrentNumberOfU= gaDraw) =3D=3D 1)) { - if (!FeaturePcdGet (PcdConOutGopSupport)) { + ((Private->CurrentNumberOfGraphicsOutput) =3D=3D 1)) { // - // If Graphics Outpurt protocol not supported, UGA Draw protocol is = installed - // on the virtual handle. - // - Status =3D gBS->InstallMultipleProtocolInterfaces ( - &mConOut.VirtualHandle, - &gEfiUgaDrawProtocolGuid, - &mConOut.UgaDraw, - NULL - ); - } else if (!FeaturePcdGet (PcdConOutUgaSupport)) { - // - // If UGA Draw protocol not supported, Graphics Output Protocol is i= nstalled + // Graphics Output Protocol is installed // on virtual handle. // Status =3D 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 =3D gBS->InstallMultipleProtocolInterfaces ( - &mConOut.VirtualHandle, - &gEfiGraphicsOutputProtocolGuid, - &mConOut.GraphicsOutput, - &gEfiUgaDrawProtocolGuid, - &mConOut.UgaDraw, - NULL - ); - } } =20 // @@ -3329,9 +3123,6 @@ ConSplitterTextOutDeleteDevice ( TextOutList =3D Private->TextOutList; while (Index >=3D 0) { if (TextOutList->TextOut =3D=3D TextOut) { - if (TextOutList->UgaDraw !=3D NULL) { - Private->CurrentNumberOfUgaDraw--; - } if (TextOutList->GraphicsOutput !=3D NULL) { Private->CurrentNumberOfGraphicsOutput--; } @@ -3350,33 +3141,16 @@ ConSplitterTextOutDeleteDevice ( return EFI_NOT_FOUND; } =20 - if ((Private->CurrentNumberOfGraphicsOutput =3D=3D 0) && (Private->Curre= ntNumberOfUgaDraw =3D=3D 0)) { + if ((Private->CurrentNumberOfGraphicsOutput =3D=3D 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 =3D gBS->UninstallProtocolInterface ( - Private->VirtualHandle, - &gEfiUgaDrawProtocolGuid, - &Private->UgaDraw - ); - } else if (!FeaturePcdGet (PcdConOutUgaSupport)) { - Status =3D gBS->UninstallProtocolInterface ( - Private->VirtualHandle, - &gEfiGraphicsOutputProtocolGuid, - &Private->GraphicsOutput - ); - } else { - Status =3D gBS->UninstallMultipleProtocolInterfaces ( - Private->VirtualHandle, - &gEfiUgaDrawProtocolGuid, - &Private->UgaDraw, - &gEfiGraphicsOutputProtocolGuid, - &Private->GraphicsOutput, - NULL - ); - } + Status =3D gBS->UninstallProtocolInterface ( + Private->VirtualHandle, + &gEfiGraphicsOutputProtocolGuid, + &Private->GraphicsOutput + ); } =20 if (CurrentNumOfConsoles =3D=3D 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 #include #include -#include =20 #include #include @@ -187,7 +186,6 @@ typedef struct { =20 typedef struct { EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut; } TEXT_OUT_AND_GOP_DATA; =20 @@ -200,16 +198,9 @@ typedef struct { EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut; EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode; =20 - 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; =20 UINTN CurrentNumberOfConsoles; TEXT_OUT_AND_GOP_DATA *TextOutList; @@ -236,13 +227,6 @@ typedef struct { TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \ ) =20 -#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 hand= lers. - Installs Graphics Output protocol and/or UGA Draw protocol if needed. + Installs Graphics Output protocol if needed. =20 @param[in] ImageHandle The firmware allocated handle for the EFI imag= e. @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. =20 @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 ); =20 /** @@ -1871,119 +1853,6 @@ ConSplitterGraphicsOutputBlt ( IN UINTN Delta OPTIONAL ); =20 - -/** - 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 define= d 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 Set= Mode () - @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 SetM= ode () - @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 memo= ry - @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. =20 diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.i= nf 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 contro= l from selected # standard console devices, and transmits console I/O to related console d= evice drivers. -# Consplitter could install Graphics Output protocol and/or UGA Draw proto= col in system -# table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSuppor= t). It always -# consumes Graphics Output protocol which is produced by display device, a= nd consumes UGA Draw -# protocol which is produced by display device according to PcdUgaConsumeS= upport value. -# Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSup= port 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.
# @@ -92,14 +89,9 @@ [Protocols] ## SOMETIMES_PRODUCES ## SOMETIMES_CONSUMES gEfiGraphicsOutputProtocolGuid - ## SOMETIMES_PRODUCES - ## SOMETIMES_CONSUMES - gEfiUgaDrawProtocolGuid =20 [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES =20 [Pcd] ## SOMETIMES_PRODUCES diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.u= ni 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 contr= ol 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 prot= ocol in system -// table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSuppo= rt). 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 PcdUgaConsume= Support value. -// Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSu= pport 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.
// @@ -19,5 +16,5 @@ =20 #string STR_MODULE_ABSTRACT #language en-US "Provides multi co= nsole support" =20 -#string STR_MODULE_DESCRIPTION #language en-US "This driver acts = as a virtual console, takes over the console I/O control from selected stan= dard console devices, and transmits console I/O to related console device d= rivers. Consplitter could install Graphics Output protocol and/or UGA Draw = protocol in system table according PCD settings(PcdConOutGopSupport, and Pc= dConOutUgaSupport). It always consumes Graphics Output protocol, which is p= roduced by display device, and consumes UGA Draw protocol, which is produce= d by display device according to PcdUgaConsumeSupport value. Note: If only = UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be se= t 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 stan= dard console devices, and transmits console I/O to related console device d= rivers. Consplitter could install Graphics Output protocol in system table = according PCD settings(PcdConOutGopSupport). It always consumes Graphics Ou= tput protocol, which is produced by display device." =20 diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraph= ics.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; =20 if (ModeNumber >=3D This->Mode->MaxMode) { return EFI_UNSUPPORTED; @@ -156,20 +155,6 @@ ConSplitterGraphicsOutputSetMode ( if (EFI_ERROR (Status)) { ReturnStatus =3D Status; } - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - UgaDraw =3D Private->TextOutList[Index].UgaDraw; - if (UgaDraw !=3D NULL) { - Status =3D UgaDraw->SetMode ( - UgaDraw, - Mode->HorizontalResolution, - Mode->VerticalResolution, - 32, - 60 - ); - if (EFI_ERROR (Status)) { - ReturnStatus =3D Status; - } - } } } =20 @@ -262,7 +247,6 @@ ConSplitterGraphicsOutputBlt ( TEXT_OUT_SPLITTER_PRIVATE_DATA *Private; UINTN Index; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; =20 if (This =3D=3D NULL || ((UINTN) BltOperation) >=3D EfiGraphicsOutputBlt= OperationMax) { return EFI_INVALID_PARAMETER; @@ -299,297 +283,6 @@ ConSplitterGraphicsOutputBlt ( return EFI_SUCCESS; } } - - UgaDraw =3D Private->TextOutList[Index].UgaDraw; - if (UgaDraw !=3D NULL && FeaturePcdGet (PcdUgaConsumeSupport)) { - Status =3D UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *) BltBuffer, - (EFI_UGA_BLT_OPERATION) BltOperation, - SourceX, - SourceY, - DestinationX, - DestinationY, - Width, - Height, - Delta - ); - if (EFI_ERROR (Status)) { - ReturnStatus =3D Status; - } else if (BltOperation =3D=3D 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 define= d 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 Set= Mode () - @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 =3D=3D NULL) || - (VerticalResolution =3D=3D NULL) || - (RefreshRate =3D=3D NULL) || - (ColorDepth =3D=3D NULL)) { - return EFI_INVALID_PARAMETER; - } - // - // retrieve private data - // - Private =3D UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This= ); - - *HorizontalResolution =3D Private->UgaHorizontalResolution; - *VerticalResolution =3D Private->UgaVerticalResolution; - *ColorDepth =3D Private->UgaColorDepth; - *RefreshRate =3D 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 SetM= ode () - @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 =3D UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This); - - ReturnStatus =3D EFI_SUCCESS; - - // - // Update the Mode data - // - Private->UgaHorizontalResolution =3D HorizontalResolution; - Private->UgaVerticalResolution =3D VerticalResolution; - Private->UgaColorDepth =3D ColorDepth; - Private->UgaRefreshRate =3D RefreshRate; - - // - // return the worst status met - // - for (Index =3D 0; Index < Private->CurrentNumberOfConsoles; Index++) { - - GraphicsOutput =3D Private->TextOutList[Index].GraphicsOutput; - if (GraphicsOutput !=3D NULL) { - // - // Find corresponding ModeNumber of this GraphicsOutput instance - // - for (NumberIndex =3D 0; NumberIndex < GraphicsOutput->Mode->MaxMode;= NumberIndex ++) { - Status =3D GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) Num= berIndex, &SizeOfInfo, &Info); - if (EFI_ERROR (Status)) { - return Status; - } - if ((Info->HorizontalResolution =3D=3D HorizontalResolution) && (I= nfo->VerticalResolution =3D=3D VerticalResolution)) { - FreePool (Info); - break; - } - FreePool (Info); - } - - Status =3D GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberI= ndex); - if (EFI_ERROR (Status)) { - ReturnStatus =3D Status; - } - } else if (FeaturePcdGet (PcdUgaConsumeSupport)){ - UgaDraw =3D Private->TextOutList[Index].UgaDraw; - if (UgaDraw !=3D NULL) { - Status =3D UgaDraw->SetMode ( - UgaDraw, - HorizontalResolution, - VerticalResolution, - ColorDepth, - RefreshRate - ); - if (EFI_ERROR (Status)) { - ReturnStatus =3D 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 memo= ry - @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 =3D UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This); - - ReturnStatus =3D EFI_SUCCESS; - // - // return the worst status met - // - for (Index =3D 0; Index < Private->CurrentNumberOfConsoles; Index++) { - GraphicsOutput =3D Private->TextOutList[Index].GraphicsOutput; - if (GraphicsOutput !=3D NULL) { - Status =3D GraphicsOutput->Blt ( - GraphicsOutput, - (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) BltBuffer, - (EFI_GRAPHICS_OUTPUT_BLT_OPERATION) BltOpera= tion, - SourceX, - SourceY, - DestinationX, - DestinationY, - Width, - Height, - Delta - ); - if (EFI_ERROR (Status)) { - ReturnStatus =3D Status; - } else if (BltOperation =3D=3D EfiUgaVideoToBltBuffer) { - // - // Only need to read the data into buffer one time - // - return EFI_SUCCESS; - } - } - - if (Private->TextOutList[Index].UgaDraw !=3D NULL && FeaturePcdGet (Pc= dUgaConsumeSupport)) { - Status =3D Private->TextOutList[Index].UgaDraw->Blt ( - Private->TextOutList= [Index].UgaDraw, - BltBuffer, - BltOperation, - SourceX, - SourceY, - DestinationX, - DestinationY, - Width, - Height, - Delta - ); - if (EFI_ERROR (Status)) { - ReturnStatus =3D Status; - } else if (BltOperation =3D=3D EfiUgaVideoToBltBuffer) { - // - // Only need to read the data into buffer one time - // - return EFI_SUCCESS; - } - } } =20 return ReturnStatus; --=20 2.25.1.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 (#58851): https://edk2.groups.io/g/devel/message/58851 Mute This Topic: https://groups.io/mt/74068783/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-