Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp111081imm; Tue, 7 Aug 2018 15:01:43 -0700 (PDT) X-Google-Smtp-Source: AA+uWPztUChOkrU9vpMoiWrC7PT3GGT3Z1tzsP4ZMCvMZWjN3beK2n6z6kiex50VVkuyYKihBO++ X-Received: by 2002:a17:902:7584:: with SMTP id j4-v6mr155078pll.184.1533679303611; Tue, 07 Aug 2018 15:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533679303; cv=none; d=google.com; s=arc-20160816; b=Vafxmkeci1iKfQ6BvpXx3OW2s58iwDvKyO/m0pfjAvsUQHS5wbp90XNuwFWFEmVvof KdBcNP+IJlIOZYM4ziTTflcj4ur3SEvGTdi0R/LGKrl+LVPnw7Tzg+JPSrKvxrymY38w 0Piik7t2uV9Qd19MaqLAImo8rcZV6hoKynIV8imjcf8o1M9q6cMWSk0VaKQqR6jI0QOW HsQPy8UHFJ3Wvo275cWr8YzVN/qs6Z7jSfZVnHPBeauNX+6JnWqg4ghmbmjVzHVclaZS 6NpbDcAOzkQRiK9ixJ188v8jAIDByPwufIGAvjSUREuOLzul1v90QFE0sHX6jTnMEFzp Rt7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ItFviOii6JZM6s7+luoWr6qZSmCXjY8bDZcPabZhwvI=; b=od6KOAs1k4J4O3ZhZ1uIstFIP8HAUJ3F/Aq3cy4rlLX/JtH0Ch0P+W0Shh9O6Ac/58 EwGLQVEISYcuzQFBN2CYy+lsYbTZ/H3SM+gFVRiWWaZhUXxJ1wyC8XgSXeGCoxMxF5jm Sa+K3oEnAg6Fqsn1yfQhhoVq4NHkB6xJc8/NFnY/EwwI7xNSzvtGyZv4w958SlwS3sf4 jfpsvVRQi0WCGFDZnLVNLmrvEGegrsUINmYKLaxJkaCjSPAvVv3cNL2uCnYqpjHKEW7m D2bdrAw6qtB4yr5ch72e/VWfdwA5E4dryuCbtJTVGDqDYFd89dw21Y54ZXUo5J5qEKbQ nPSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61-v6si1774812plb.49.2018.08.07.15.01.28; Tue, 07 Aug 2018 15:01:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbeHHARB (ORCPT + 99 others); Tue, 7 Aug 2018 20:17:01 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:49507 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbeHHARB (ORCPT ); Tue, 7 Aug 2018 20:17:01 -0400 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 Cc: Maxime Jourdan , Kevin Hilman , Neil Armstrong , Jerome Brunet , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.18.0