From patchwork Fri Dec 1 11:32:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120313 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1014896qgn; Fri, 1 Dec 2017 03:33:17 -0800 (PST) X-Google-Smtp-Source: AGs4zMagcIwTB+F505gEMQKzAYUQYvSt49kkt/Z11gDZwPaybQIHokwxxhEvFCL1CnFlsixiGS1+ X-Received: by 10.159.194.18 with SMTP id x18mr5839108pln.412.1512127996770; Fri, 01 Dec 2017 03:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512127996; cv=none; d=google.com; s=arc-20160816; b=BZJ8V+S/oiCXbgqii//7CjQCh9xNTGHytE/Za+4m1aciFdRsmjDDvOBBx+9NZtQNFK IAIRIjHzN7RIfu9qVSwuB82L44xqTlV4WPNdVAf3k+6/R/yvXbMPiAEVfT4C8om+7kwy LRf4mhBnrMhQzJeqxnWwPTgzqPAjAazqQl2Mw/IXwl4mfaCRX1eDmDMsAUyH5FFzzO/M 9QVQepHYObwWD9nohXwry5gdo5D9Fi+X+inn548Ji6mVOhWV3tzLk9BWSw7nYll8mDeA hyT/NpTfFtL/aK5UnhHoZUO+fzM1IywTgjbmt+7UvvW8rqsYb7OyV1xwsTuUpi/FLmwq WGig== 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=yAC3CIupNNk3W0oX+HzTAwO7/Y7Xl+eNmx876OV8tmw=; b=d0vaieu3jhzPIscE4lu/WwcEKa8Yn/An9Ae7UYUMyclPN0qCQoaOsCLUp24c6RAKq6 zyDTzu3TXFsitKMtjPH3OHmyRQxOExWRzTn8ustZR2ZMB1BaM7MsfWUWH0HNKU9nwAYn 1xcS7L74uWQZvo0k+e03SY9G1EZwBSMYhGMDmxzWP2c9p4+c1NX9eCdyqMxFMbxBGmBF 8SLXGW892h2iW7Y1Qa3H/vjoG2ytSXxakK9FLKQILA9uFiieVbQj3bOkVNtIIGrJ3css AjrYgt27mJ2DK169Y+B/aTpJmZj4U00MHxXOLehSU1t2u/oQzNQJzJ1VA9gSr8/b1qjD F2uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Te8FUsYk; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id r1si4639242pgd.163.2017.12.01.03.33.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2017 03:33:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Te8FUsYk; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 A3A6F20352A98; Fri, 1 Dec 2017 03:28:49 -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::242; helo=mail-wm0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 D30DC20352A89 for ; Fri, 1 Dec 2017 03:28:47 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id v19so2816415wmh.5 for ; Fri, 01 Dec 2017 03:33:14 -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=uMx1Q4hd2GUXPCBR2nHMycc8JWye6ZneIVAAgSGnUTI=; b=Te8FUsYk7C8jKYxJ1Rhen7G/A+iGYbOiQvALxTqY0nbulsB0J6L8C8zzou4uqHGP+D vD6MyPHx9NA7A+17AV5mbTp0ZWYzhYVVJhMNEztL4UNG0157m5JXlNHpab9mW7KZKtvg KL3iE+sVLMJ0LYkA/MsJPSNCYWNCsOiPq11fg= 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=uMx1Q4hd2GUXPCBR2nHMycc8JWye6ZneIVAAgSGnUTI=; b=VGFf2nFiNvz8HNSnDE02tMp/J+liv3UGWvKxvNoEh/DeXcgf0Hilo+oEqzvDIUvIat 931U9+A6G7yYLSVhRHoiEe28RK/QV0Qhz28PRroc8njeaVgRgyB8Om0/j+TtAsSEsskp ipuusr3nIReZSKBlgJk0XedgHMJajulSP7uUFiVTV1rQ69TJb5CTzIzmfWHcOhM3opZN 86RdIDBmUbYwTezj9oHBRqOF2mjWWQa8qgiTxWJeT/qCxkWbGSUOSEjfKi2r1C9Ep0Gp 8Rr7yyCgptv4LRHgwjyxsmAE1BC3+3uuaPPvjXyoq79iYK1Yc1omDpoZBGdkqYrJEkOc 5Myw== X-Gm-Message-State: AJaThX4BPiVWAh917FdkDknAchanaMeXKdpXZOF+bhSjHviWqSSKZCyg KtVHEHxL7fKCOmVHII1Z+DnffmQExBo= X-Received: by 10.28.125.85 with SMTP id y82mr872241wmc.25.1512127992572; Fri, 01 Dec 2017 03:33:12 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id k11sm918430wmi.18.2017.12.01.03.33.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2017 03:33:11 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 1 Dec 2017 11:32:54 +0000 Message-Id: <20171201113255.23581-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171201113255.23581-1-ard.biesheuvel@linaro.org> References: <20171201113255.23581-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 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 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h | 21 +------- ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf | 54 ++++++++++++++++++++ 2 files changed, 55 insertions(+), 20 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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