public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@lists.01.org, Girish Pathak <girish.pathak@arm.com>,
	Evan Lloyd <evan.lloyd@arm.com>
Subject: Re: [PATCH v2 4/5] ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver
Date: Mon, 11 Dec 2017 17:42:26 +0000	[thread overview]
Message-ID: <20171211174226.hobxehf7h4rkc2xm@bivouac.eciton.net> (raw)
In-Reply-To: <20171208173128.28485-5-ard.biesheuvel@linaro.org>

On Fri, Dec 08, 2017 at 05:31:27PM +0000, Ard Biesheuvel wrote:
> 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                                    |  2 +
>  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h   | 21 +-------
>  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf | 54 ++++++++++++++++++++
>  3 files changed, 57 insertions(+), 20 deletions(-)
> 
> diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc
> index 9dd64b472acf..69ae9b67bc79 100644
> --- a/ArmPlatformPkg/ArmPlatformPkg.dsc
> +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc
> @@ -53,6 +53,7 @@ [LibraryClasses.common]
>    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 @@ [LibraryClasses.common.SEC]
>  
>  [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 8856b79901b6..b66efd34561f 100644
> --- a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h
> +++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h
> @@ -18,6 +18,7 @@
>  #include <Base.h>
>  
>  #include <Library/DebugLib.h>
> +#include <Library/LcdHwLib.h>
>  #include <Library/LcdPlatformLib.h>
>  #include <Library/PcdLib.h>
>  #include <Library/UefiLib.h>
> @@ -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 000000000000..e6424475f79d
> --- /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.<BR>
> +#
> +#  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
> -- 
> 2.11.0
> 


  reply	other threads:[~2017-12-11 17:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 17:31 [PATCH v2 0/5] ArmPlatformPkg: refactor LcdGraphicsOutputDxe driver Ard Biesheuvel
2017-12-08 17:31 ` [PATCH v2 1/5] ArmPlatformPkg: introduce LcdHwLib library class Ard Biesheuvel
2017-12-11 17:32   ` Leif Lindholm
2017-12-11 17:56     ` Ard Biesheuvel
2017-12-12 17:12       ` Leif Lindholm
2017-12-12 17:14         ` Ard Biesheuvel
2017-12-08 17:31 ` [PATCH v2 2/5] ArmPlatformPkg: implement LcdHwLib for PL111 Ard Biesheuvel
2017-12-11 17:39   ` Leif Lindholm
2017-12-11 17:57     ` Ard Biesheuvel
2017-12-08 17:31 ` [PATCH v2 3/5] ArmPlatformPkg: implement LcdHwLib for HdLcd Ard Biesheuvel
2017-12-11 17:41   ` Leif Lindholm
2017-12-08 17:31 ` [PATCH v2 4/5] ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver Ard Biesheuvel
2017-12-11 17:42   ` Leif Lindholm [this message]
2017-12-08 17:31 ` [PATCH v2 5/5] ArmPlatformPkg: remove old PL111/HdLcd driver code Ard Biesheuvel
2017-12-11 17:43   ` Leif Lindholm
2017-12-12 17:44 ` [PATCH v2 0/5] ArmPlatformPkg: refactor LcdGraphicsOutputDxe driver Ard Biesheuvel
2017-12-12 19:10   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171211174226.hobxehf7h4rkc2xm@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox