From patchwork Mon Sep 9 19:22:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Chen X-Patchwork-Id: 11138505 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BF3714DB for ; Mon, 9 Sep 2019 19:23:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 786B7218AF for ; Mon, 9 Sep 2019 19:23:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iIpNqKRU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 786B7218AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=0p8OTia8DkR7kTf7Nu3phqgfLP7iCGmIt0YyTBtrwcg=; b=iIpNqKRUpmb1vH Fsw02x6W+5IpQ1qYMGhjgcaijLr9r6M7r4OE+uQ9QlFYLmvtwYPR15HKAOOkeL6ufjRSk83rUSUYD OFfWv7GffVOQ1/o7zadEVOlQuSk01tPUBBSoV2a/7PMHmdsFwFTsZbBDeomxzZXOhim8SMqOP3nqN iG60FaDYhnSGLXExPzLFdYJZmlKEW2Lluw+p3FhAg7W2mVQc9bkBLzCN9tRzUoJTmC2uMEPoitJ9Z lN+3FVeiQx3qG/o33Qshb0CE906nl574lvD4KB4k1fsgqgogwBmQgsKWPln3J5qmtb93K2dPeUMo3 Acfs3Wu/gBjGaDYc3yOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7PGK-0004Ck-BS; Mon, 09 Sep 2019 19:23:44 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7PFp-0003hl-2A; Mon, 09 Sep 2019 19:23:16 +0000 X-UUID: d59fcdd970a845548b26955c7d60a5d5-20190909 X-UUID: d59fcdd970a845548b26955c7d60a5d5-20190909 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 2071261943; Mon, 09 Sep 2019 11:23:09 -0800 Received: from MTKMBS02N1.mediatek.inc (172.21.101.77) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 9 Sep 2019 12:23:07 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 03:22:59 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 03:22:59 +0800 From: To: , , , , Subject: [RFC PATCH V3 1/5] dt-bindings: mt8183: Added DIP dt-bindings Date: Tue, 10 Sep 2019 03:22:40 +0800 Message-ID: <20190909192244.9367-2-frederic.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190909192244.9367-1-frederic.chen@mediatek.com> References: <20190909192244.9367-1-frederic.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_122313_106474_82E2AD7E X-CRM114-Status: GOOD ( 10.15 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, Rynn.Wu@mediatek.com, Allan.Yang@mediatek.com, srv_heupstream@mediatek.com, holmes.chiou@mediatek.com, suleiman@chromium.org, Jerry-ch.Chen@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, christie.yu@mediatek.com, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frederic Chen This patch adds DT binding documentation for the Digital Image Processing (DIP) unit of camera ISP system on Mediatek's SoCs. It depends on the SCP and MDP 3 patch as following: 1. dt-bindings: Add a binding for Mediatek SCP https://patchwork.kernel.org/patch/11027247/ 2. dt-binding: mt8183: Add Mediatek MDP3 dt-bindings https://patchwork.kernel.org/patch/10945603/ Signed-off-by: Frederic Chen --- .../bindings/media/mediatek,mt8183-dip.txt | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8183-dip.txt diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8183-dip.txt b/Documentation/devicetree/bindings/media/mediatek,mt8183-dip.txt new file mode 100644 index 000000000000..3a0435513089 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mt8183-dip.txt @@ -0,0 +1,40 @@ +* Mediatek Digital Image Processor (DIP) + +Digital Image Processor (DIP) unit in Mediatek ISP system is responsible for +image content adjustment according to the tuning parameters. DIP can process +the image form memory buffer and output the processed image to multiple output +buffers. Furthermore, it can support demosaicing and noise reduction on the +images. + +Required properties: +- compatible: "mediatek,mt8183-dip" +- reg: Physical base address and length of the function block register space +- interrupts: interrupt number to the cpu +- iommus: should point to the respective IOMMU block with master port as + argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt + for details. +- mediatek,mdp3: should point to the respective mdp block. DIP hardware + connects to MDP and we can get the processed image with both effect of the + two blocks. +- mediatek,larb: must contain the local arbiters in the current SoCs, see + Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt + for details. +- mediatek,scp: should point to the scp node since the we use SCP + coprocessor to control DIP hardware +- clocks: must contain the local arbiters 5 (LARB5) and DIP clock +- clock-names: must contain "larb5" and "dip" + +Example: + dip: dip@15022000 { + compatible = "mediatek,mt8183-dip"; + mediatek,larb = <&larb5>; + mediatek,mdp3 = <&mdp_rdma0>; + mediatek,scp = <&scp>; + iommus = <&iommu M4U_PORT_CAM_IMGI>; + reg = <0 0x15022000 0 0x6000>; + interrupts = ; + clocks = <&imgsys CLK_IMG_LARB5>, + <&imgsys CLK_IMG_DIP>; + clock-names = "larb5", + "dip"; + }; From patchwork Mon Sep 9 19:22:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Chen X-Patchwork-Id: 11138497 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4FBB14DB for ; Mon, 9 Sep 2019 19:23:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C385B218AF for ; Mon, 9 Sep 2019 19:23:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vDBEnTp4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C385B218AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=dLABQtQi+TzHyPwn2rfL4WDGLf+aQGLbTP6JDy09e7g=; b=vDBEnTp4Cc/M1O mPp7E91PK4gGrdCUTfksRONgB8W3p0eywle+uuk8OxLsE7I7g4Tf0yrBq7RKLXX1avyZmlSvDTjuO ktxa1JrQYL2XsbWUaLBL89lxOxin6vzRbsko/PZw/NcT8lzDor/ckYRDU+kD4gWspKyFO64XW2a2X QDdX1j81xaYhiJyDomcftE863LWcEoqQeSnIrAO8JZrPGL7a84E81Mwz3MX4w4gjIp2aNHUedf6PR 1l7XW4BanLy8qaxpljVU/PSPBnBbcABKpLXMdyTSFlMJ/VvKM1V+NG91iKnpffvqECrGTH63w24qK LY1APhzxzAokUv7moslw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7PG3-0003th-I4; Mon, 09 Sep 2019 19:23:27 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7PFo-0003hf-CY; Mon, 09 Sep 2019 19:23:14 +0000 X-UUID: 9e7452641235465e9edda691daf9fb1b-20190909 X-UUID: 9e7452641235465e9edda691daf9fb1b-20190909 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 639713974; Mon, 09 Sep 2019 11:23:03 -0800 Received: from MTKMBS01N1.mediatek.inc (172.21.101.68) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 9 Sep 2019 12:23:02 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 03:23:01 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 03:23:01 +0800 From: To: , , , , Subject: [RFC PATCH V3 2/5] dts: arm64: mt8183: Add DIP nodes Date: Tue, 10 Sep 2019 03:22:41 +0800 Message-ID: <20190909192244.9367-3-frederic.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190909192244.9367-1-frederic.chen@mediatek.com> References: <20190909192244.9367-1-frederic.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_122312_427438_2D08E62C X-CRM114-Status: UNSURE ( 7.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, Rynn.Wu@mediatek.com, Allan.Yang@mediatek.com, srv_heupstream@mediatek.com, holmes.chiou@mediatek.com, suleiman@chromium.org, Jerry-ch.Chen@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, christie.yu@mediatek.com, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frederic Chen This patch adds nodes for Digital Image Processing (DIP). DIP is embedded in Mediatek SoCs and works with the co-processor to adjust image content according to tuning input data. It also provides image format conversion, resizing, and rotation features. Signed-off-by: Frederic Chen --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 0f2646c9eb65..d7b0fb8230f0 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -513,6 +513,22 @@ #clock-cells = <1>; }; + dip: dip@15022000 { + compatible = "mediatek,mt8183-dip"; + mediatek,larb = <&larb5>; + mediatek,mdp3 = <&mdp_rdma0>; + mediatek,scp = <&scp>; + iommus = <&iommu M4U_PORT_CAM_IMGI>; + reg = <0 0x15022000 0 0x6000>; + interrupts = ; + clocks = + <&imgsys CLK_IMG_LARB5>, + <&imgsys CLK_IMG_DIP>; + clock-names = + "larb5", + "dip"; + }; + vdecsys: syscon@16000000 { compatible = "mediatek,mt8183-vdecsys", "syscon"; reg = <0 0x16000000 0 0x1000>; From patchwork Mon Sep 9 19:22:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Chen X-Patchwork-Id: 11138495 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F084216C1 for ; Mon, 9 Sep 2019 19:23:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1DD2218AF for ; Mon, 9 Sep 2019 19:23:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QRfT2sCx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1DD2218AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=poDTfHOphU5aQGFrYN6b1U3BlYWD+Y0kcdmmlRUrJ3U=; b=QRfT2sCxhA55nw 8TobwImzNcxpwOrEZJtd6IXJmwHepmMc/15jvoyVPyDXze05zvoXwt3vpmXo/8IUyqeDHBGk9GKp7 vwn+N7gqbeyhkY1zUetXZXAC36uQOYKGT+9QaXWz8QK31m1crOnT0M+xFmAQhskfYcR3rxf0E/3Ts BxGMSSyB5c2vF4792KdfM93QzFPYOgPcGljkzwpuIXLMkhvLdwKcVCBIJVHusy+1wCsuIDUom4553 LlfX3JPAQ6SM5CiXKbewAUcplFfGW3QOd5jSaWbegq+iFAGyPjS3uVMPdvuWw5Z0A8iMaEuFdLQ1D IxBg3yO929bysUtYiK4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7PFr-0003jF-AV; Mon, 09 Sep 2019 19:23:15 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7PFo-0003hd-3Q; Mon, 09 Sep 2019 19:23:14 +0000 X-UUID: b0c477a8faa24fd2bacbfaa23f735a19-20190909 X-UUID: b0c477a8faa24fd2bacbfaa23f735a19-20190909 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1816066912; Mon, 09 Sep 2019 11:23:06 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 9 Sep 2019 12:23:05 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 03:23:03 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 03:23:03 +0800 From: To: , , , , Subject: [RFC PATCH V3 3/5] media: platform: Add Mediatek DIP driver KConfig Date: Tue, 10 Sep 2019 03:22:42 +0800 Message-ID: <20190909192244.9367-4-frederic.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190909192244.9367-1-frederic.chen@mediatek.com> References: <20190909192244.9367-1-frederic.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_122312_150951_0B0F081C X-CRM114-Status: UNSURE ( 8.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, Rynn.Wu@mediatek.com, Allan.Yang@mediatek.com, srv_heupstream@mediatek.com, holmes.chiou@mediatek.com, suleiman@chromium.org, Jerry-ch.Chen@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, christie.yu@mediatek.com, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frederic Chen This patch adds KConfig for Mediatek Digital Image Processing driver(DIP). DIP is embedded in Mediatek SoCs. It provides image format conversion, resizing, and rotation function. Signed-off-by: Frederic Chen --- drivers/media/platform/Kconfig | 2 ++ drivers/media/platform/mtk-isp/Kconfig | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 drivers/media/platform/mtk-isp/Kconfig diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 0c725d4dcf80..b8501e1b134f 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -32,6 +32,8 @@ source "drivers/media/platform/davinci/Kconfig" source "drivers/media/platform/omap/Kconfig" +source "drivers/media/platform/mtk-isp/Kconfig" + config VIDEO_ASPEED tristate "Aspeed AST2400 and AST2500 Video Engine driver" depends on VIDEO_V4L2 diff --git a/drivers/media/platform/mtk-isp/Kconfig b/drivers/media/platform/mtk-isp/Kconfig new file mode 100644 index 000000000000..a4267db70c24 --- /dev/null +++ b/drivers/media/platform/mtk-isp/Kconfig @@ -0,0 +1,19 @@ +config VIDEO_MEDIATEK_ISP_DIP + bool "Mediatek Digital Image Processing function" + select VIDEO_V4L2_SUBDEV_API + select VIDEOBUF2_DMA_CONTIG + select VIDEOBUF2_CORE + select VIDEOBUF2_V4L2 + select VIDEOBUF2_MEMOPS + select MEDIA_CONTROLLER + + default n + help + Support the basic Digital Image Processing (DIP) driver. + + DIP driver provides image format conversion, resizing, + and rotation function through the low power hardware. + DIP also supports multiple output feature. It can + generate two or more output image with different effect + based on a single input image at the same time. + From patchwork Mon Sep 9 19:22:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Chen X-Patchwork-Id: 11138513 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3650116C1 for ; Mon, 9 Sep 2019 19:24:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1330E218AF for ; Mon, 9 Sep 2019 19:24:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KVwqw9JF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1330E218AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=LAegnEHkbYYiZnM2/l3Kq5rziLnNICeWyigZ6GzMQdk=; b=KVwqw9JF86T58V zz82xorzfxjg7WJjEbiD3W533z98N2+ZcnFuJ+pTCwukX8w9336odAFBFStNSMO5eZoKk6m1AMCPg OwXKOLx6dPZXkZU+ZDPYVp0lQpjGSThhPadlF+cy2H2Qwl3sEnua+QkghcnMXATLPSe+Y4svqLHiW R+b8FOsxnETAjbSf+eTk9fGwSRnglVMcVYr1kaZKJROkMg6M1mMra3oAtOzf1+2jZph7AG32fzjwi 5iNrPnKTD2iaBcWZ9gloo5IGGKTsmAVJcFcd8O9c+3u2JNlQbJgwKJlSbBVMypOWcl5FHQp7pHVLe Ga5F43aePqr4ypzvazlA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7PGZ-0004Vo-KV; Mon, 09 Sep 2019 19:23:59 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7PG0-0003rc-PA; Mon, 09 Sep 2019 19:23:26 +0000 X-UUID: af31d726f06e4679a75e09d58ad4764e-20190909 X-UUID: af31d726f06e4679a75e09d58ad4764e-20190909 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1298058684; Mon, 09 Sep 2019 11:23:21 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 9 Sep 2019 12:23:20 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 03:23:05 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 03:23:05 +0800 From: To: , , , , Subject: [RFC PATCH V3 5/5] media: platform: mtk-mdp3: Add struct tuning_addr and img_sw_buffer Date: Tue, 10 Sep 2019 03:22:44 +0800 Message-ID: <20190909192244.9367-6-frederic.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190909192244.9367-1-frederic.chen@mediatek.com> References: <20190909192244.9367-1-frederic.chen@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 074492E904B74088ADA67159AC5190E930A3C333F23B371DA799ACABE71B13B22000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_122324_880936_AA76DDA4 X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, Rynn.Wu@mediatek.com, Allan.Yang@mediatek.com, srv_heupstream@mediatek.com, holmes.chiou@mediatek.com, suleiman@chromium.org, Jerry-ch.Chen@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, christie.yu@mediatek.com, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frederic Chen We added a struct tuning_addr which contains a field "present" so that the driver can tell the firmware if we have user tuning dataor not. The strcut img_sw_buffer is also added. This struct has no cpu address field and uses a handle instead so that we don't pass a cpu address to co-processor. Signed-off-by: Frederic Chen --- drivers/media/platform/mtk-mdp3/mtk-img-ipi.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mtk-mdp3/mtk-img-ipi.h b/drivers/media/platform/mtk-mdp3/mtk-img-ipi.h index 9fabe7e8b71d..f61e61faf636 100644 --- a/drivers/media/platform/mtk-mdp3/mtk-img-ipi.h +++ b/drivers/media/platform/mtk-mdp3/mtk-img-ipi.h @@ -38,6 +38,12 @@ struct img_addr { u32 iova; /* Used by IOMMU HW access */ } __attribute__ ((__packed__)); +struct tuning_addr { + u32 present; + u32 pa; /* Used by CM4 access */ + u32 iova; /* Used by IOMMU HW access */ +} __attribute__ ((__packed__)); + struct img_sw_addr { u64 va; /* Used by APMCU access */ u32 pa; /* Used by CM4 access */ @@ -105,16 +111,21 @@ struct img_ipi_frameparam { u64 drv_data; struct img_input inputs[IMG_MAX_HW_INPUTS]; struct img_output outputs[IMG_MAX_HW_OUTPUTS]; - struct img_addr tuning_data; + struct tuning_addr tuning_data; struct img_addr subfrm_data; struct img_sw_addr config_data; struct img_sw_addr self_data; /* u8 pq_data[]; */ } __attribute__ ((__packed__)); +struct img_sw_buffer { + u64 handle; /* Used by APMCU access */ + u32 scp_addr; /* Used by CM4 access */ +} __attribute__ ((__packed__)); + struct img_ipi_param { u8 usage; - struct img_sw_addr frm_param; + struct img_sw_buffer frm_param; } __attribute__ ((__packed__)); struct img_frameparam {