From patchwork Wed Aug 1 18:51:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Jourdan X-Patchwork-Id: 10552913 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 9A6299093 for ; Wed, 1 Aug 2018 19:53:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 816012A1B3 for ; Wed, 1 Aug 2018 19:53:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7538C2B7C9; Wed, 1 Aug 2018 19:53:21 +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 251C82A1B3 for ; Wed, 1 Aug 2018 19:53:21 +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=M5g2+yczt1DsYtTf2Q8YsTDigOlSnFumBgnCDOj9RcY=; b=t14 FyNA5VcKdhOg63iG4F20Aeo25fjTKg6n00oIHCPTVQ035uFsPqgy5qxlZJoQ3dtwh4+y1DvduHOPz DIOYhwiUAN6ERGXuy7eZ5VrFtGKu0IlZ01zjpZdPE9/rq/Qssv7ipaf4OlC1ifb2U9bDx7HKbgevU whY2GJZTQgBQfZQpEo1hKckYr30Cd4cC9ZTvJd1492tU59CG7CACku00R6YEmTMExnU608WfbXtdK OgiAY6MA5Z6IxUDDz9f+DSW/6MjIkMTX2xaMPempWsxcw/1ZXw5YY5MgurBx2BabbYc2K9adgDRYU /NBoc1ZuX3/GGBAKkIq5EZjRuUAF+pg==; 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 1fkxBP-0007zm-6M; Wed, 01 Aug 2018 19:53:19 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkxBI-0007s2-FY for linux-amlogic@bombadil.infradead.org; Wed, 01 Aug 2018 19:53:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=92c+ZHwx1VxUtD1kpnyaW95oep5OUN0f+KWBWW025WQ=; b=zPP22LsbwC1bvmyI+qZcfG6bG OcxxLgJTI7LvKDDaw8nvAXjMb2R8ZjaaYH+Q7G+DPc3avt5MII9wFBctVFsnvXa+/+cY6khBKTC1m SpInLSnqe1GsqQJ/t0CArAnnEN5BCu3fV6trIzkan9l5MNQenUZNlnLFJd/3gyjsn/STDSIliHlEa 9sQEHcazzWVIEzvVbbWJO4Kn2G+eyfa9yj4je6oYODlFAHq8+8a/IHp9MueY/RUlEPJt1N6hP45dH Ykg2dSvTt6FuJhlPiF9WwnWh5mCetsUPjMSuRUQZHiazP8nw89J6KqU6oHCP0fDXyDeXOb8QZ7+fn ANBKp0lmw==; Received: from smtp10.smtpout.orange.fr ([80.12.242.132] helo=smtp.smtpout.orange.fr) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkwEZ-0000q7-6h for linux-amlogic@lists.infradead.org; Wed, 01 Aug 2018 18:52:32 +0000 Received: from localhost.localdomain ([81.67.76.113]) by mwinf5d86 with ME id Huro1y0012Sg6Vd03urr0A; Wed, 01 Aug 2018 20:51:52 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: bWF4aS5qb3VyZGFuQHdhbmFkb28uZnI= X-ME-Date: Wed, 01 Aug 2018 20:51:52 +0200 X-ME-IP: 81.67.76.113 From: Maxime Jourdan To: linux-amlogic@lists.infradead.org Subject: [PATCH 0/4] soc: amlogic: add meson-canvas driver Date: Wed, 1 Aug 2018 20:51:24 +0200 Message-Id: <20180801185128.23440-1-maxi.jourdan@wanadoo.fr> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_145231_526156_5BFE20EA X-CRM114-Status: GOOD ( 11.45 ) 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 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. 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 | 5 +- drivers/gpu/drm/meson/meson_drv.c | 35 ++-- 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 | 182 ++++++++++++++++++ include/linux/soc/amlogic/meson-canvas.h | 37 ++++ 16 files changed, 319 insertions(+), 141 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