From patchwork Thu Apr 16 11:50:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11492871 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 80A42112C for ; Thu, 16 Apr 2020 11:53:11 +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 5E193221EA for ; Thu, 16 Apr 2020 11:53:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QmWa7Nmi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E193221EA 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=QQVoza7goylNOI3C86swRm0tF5RoCPDjnA4w/tVHxZw=; b=QmWa7NmiWzwTD+ Vh5HohUMEuw5ZeELJDUkR3QYjc0E++dGpcbvY5+9d5pP2XsLZ2ku9uEidxy497FBVAK+zh65wGpt2 OoqjUlzUlq1IbwR2x8YaTmsH+xGr16B6M0gNX708/AdhIgKFOLynRyMz3gFJWnxn66PWi6VvJBBnr y8woZYT4xbV1QaQzeFrtbKx10c3OGNArnZCsz9N7LSPo3ixUABK5tJJu1Pk4Ahwpp2sMPh6JW1z5e dYm0iM+dyc8Veji2OrbUS8zwQr2luIEAqz8Zd0Ej+c6alSAt3JFDKt3UqhDk6wZKNBUWA5l6i3J9P NNUz71CLu4XNQ5JWP4XA==; 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 1jP34s-0004wJ-PM; Thu, 16 Apr 2020 11:53:06 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP34q-0004vo-1u; Thu, 16 Apr 2020 11:53:05 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B97FB60018; Thu, 16 Apr 2020 11:52:00 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: rockchip-rga: Add PX30 compatible Date: Thu, 16 Apr 2020 13:50:44 +0200 Message-Id: <20200416115047.233720-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200416115047.233720-1-paul.kocialkowski@bootlin.com> References: <20200416115047.233720-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-20200416_045304_229731_9D68BB50 X-CRM114-Status: GOOD ( 10.64 ) 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.195 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.195 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches 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: Mark Rutland , Paul Kocialkowski , Heiko Stuebner , Rob Herring , Hans Verkuil , Jacob Chen , Thomas Petazzoni , 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.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.txt b/Documentation/devicetree/bindings/media/rockchip-rga.txt index fd5276abfad6..45a9effd05f7 100644 --- a/Documentation/devicetree/bindings/media/rockchip-rga.txt +++ b/Documentation/devicetree/bindings/media/rockchip-rga.txt @@ -6,6 +6,7 @@ BitBLT, alpha blending and image blur/sharpness. Required properties: - compatible: value should be one of the following + "rockchip,px30-rga"; "rockchip,rk3288-rga"; "rockchip,rk3399-rga"; From patchwork Thu Apr 16 11:50:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11492877 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 8FA15112C for ; Thu, 16 Apr 2020 11:54:22 +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 3D9AE206A2 for ; Thu, 16 Apr 2020 11:54:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SvIwaacC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D9AE206A2 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=Lp6T5vp4sdHPXLOu5DtuOyhyCXG3s3CxFEWPu5rzAVA=; b=SvIwaacCL6l3qs nLucEl4disV5OUKKMOWdeyeM5/cvlp2WtatpcKef4JHd5l0yvW9LTBh9lqQczeytOBRp/0/fjCPdg 8r1xJIaj1+9405/XZ2aWQpvGEHskE6vLXAiGtDxLmcF2GRB2PHUKuP6uovaL8qsZeiLv4E19hl4yt 097RX7dqdtvmse0G9ZTEim8cvSlIyBZ3Om5SzdJkgp43BLL8U9cVkDEhvERfgHUUIi52CFtknhsze AD5DvuOmMHVifrWkqzcy90xv4b0r15b0CFd8t7YQN7Zi4XibiEIiwgshKoxPjorh6i138RckmaHCP 3uaiUNxQFbkROxR3cIkg==; 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 1jP360-0005L4-5u; Thu, 16 Apr 2020 11:54:16 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP35w-0005JP-V7; Thu, 16 Apr 2020 11:54:14 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5C51860015; Thu, 16 Apr 2020 11:53:02 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] arm64: dts: rockchip: Add RGA support to the PX30 Date: Thu, 16 Apr 2020 13:50:45 +0200 Message-Id: <20200416115047.233720-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200416115047.233720-1-paul.kocialkowski@bootlin.com> References: <20200416115047.233720-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-20200416_045413_135019_514EBF9E X-CRM114-Status: GOOD ( 11.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.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.195 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.195 listed in wl.mailspike.net] 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: Mark Rutland , Paul Kocialkowski , Heiko Stuebner , Rob Herring , Hans Verkuil , Jacob Chen , Thomas Petazzoni , 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 75908c587511..4bfbee9d4123 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -1104,6 +1104,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 16 11:50:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11492883 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 55E3E112C for ; Thu, 16 Apr 2020 11:55:28 +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 25F2221D7F for ; Thu, 16 Apr 2020 11:55:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Lt51y3lB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25F2221D7F 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=E7H5WLYz2Ij6SwxPIrL/uKKfrR79ONkORqn8RRSmu3g=; b=Lt51y3lB3GhRVn W7m94wqlfOk42oMlbDFcZuYsmNw0uX/YyqiUnbbCBiSYOPkitGJ1V7RF44ZnZdzzZENAqAGiTlvxo qKd3T3lLOJvSuGNPs4J0ofEtTWCVA1Nipwmj8JkF4UCIeQgzusWC64KMIs8l4F64goPsoMAWg797l UsA+NSTnzAPn2zWLox/+DclNJ9AgFs3WIjVQvaWJuE3NpQ5NodGJHqF2WmJ1OX0PFUgXUKZmjGQk+ axVUbat+3m2++BZC5SVw/K3HJdKb4xRwHQQSk5KoaQV63134D3bU+a5hBlxsWQtSto83f56YApVzI AGDgdw8hZ+k8gtem8fvA==; 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 1jP373-0008F2-PF; Thu, 16 Apr 2020 11:55:21 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP36z-0008Ee-Lz; Thu, 16 Apr 2020 11:55:19 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 539EA60019; Thu, 16 Apr 2020 11:54:11 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] media: rockchip: rga: Add support for the PX30 compatible Date: Thu, 16 Apr 2020 13:50:46 +0200 Message-Id: <20200416115047.233720-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200416115047.233720-1-paul.kocialkowski@bootlin.com> References: <20200416115047.233720-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-20200416_045517_863036_0C80F766 X-CRM114-Status: GOOD ( 13.13 ) 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.195 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.195 listed in wl.mailspike.net] 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: Mark Rutland , Paul Kocialkowski , Heiko Stuebner , Rob Herring , Hans Verkuil , Jacob Chen , Thomas Petazzoni , 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index e9ff12b6b5bb..0ebeb9b4c14a 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -880,7 +880,6 @@ static int rga_probe(struct platform_device *pdev) rga->cmdbuf_virt = dma_alloc_attrs(rga->dev, RGA_CMDBUF_SIZE, &rga->cmdbuf_phy, GFP_KERNEL, DMA_ATTR_WRITE_COMBINE); - rga->src_mmu_pages = (unsigned int *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 3); rga->dst_mmu_pages = @@ -955,6 +954,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 16 11:50:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11492889 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 B9057112C for ; Thu, 16 Apr 2020 11:56: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 93F4521D94 for ; Thu, 16 Apr 2020 11:56: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="mREZ2Lgk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93F4521D94 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=mREZ2LgkP/ifw3 5q3W1kEVaXcSdErxXpMm7G/RN4BWaBewUoz+T5A5+itrT4T9+m96PmkOLhXTtnXpd2dLfAKcaOy7L yJd0zt8Uc3ekMbfwap/OBZ9YahLONaqyUFUJT5jYXdKJJ5glMyf81yCRUupUUqOx5UB9wVPKOAsLI rzMqyns8zXC2rZFS1yAUyZpdS0LrSn477xFETDC6DPbohpKEroT41poEq4R3/yflrgD5L/hLQ5bxb V+obkO1VoApT/OMyKRzPKJXNgY7C5on4RD4xO21YbxCq/1IUqi8cXvOm1Hnc2V18r4mxJKq6FeVwg yUj+8I19G/h5OCoqxydg==; 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 1jP37v-0000B9-Bi; Thu, 16 Apr 2020 11:56:15 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jP37s-0000Af-RH; Thu, 16 Apr 2020 11:56:14 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A53EA60015; Thu, 16 Apr 2020 11:55:15 +0000 (UTC) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] media: rockchip: rga: Only set output CSC mode for RGB input Date: Thu, 16 Apr 2020 13:50:47 +0200 Message-Id: <20200416115047.233720-5-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200416115047.233720-1-paul.kocialkowski@bootlin.com> References: <20200416115047.233720-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-20200416_045613_014463_AA8E9FCF X-CRM114-Status: GOOD ( 13.26 ) 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.195 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.195 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches 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: Mark Rutland , Paul Kocialkowski , Heiko Stuebner , Rob Herring , Hans Verkuil , Jacob Chen , Thomas Petazzoni , 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; + } } }