]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 1 Dec 2017 11:01:02 +0000 (11:01 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 12 Dec 2017 17:40:16 +0000 (17:40 +0000)
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 <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
[ardb: add it to ArmPlatformPkg.dsc so we can build test it standalone]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/ArmPlatformPkg.dsc
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf [new file with mode: 0644]

index 9dd64b472acfc6722e82f74da346abb39fd632e5..69ae9b67bc79e093f8f60957bf924911b6212193 100644 (file)
@@ -53,6 +53,7 @@
   DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
+  LcdHwLib|ArmPlatformPkg/Library/LcdHwNullLib/LcdHwNullLib.inf\r
   LcdPlatformLib|ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.inf\r
   LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   LcdPlatformLib|ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.inf\r
   LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
@@ -93,6 +94,7 @@
 \r
 [Components.common]\r
   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf\r
 \r
 [Components.common]\r
   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf\r
+  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf\r
   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf\r
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf\r
   ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf\r
   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf\r
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf\r
   ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf\r
index 8856b79901b632071ae4c4081b69e5188daa23ed..b66efd34561f655b74a5ecfad8a97281cdd5929d 100644 (file)
@@ -18,6 +18,7 @@
 #include <Base.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Base.h>\r
 \r
 #include <Library/DebugLib.h>\r
+#include <Library/LcdHwLib.h>\r
 #include <Library/LcdPlatformLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/LcdPlatformLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/UefiLib.h>\r
@@ -105,24 +106,4 @@ InitializeDisplay (
   IN LCD_INSTANCE* Instance\r
 );\r
 \r
   IN LCD_INSTANCE* Instance\r
 );\r
 \r
-EFI_STATUS\r
-LcdIdentify (\r
-  VOID\r
-);\r
-\r
-EFI_STATUS\r
-LcdInitialize (\r
-  EFI_PHYSICAL_ADDRESS  VramBaseAddress\r
-);\r
-\r
-EFI_STATUS\r
-LcdSetMode (\r
-  IN UINT32  ModeNumber\r
-);\r
-\r
-VOID\r
-LcdShutdown (\r
-  VOID\r
-);\r
-\r
 #endif /* __ARM_VE_GRAPHICS_DXE_H__ */\r
 #endif /* __ARM_VE_GRAPHICS_DXE_H__ */\r
diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf
new file mode 100644 (file)
index 0000000..e642447
--- /dev/null
@@ -0,0 +1,54 @@
+#/** @file\r
+#\r
+#  Component description file for LcdGraphicsOutputDxe module\r
+#\r
+#  Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
+#\r
+#  This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x0001001A\r
+  BASE_NAME                      = LcdGraphicsOutputDxe\r
+  FILE_GUID                      = 89464DAE-8DAA-41FE-A4C8-40D2175AF1E9\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  ENTRY_POINT                    = LcdGraphicsOutputDxeInitialize\r
+\r
+[Sources.common]\r
+  LcdGraphicsOutputDxe.c\r
+  LcdGraphicsOutputBlt.c\r
+\r
+[Packages]\r
+  ArmPlatformPkg/ArmPlatformPkg.dec\r
+  ArmPkg/ArmPkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+  MdePkg/MdePkg.dec\r
+\r
+[LibraryClasses]\r
+  ArmLib\r
+  BaseLib\r
+  BaseMemoryLib\r
+  DebugLib\r
+  LcdHwLib\r
+  LcdPlatformLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
+  UefiLib\r
+\r
+[Protocols]\r
+  gEfiDevicePathProtocolGuid\r
+  gEfiGraphicsOutputProtocolGuid\r
+\r
+[FeaturePcd]\r
+  gArmPlatformTokenSpaceGuid.PcdGopDisableOnExitBootServices\r
+\r
+[Depex]\r
+  TRUE\r