From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 35A582214E329 for ; Mon, 11 Dec 2017 09:37:52 -0800 (PST) Received: by mail-wr0-x243.google.com with SMTP id h1so18420234wre.12 for ; Mon, 11 Dec 2017 09:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Mu3n4qJy+Fwg9DVCWq0UIdcSsefxYm/Qnyj+sx74bRE=; b=Uhyg5b53KuLM+smRrT7C4eVaFpLFoQlSnVQajAKMs6mVBG+ciYVe+jXbhBm4RUsrWx SXqOgVW4T1RYXPru4elP0J8BKoVpf+bIRyWEfNoHsxi6BgTTZrS9yD9d6s7GDS3PDp30 wwMcN/JyAq5GjPWEwSO9OsAIs/XL9W4P3+LEk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Mu3n4qJy+Fwg9DVCWq0UIdcSsefxYm/Qnyj+sx74bRE=; b=udmMFLUwB5E2Q4OuO1tJuaYmaf8EI1T1WZEg4rkIyyuVlfiQWgB67MxhwN/70GcdgS JblV/yzgD32E34YZobDKQQD8Z8ITOuQyA0z2oYod1zjO39B5qOG+fs6dDWIOraYpXu2k j883ucEJLRpVRjp9oyKEqlz+hId4ydDw8ZmMmXridVTBkiiIfyM0bLqbyJskQ56pgOBV bV6q3Y/NSciJrZ6XkIsgOMFy3ZGTPCRH8siYveCln+yyZPzGzdVQ/dP+xH7oN6rfygyW tise0N3ZmRm2jz79Yx3Io5xMKQahC0ar87e+lUM6CX1i0I+c4aUCFUQwoV9Nn0i77p7S feAg== X-Gm-Message-State: AKGB3mKQ5KHOqre7hMSeoXalVYx82Sr2u42CTR2Rw6P2OCHcmjoQzyjM UZGaSxsk1Qv5p+XvzVjdVYcpyg== X-Google-Smtp-Source: ACJfBou9Wsb1ePssTq4i0OSRPCJHmdnuVeFMK22eZbuuR4XsiuKtpCxGlHCPSnz80VjYdd7FKjeSRw== X-Received: by 10.223.164.20 with SMTP id d20mr1111941wra.103.1513014148665; Mon, 11 Dec 2017 09:42:28 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id d23sm9627901wma.48.2017.12.11.09.42.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2017 09:42:27 -0800 (PST) Date: Mon, 11 Dec 2017 17:42:26 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, Girish Pathak , Evan Lloyd Message-ID: <20171211174226.hobxehf7h4rkc2xm@bivouac.eciton.net> References: <20171208173128.28485-1-ard.biesheuvel@linaro.org> <20171208173128.28485-5-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171208173128.28485-5-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH v2 4/5] ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 17:37:52 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > 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 > --- > 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 > > #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 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.
> +# > +# 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 >