From: Ard Biesheuvel Date: Fri, 1 Dec 2017 11:01:02 +0000 (+0000) Subject: ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver X-Git-Tag: edk2-stable201903~2838 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=2671d8989004a37868ce0a7bef6cf88c6f042187 ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver Create a new LcdGraphicsOutputDxe driver from the existing sources that takes its hardware abstractions from a LcdHwLib library instance rather than from a .c file linked directly. All we need is a new .inf file, and a minimal tweak to LcdGraphicsOutputDxe.h to reuse the LcdHwlib prototypes rather than open code them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak Signed-off-by: Evan Lloyd [ardb: add it to ArmPlatformPkg.dsc so we can build test it standalone] Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc index 9dd64b472a..69ae9b67bc 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc @@ -53,6 +53,7 @@ DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf + LcdHwLib|ArmPlatformPkg/Library/LcdHwNullLib/LcdHwNullLib.inf LcdPlatformLib|ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.inf LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf @@ -93,6 +94,7 @@ [Components.common] ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf + ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h index 8856b79901..b66efd3456 100644 --- a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h +++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -105,24 +106,4 @@ InitializeDisplay ( IN LCD_INSTANCE* Instance ); -EFI_STATUS -LcdIdentify ( - VOID -); - -EFI_STATUS -LcdInitialize ( - EFI_PHYSICAL_ADDRESS VramBaseAddress -); - -EFI_STATUS -LcdSetMode ( - IN UINT32 ModeNumber -); - -VOID -LcdShutdown ( - VOID -); - #endif /* __ARM_VE_GRAPHICS_DXE_H__ */ diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf new file mode 100644 index 0000000000..e6424475f7 --- /dev/null +++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf @@ -0,0 +1,54 @@ +#/** @file +# +# Component description file for LcdGraphicsOutputDxe module +# +# Copyright (c) 2011-2012, ARM Ltd. All rights reserved.
+# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +#**/ + +[Defines] + INF_VERSION = 0x0001001A + BASE_NAME = LcdGraphicsOutputDxe + FILE_GUID = 89464DAE-8DAA-41FE-A4C8-40D2175AF1E9 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = LcdGraphicsOutputDxeInitialize + +[Sources.common] + LcdGraphicsOutputDxe.c + LcdGraphicsOutputBlt.c + +[Packages] + ArmPlatformPkg/ArmPlatformPkg.dec + ArmPkg/ArmPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + ArmLib + BaseLib + BaseMemoryLib + DebugLib + LcdHwLib + LcdPlatformLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiLib + +[Protocols] + gEfiDevicePathProtocolGuid + gEfiGraphicsOutputProtocolGuid + +[FeaturePcd] + gArmPlatformTokenSpaceGuid.PcdGopDisableOnExitBootServices + +[Depex] + TRUE