From patchwork Thu Aug 23 11:49:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Jourdan X-Patchwork-Id: 10573771 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 3F04B1926 for ; Thu, 23 Aug 2018 12:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D2B22BD26 for ; Thu, 23 Aug 2018 12:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20E1B2BD6A; Thu, 23 Aug 2018 12:01:26 +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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 C31532BD26 for ; Thu, 23 Aug 2018 12:01:25 +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=oPS2vmP8/kHaGQTKtVUDTpxXzgUhUE5sQssfaRyOgDw=; b=aUD 4DAAROK2C7sfvMS18qwy620vAfwLhmU0d0iRb+HQUzL40OhqyxapoJ9iodGgxgfTDC0cWvoB6YAnT sa52bVOgmaPOOcSwpskD4yT82+mdglrJ3swp5l4B+LKieCtEgmJN2b+0apmn7ll89Wp3QtairmwI0 qo4dvkaBtqyltgrq/hlvKE7OWS5KiCMAuzJc+P0dt5GJGB1eu5XWjbJo0BHgRK2I7Fei2P2fEE17H h1e/SX4oQmCJBPtHt+dm0cY3glyDLNad4j4Icpq/vHGn3RJ8/vfq5DBOd/P+5kZ4NhleFsVmhW8G5 jYODcZcL09FhCTLOW6L+resznLM1GCA==; 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 1fsoIm-0006xC-Fb; Thu, 23 Aug 2018 12:01:24 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fsoIK-0006GO-C6 for linux-amlogic@lists.infradead.org; Thu, 23 Aug 2018 12:01:01 +0000 Received: by mail-wr1-x442.google.com with SMTP id v17-v6so4411896wrr.9 for ; Thu, 23 Aug 2018 05:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=g1mfP/sOo/HQjJ7c7Fb0EYo8huXwFK/AM/SI3qAjqoU=; b=ShXQ+qF+cO44SQLJkTkZyvmZwCKIEiyLgCYDL5oIAxZ3jvStRMbCudlZwZe/Pnv3jp 7XvaddEnUrgfOsYAVtF6lJv/qG/p93CePArRxGUMM3v1prWDDK/LckLsFxPLr+2gbeHg wK2W3T2F7WgMtvNPRNv/qacCJ4wAULCdLz3YTc22e6b0zDnMrk55nWbR9+bQsXKMylb3 jv92OnAhPvxCnPmim1Lp9FXHMaekGNnNqRiPOCn5TM5TDYYlOkZxL2wI2QSB6vujmAc2 gzneUzecmIFnKumXyNWdZ8dpwbUX7K117pmkyoFUj67sMQWUDivtsSm5lDvewrAjt3s/ /6lg== 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; bh=g1mfP/sOo/HQjJ7c7Fb0EYo8huXwFK/AM/SI3qAjqoU=; b=lYxbWQn8mKQE6emYSJxvCONrO+wT0VqPv/9UP6WvGx1iaQ5u1gmS2kAoY4H68ICrMv lvwiQYdhhKMxAvmZVcrnONBSieFVKBr9LPYVcgLLp4LarZXpp3KfsJyZJo9yJsK0SRk+ tG5mUI2HgB9EpVGc86PG6C8j2YCtud6BpSGnirmfyCLE5zTAx+91d2A2b0251AfiktiL U9rYNxH4I4qQm0FTCYDpf2dYg8WHTWiTVxMVf8a+XlMWvymmB6eX8772W+Oi7OFQumkz 3ItAI8WkOGXryBQhWMLV/DgAVuDxsEFgph+TsNDYCYRNG80P1II+p6cOSZW566ZpIenF LS7Q== X-Gm-Message-State: APzg51B477au2r67Gl8UCpz71OGccutlpRSWd8Bm9BWtWy8l+JZp4pT6 EaXd9mNaQ49GxtYlrdzu2NDNiUrJiW0= X-Google-Smtp-Source: ANB0VdZ1eQ867GNMeKV7jfPEvgyYzZLk9x5cwA86rRtVQDs2+8pd3AiPCKOLO5I43bw9+VjmLS7tFw== X-Received: by 2002:adf:e5c4:: with SMTP id a4-v6mr2337085wrn.190.1535025643617; Thu, 23 Aug 2018 05:00:43 -0700 (PDT) Received: from localhost.localdomain (81-67-76-113.rev.numericable.fr. [81.67.76.113]) by smtp.gmail.com with ESMTPSA id y10-v6sm2830419wrl.87.2018.08.23.05.00.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 05:00:42 -0700 (PDT) From: Maxime Jourdan To: linux-amlogic@lists.infradead.org Subject: [PATCH v3 0/3] soc: amlogic: add meson-canvas Date: Thu, 23 Aug 2018 13:49:51 +0200 Message-Id: <20180823114954.30704-1-mjourdan@baylibre.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180823_050056_458962_31E7CE98 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. 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: Maxime Jourdan , devicetree@vger.kernel.org, Neil Armstrong , Kevin Hilman , linux-kernel@vger.kernel.org, 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. Changes since v2: [1] - Don't include the drm changes in the serie. - Remove the syscon node in the dts and doc - Rename meson_canvas_setup to meson_canvas_config 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 [1]: https://lkml.org/lkml/2018/8/7/894 Maxime Jourdan (3): dt-bindings: soc: amlogic: add meson-canvas documentation soc: amlogic: add meson-canvas driver ARM64: dts: meson-gx: add dmcbus and canvas nodes. .../bindings/soc/amlogic/amlogic,canvas.txt | 29 +++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 13 ++ 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 ++++++ 6 files changed, 300 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/amlogic/amlogic,canvas.txt create mode 100644 drivers/soc/amlogic/meson-canvas.c create mode 100644 include/linux/soc/amlogic/meson-canvas.h