From patchwork Tue Aug 7 22:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Jourdan X-Patchwork-Id: 10559253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A10E1057 for ; Tue, 7 Aug 2018 22:01:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29C4C2A303 for ; Tue, 7 Aug 2018 22:01:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D7E72A344; Tue, 7 Aug 2018 22:01:06 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 CAEF62A303 for ; Tue, 7 Aug 2018 22:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=QWYDt6r0rXCTTRyf9IspeGEH89WpgmO2rSYa+R13drg=; b=HOS 4f3pICc98ChCTcPpoIbfoPu7f4FHzwLJjPWXvI9vMzQTwgp/8sMjwXtGy8wog+Sgs4aF4vxUMLqWn Aiqyq3RpZdJ2+kDWC2MwM49Im7e7bo3og2fQyW2RIkHNKpMpByn+1ySa42NjQN+qAdsrVvZCt3BOI hVjSGj8dJn2exdpymSR7MJE2scFnYr/qLsMkPGCKUjAAVLckcrV1QrI4DioJ2cTIaZhfRUj6QVdfI h4EYNp1kH/g++HzAdP1GTYlASGzfl5QZGuTPQtsiUhlbb0MtNs4YxHRc8/Y9sDlRgPjOMFMociahZ COE3rSbkI42vHgBrVg8AQr2Zo9lzkQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fnA2J-0002eo-W8; Tue, 07 Aug 2018 22:01:04 +0000 Received: from smtp03.smtpout.orange.fr ([80.12.242.125] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fnA29-0002OE-7P for linux-amlogic@lists.infradead.org; Tue, 07 Aug 2018 22:00:55 +0000 Received: from localhost.localdomain ([81.67.76.113]) by mwinf5d58 with ME id LN0T1y0022Sg6Vd03N0WWp; Wed, 08 Aug 2018 00:00:33 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: bWF4aS5qb3VyZGFuQHdhbmFkb28uZnI= X-ME-Date: Wed, 08 Aug 2018 00:00:33 +0200 X-ME-IP: 81.67.76.113 From: Maxime Jourdan To: linux-amlogic@lists.infradead.org Subject: [PATCH v2 0/4] soc: amlogic: add meson-canvas Date: Wed, 8 Aug 2018 00:00:07 +0200 Message-Id: <20180807220011.24436-1-maxi.jourdan@wanadoo.fr> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180807_150053_577246_A6696BDD X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Neil Armstrong , Kevin Hilman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Maxime Jourdan , linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Amlogic SoCs feature a set of 256 canvas that act as pixel buffer descriptors. Some IPs like the display and video decoders access those pixels by using canvas IDs rather than direct phy addresses. As such, allocating/manipulating canvases can be done concurrently and there is a need for a standalone, lock-aware canvas provider module. Currently, canvas code lies in the drm/meson module as it is the sole user. This patchset adds such canvas provider module and converts drm/meson to using it, stripping/moving the current canvas code. Changes since v1: [0] - Convert ops struct to a public API - Added comments - Hid the of-node probe code behind meson_canvas_get - Changed device lock to a spinlock with irqsave [0]: https://lkml.org/lkml/2018/8/1/1512 Maxime Jourdan (4): soc: amlogic: add meson-canvas driver dt-bindings: soc: amlogic: add meson-canvas documentation ARM64: dts: meson-gx: add dmcbus and canvas nodes. drm/meson: convert to the new canvas module .../bindings/display/amlogic,meson-vpu.txt | 9 +- .../soc/amlogic/amlogic,meson-canvas.txt | 36 ++++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 24 ++- drivers/gpu/drm/meson/Kconfig | 1 + drivers/gpu/drm/meson/Makefile | 2 +- drivers/gpu/drm/meson/meson_canvas.c | 70 ------- drivers/gpu/drm/meson/meson_canvas.h | 42 ---- drivers/gpu/drm/meson/meson_crtc.c | 9 +- drivers/gpu/drm/meson/meson_drv.c | 22 +-- drivers/gpu/drm/meson/meson_drv.h | 5 +- drivers/gpu/drm/meson/meson_plane.c | 3 +- drivers/gpu/drm/meson/meson_viu.c | 1 - drivers/soc/amlogic/Kconfig | 7 + drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-canvas.c | 185 ++++++++++++++++++ include/linux/soc/amlogic/meson-canvas.h | 65 ++++++ 16 files changed, 337 insertions(+), 145 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-canvas.txt delete mode 100644 drivers/gpu/drm/meson/meson_canvas.c delete mode 100644 drivers/gpu/drm/meson/meson_canvas.h create mode 100644 drivers/soc/amlogic/meson-canvas.c create mode 100644 include/linux/soc/amlogic/meson-canvas.h