From patchwork Fri Dec 8 17:31:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 121224 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp929122qgn; Fri, 8 Dec 2017 09:31:51 -0800 (PST) X-Google-Smtp-Source: AGs4zMaOFLw3muC9CPQWhDcRURauOxjbSEOVI0rsjrUIWT/080ZYYsUrFlwr3wqtobtqt5cw0xP6 X-Received: by 10.99.107.7 with SMTP id g7mr29774284pgc.387.1512754311015; Fri, 08 Dec 2017 09:31:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512754311; cv=none; d=google.com; s=arc-20160816; b=qvAJpb8QOXmQR4Qsqpk5BGLSLGF2a6Y0jhvpWbcpd0laBDSTWiMHibgwsuarz3SiQB eMkN2OjGKdDpdOrfP/wAcvYhtiWzaSKUD9mk9UATjlauRnhUvvUUTc145j4i5RFtX2x9 k3bacBJCKJa5uYZVyB6C7wU2KT4EqKNMasoe5KyD+2BsP6bVtk+QbdhgMpLmi+A+booa tO+ntDuCSEf4SHiS7/kBdQdPoGnzCgLFwV+ALwrczoB4Ck31+MYt72gdMTqQw9NaV1ND 2ocI8AR4pdl1jHc2/AwKrRquqWpiJJyNFbuphfwJpD3qOzSwmq929bhPxKKKN2P0amyA VUGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=YR/+x6Y00XDsk65yHEb5iecNK34hEdbf40jx6eh94mU=; b=repTEC5YaVJwtDWxsOAVyWl9n+OW03LWlxJwp34JlePINH0M/TvG+NyktjfqLUcxRH ZkC98uqu9yZhmiaJ1WIl7akRrLV16x83brcMnLPfN362UUAlfvcwoRzRuVNaAEC03xhW xZ13/hV38Db/MD7oS0SK0pqMiN3JHNzy25EbqotlYP1Ac1hcPs3MF+78zTorSPpLCH06 fNOykpEl5ZupmaMCNQcTYYM4aDTCPQJxX54gEVLP3EhnoMsXBv/zwXRUjjjnoAmN89wX +bJeu5IfpWD48BDZS21feFEajN7tSjIeV+lRqeRncnabCOQWN6MNxwWKTUYPX9ov2sDI /fpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RBXFSU7E; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id c1si5293285plk.35.2017.12.08.09.31.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 09:31:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RBXFSU7E; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0CBEA221EA0DC; Fri, 8 Dec 2017 09:27:16 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 943F32218E951 for ; Fri, 8 Dec 2017 09:27:14 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id y82so5287496wmg.1 for ; Fri, 08 Dec 2017 09:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oLv9/Izi2Kd7alY49SxRoVvVTC0Zscw4On7DYHqcDSU=; b=RBXFSU7EUg3n3apd7B8hc7mi7ZZpmUHCX+Q8E8TSzVZC1/iYkDiLSyy+LYUeCGe0Z/ BXVHWRHd2rFztS3HRqUKJPm4Oq0tQC8DGuZ/9XeIH4n/7amNkkoewUraHZR5zu/D7FpO ud5DUYaVRoP9VGezullJ8kYhP9mlZoGwROXzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oLv9/Izi2Kd7alY49SxRoVvVTC0Zscw4On7DYHqcDSU=; b=fgaK25XsAyP6ZqF/0hjGXrYa2tPdUW8UMQl+r5NhfuunhIjylmNWAmQLfJaR5/XviJ 3FrLRK190KTaIDE2G7FxPgFHVP39zwMsN5cUAxvComPpb1HUbltKn/g7s4Wp8fktMEiX dTuV4siLzXB650NA2WrsvD8sp4YoErE3zhigSqe7M5UZE6aG55N7N1D5t8S6qzKA2Lan oQH/YdtX6sacd19dKhk09fvrvuWLMoaGAEec+aHVz4irdX/XufdOqIu2kAXV4CmlBhZq nizCZzbya1SHVul15u5k3EUv5pOqp6DqBB/WMdfeM4g6nP4RqpoL/VYcathun/xzBuQy g5rQ== X-Gm-Message-State: AKGB3mIlBdqryDU6zu90IWxZG6p2ApNF3ig6Bwiy9b26gX+VLZPWEFiS xMDSgmQSaBNgy047nAudYs9faUNJJfk= X-Received: by 10.28.27.206 with SMTP id b197mr4819587wmb.96.1512754307427; Fri, 08 Dec 2017 09:31:47 -0800 (PST) Received: from localhost.localdomain ([160.171.158.223]) by smtp.gmail.com with ESMTPSA id q15sm8904685wra.91.2017.12.08.09.31.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 09:31:45 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 8 Dec 2017 17:31:27 +0000 Message-Id: <20171208173128.28485-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171208173128.28485-1-ard.biesheuvel@linaro.org> References: <20171208173128.28485-1-ard.biesheuvel@linaro.org> Subject: [edk2] [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: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- ArmPlatformPkg/ArmPlatformPkg.dsc | 2 + ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h | 21 +------- ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf | 54 ++++++++++++++++++++ 3 files changed, 57 insertions(+), 20 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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