From patchwork Thu Feb 9 16:39:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 9565119 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EE3BB6020C for ; Thu, 9 Feb 2017 16:41:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBE6828576 for ; Thu, 9 Feb 2017 16:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D027B2857B; Thu, 9 Feb 2017 16:41:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 695E128576 for ; Thu, 9 Feb 2017 16:41:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cbrn0-0007Cz-4j; Thu, 09 Feb 2017 16:41:46 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cbrlY-0004Sg-II for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2017 16:40:27 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id C521E20C46; Thu, 9 Feb 2017 17:39:32 +0100 (CET) Received: from localhost (LFbn-1-2281-83.w90-76.abo.wanadoo.fr [90.76.98.83]) by mail.free-electrons.com (Postfix) with ESMTPSA id 9C92320B77; Thu, 9 Feb 2017 17:39:32 +0100 (CET) From: Maxime Ripard To: Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard , Greg Kroah-Hartman Subject: [PATCH 5/8] ARM: sun8i: a33: Add shared display memory pool Date: Thu, 9 Feb 2017 17:39:19 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170209_084017_498758_EDE5BF6A X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The memory buffers might need to be allocated and shared from both the scanout and the GPU. Create a memory region reserved for their own usage so that each can allocate from it, and get the informations on the region that is going to be used (size and offset). Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a33.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index 5a9ba43ccb07..043b1b017276 100644 --- a/arch/arm/boot/dts/sun8i-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a33.dtsi @@ -97,6 +97,7 @@ de: display-engine { compatible = "allwinner,sun8i-a33-display-engine"; allwinner,pipelines = <&fe0>; + memory-region = <&display_pool>; status = "disabled"; }; @@ -104,6 +105,18 @@ reg = <0x40000000 0x80000000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + display_pool: cma { + compatible = "shared-dma-pool"; + size = <0x1000000>; + reusable; + }; + }; + soc@01c00000 { tcon0: lcd-controller@01c0c000 { compatible = "allwinner,sun8i-a33-tcon"; @@ -267,6 +280,10 @@ compatible = "allwinner,sun8i-a33-ccu"; }; +&mali { + memory-region = <&display_pool>; +}; + &pio { compatible = "allwinner,sun8i-a33-pinctrl"; interrupts = ,