From patchwork Thu Apr 23 20:09:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11506509 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 854111392 for ; Thu, 23 Apr 2020 20:10:39 +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 630E220767 for ; Thu, 23 Apr 2020 20:10:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q9BV0rC/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 630E220767 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.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=4m1+2jnnDwAfiATaY/JkCjOK9ySudCywx1JzGa3q4lQ=; b=q9BV0rC/MAPYWU LQpaByotjG2exPms10tz+AEquMcqB7e3jNIPb2TplsQp92qXLkh6SRUH9JhLD7IMR5QDGCTjVdInJ xFUPQoE3BEw8QO64DUy+gneTyfMwhc2Zw1RsjleA3je98ySLaXxnKtu++OVzPrgHUgjiPLR3HEz8X mMWiVHJMYAO+jz/XMp7cyOPgqJzPbH4kRGfDiC+Cf9KKok1KtfKjJYwU3H1ciETeZIXnW6XKKHqQe xNewW2CZLyHli+e+Bw5TVHxMGouvrNWVdwe4smY7uk4ReAu2fJJ+8vOoPb1lGKM+zATgQF5x8ILlV 6xp3Vk9XLQA46l+v+NIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiAz-0003i0-Rz; Thu, 23 Apr 2020 20:10:25 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiAX-0000zy-1J; Thu, 23 Apr 2020 20:09:59 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id C1A6FE0005; Thu, 23 Apr 2020 20:09:49 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: rockchip-rga: Add PX30 compatible Date: Thu, 23 Apr 2020 22:09:34 +0200 Message-Id: <20200423200937.1039257-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> References: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_130957_211730_BEEF4E92 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Paul Kocialkowski , justin.swartz@risingedge.co.za, Heiko Stuebner , Hans Verkuil , Rob Herring , Thomas Petazzoni , Johan Jonker , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a new compatible for the PX30 Rockchip SoC, which also features a RGA block. Signed-off-by: Paul Kocialkowski --- Documentation/devicetree/bindings/media/rockchip-rga.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.yaml b/Documentation/devicetree/bindings/media/rockchip-rga.yaml index dd645ddccb07..841b70d787f9 100644 --- a/Documentation/devicetree/bindings/media/rockchip-rga.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-rga.yaml @@ -18,6 +18,7 @@ maintainers: properties: compatible: oneOf: + - const: rockchip,px30-rga - const: rockchip,rk3288-rga - const: rockchip,rk3399-rga - items: From patchwork Thu Apr 23 20:09:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11506505 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 420B1912 for ; Thu, 23 Apr 2020 20:10:14 +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 C753F20784 for ; Thu, 23 Apr 2020 20:10:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OxWgo7bw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C753F20784 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.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=n58JM5bN1Ba6PAPiM6K/w6hicOoHy9t/FZQTygm18YA=; b=OxWgo7bwGfspC+ AcP6n7gJSFH/59frgOGSlHYx7cmf1Fm7JJPABV7fku4tZ7bR+h/AqudRunlEQs2uu1YfB97XyjfT/ n1m6SEvsWLX/AEV8RuhkT6oO4Rhvq73WUwuocqqkrMGY1MmHMhP1CXzKFCzrx2/TnvjyfmUueuu5L AcvekYylfQlChxodtrmAbXXSOlOqv0k2hfbgjrNnnAszUyZNS650yqgp7b18n4Si7hc13Y1Jj061d kdYTbrd7n5fRV/UugAekMKZxGhdRfn1CSaJPNYKi+EIcEogb0ZuSuR5uOGlXHPNmy6bcvcm27VDkS Fp1qQ2eXwTyaIYhT1tIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiAb-00013q-65; Thu, 23 Apr 2020 20:10:01 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiAX-00010G-16; Thu, 23 Apr 2020 20:09:59 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A275CE0007; Thu, 23 Apr 2020 20:09:51 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] arm64: dts: rockchip: Add RGA support to the PX30 Date: Thu, 23 Apr 2020 22:09:35 +0200 Message-Id: <20200423200937.1039257-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> References: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_130957_208438_250E68BF X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Paul Kocialkowski , justin.swartz@risingedge.co.za, Heiko Stuebner , Hans Verkuil , Rob Herring , Thomas Petazzoni , Johan Jonker , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The PX30 features a RGA block: add the necessary node to support it. Signed-off-by: Paul Kocialkowski --- arch/arm64/boot/dts/rockchip/px30.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi index f809dd6d5dc3..613703e3d0df 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -1102,6 +1102,17 @@ vopl_mmu: iommu@ff470f00 { status = "disabled"; }; + rga: rga@ff480000 { + compatible = "rockchip,px30-rga"; + reg = <0x0 0xff480000 0x0 0x10000>; + interrupts = ; + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>; + clock-names = "aclk", "hclk", "sclk"; + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru SRST_RGA_H>; + reset-names = "core", "axi", "ahb"; + power-domains = <&power PX30_PD_VO>; + }; + qos_gmac: qos@ff518000 { compatible = "syscon"; reg = <0x0 0xff518000 0x0 0x20>; From patchwork Thu Apr 23 20:09:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11506519 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 0E747912 for ; Thu, 23 Apr 2020 20:11:25 +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 D02D820767 for ; Thu, 23 Apr 2020 20:11:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="djx2p4Qt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D02D820767 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.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=lvdnJWdYiYiockFhG2bTPP6KjZ/DA1iJvg1M7BJNZ08=; b=djx2p4QtMX7rHT V21xl2NKfaUUZnAv/5XmEQL3h8ahD4VF8j0h1x8LxtWVLW8mV2ZTxdtBeMNIJ0Rq77GeLlZrQHd8r m6xUB+KzGHCuzl4HQYZfhOYa9McGoKytUnWxpRnglwVYSmDlWvOmdMb2mSh6W35UTlXo07ox841KF fyTrgD+i0LoeJHdEtGgHQA+P0Ir5k8+nhihdTmUESqXqigxhNxnL/NKH7Nd4On2KYMfm+ht7L5XqH 8v5D+cJ2+ZlKhTN0p/53toBFXJ0tnjWO9EcCK3mtblTqIpoKhonBUJH9A+C0cJhlHwVz5tSjuGKgF D6iYXrhL0/9W0FLOIeWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiBq-0004Xv-Og; Thu, 23 Apr 2020 20:11:18 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiAZ-00010w-IP; Thu, 23 Apr 2020 20:10:01 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 4378DE0006; Thu, 23 Apr 2020 20:09:53 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] media: rockchip: rga: Add support for the PX30 compatible Date: Thu, 23 Apr 2020 22:09:36 +0200 Message-Id: <20200423200937.1039257-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> References: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_130959_750304_DF72CFDA X-CRM114-Status: GOOD ( 11.37 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 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 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Paul Kocialkowski , justin.swartz@risingedge.co.za, Heiko Stuebner , Hans Verkuil , Rob Herring , Thomas Petazzoni , Johan Jonker , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The PX30 SoC has a RGA block, so add the associated compatible to support it. Signed-off-by: Paul Kocialkowski --- drivers/media/platform/rockchip/rga/rga.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index 9d122429706e..4fb4615662b7 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -955,6 +955,9 @@ static const struct dev_pm_ops rga_pm = { }; static const struct of_device_id rockchip_rga_match[] = { + { + .compatible = "rockchip,px30-rga", + }, { .compatible = "rockchip,rk3288-rga", }, From patchwork Thu Apr 23 20:09:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11506513 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 7133F912 for ; Thu, 23 Apr 2020 20:10:52 +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 418B720776 for ; Thu, 23 Apr 2020 20:10:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LDTWmn9E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 418B720776 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.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=gHAuReXu1cNkEV/xiiOQvyWdNtObAayzYNcOU7unm5I=; b=LDTWmn9E/c/Zdq 6BmUE/kHUMFTDAp84JrUZiPLTrOPOV71xe+7g4dBKelZWiHj+lEmG6J3iirLx1cKquKKU36SYFKLm S9yPtILaBXsRJ2mNphwz2G0zBqegv+HeAeiUzQyU1uL4DUj0y24mQFs+47G1GZ2T3Xf2FuLyUPMzU V6mk0izAR15YVRK6CmHPO6RgwTE2PUlI7gPxz2d3RZrN1A4vV/zfPsfWhdEN5ev7uhO7rUPE5B2RT uFY+RGMTRllSkQYPIW9SvQKePgNrU8dXG/RBYW45SGNNGgI/ieDojO1NebNA+E7QK2Ipv4UoTjuFD AiKma+E1JvXblflLRJ8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiBJ-00040L-O7; Thu, 23 Apr 2020 20:10:45 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRiAX-000119-UI; Thu, 23 Apr 2020 20:10:00 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id DB045E000A; Thu, 23 Apr 2020 20:09:54 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] media: rockchip: rga: Only set output CSC mode for RGB input Date: Thu, 23 Apr 2020 22:09:37 +0200 Message-Id: <20200423200937.1039257-5-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> References: <20200423200937.1039257-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_130958_103925_79852A8D X-CRM114-Status: GOOD ( 12.40 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 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 RCVD_IN_MSPIKE_WL Mailspike good senders 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: Paul Kocialkowski , justin.swartz@risingedge.co.za, Heiko Stuebner , Hans Verkuil , Rob Herring , Thomas Petazzoni , Johan Jonker , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Setting the output CSC mode is required for a YUV output, but must not be set when the input is also YUV. Doing this (as tested with a YUV420P to YUV420P conversion) results in wrong colors. Adapt the logic to only set the CSC mode when the output is YUV and the input is RGB. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Paul Kocialkowski --- drivers/media/platform/rockchip/rga/rga-hw.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga-hw.c b/drivers/media/platform/rockchip/rga/rga-hw.c index 4be6dcf292ff..cbffcf986ccf 100644 --- a/drivers/media/platform/rockchip/rga/rga-hw.c +++ b/drivers/media/platform/rockchip/rga/rga-hw.c @@ -216,13 +216,17 @@ static void rga_cmd_set_trans_info(struct rga_ctx *ctx) } if (ctx->out.fmt->hw_format >= RGA_COLOR_FMT_YUV422SP) { - switch (ctx->out.colorspace) { - case V4L2_COLORSPACE_REC709: - dst_info.data.csc_mode = RGA_SRC_CSC_MODE_BT709_R0; - break; - default: - dst_info.data.csc_mode = RGA_DST_CSC_MODE_BT601_R0; - break; + if (ctx->in.fmt->hw_format < RGA_COLOR_FMT_YUV422SP) { + switch (ctx->out.colorspace) { + case V4L2_COLORSPACE_REC709: + dst_info.data.csc_mode = + RGA_SRC_CSC_MODE_BT709_R0; + break; + default: + dst_info.data.csc_mode = + RGA_DST_CSC_MODE_BT601_R0; + break; + } } }