From patchwork Thu Sep 14 12:40:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 13385164 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id F2497EDE9BF for ; Thu, 14 Sep 2023 12:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=83MZXSXJaxpTqZ0PTsTmQBqTrZnHiO6xA67BrvCL5Lk=; b=aPuQr3XBKL9ine Entpqivym4AD/oxJDm53DGE0aSf8t1Eto5yqQ51qAu9CGSK4bBQV5S+Yao34TLgL01wa90ol2YtxS FQVv50jYcK3fH8WPipw9sQutjlR7EMM1RoQjMssd5QM+7ckND5RmPsWZRNXThARQurwyPJZmri/r5 oP47EdXgPqsQoZ1ipPYcf9rZs57BFtwycJVzy7FjC6q6DSJV0lK5M1tCEyGgVzXd9327PLiwisCvb lzCUWkraxVXLfjQz8552A5kGOh6Lq4kz5pH6tzU1rhK8lCma399CyIlZ11SeMA11XqO0Ga5LOFcq7 1kq5/n7tV+sB+FsfDr6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qglfG-008LpT-0t; Thu, 14 Sep 2023 12:41:46 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qglf7-008LhD-12 for linux-arm-kernel@bombadil.infradead.org; Thu, 14 Sep 2023 12:41:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=L+ING6/FMTTuGJb5ZkzioV+yZitIo47KSIDmfQ83x+E=; b=UJ62u3siahmluvtzXk37EPJ5ko 6n6KD9C0vXQfqtT9UhN012uA+5Iv2iW2Zv4ldeVsq2HO8/ZnqF86Glg6vpSurGGcUUiuxPgnWhqTm +IlNSOle+oU8kM4g0LrQfNkpFTZD+c52aFIvmDc4Eb0f+98FW46ls47+aZ1nWBNXQWXpMxIFYK91i siRGbEitvjQW0+GlllD0TNpBiWfvDzkihl1gVVZMTEL7/29wUfYzDNIJfuumCGb1v92fAOlqdEeeM BurqQE82bvvOiGVm5J8eoilpkszNRE/ETfkrR/Bn+p4hl7PMhzVuBHfJiRxbpUY3V2vQeDCdQTuby yk3jH5qQ==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qglez-007sdJ-0T for linux-arm-kernel@lists.infradead.org; Thu, 14 Sep 2023 12:41:34 +0000 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qglet-0008Mc-KV; Thu, 14 Sep 2023 14:41:23 +0200 From: Michael Tretter Date: Thu, 14 Sep 2023 14:40:45 +0200 Subject: [PATCH 13/13] media: rockchip: rga: add NV12M support MIME-Version: 1.0 Message-Id: <20230914-rockchip-rga-multiplanar-v1-13-abfd77260ae3@pengutronix.de> References: <20230914-rockchip-rga-multiplanar-v1-0-abfd77260ae3@pengutronix.de> In-Reply-To: <20230914-rockchip-rga-multiplanar-v1-0-abfd77260ae3@pengutronix.de> To: Jacob Chen , Ezequiel Garcia , Mauro Carvalho Chehab , Heiko Stuebner , Shengyu Qu , Nicolas Frattaroli , Robin Murphy , Diederik de Haas Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Michael Tretter X-Mailer: b4 0.12.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: m.tretter@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230914_134130_975111_3CB0F33A X-CRM114-Status: GOOD ( 10.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for the multi-planar variants of NV12. The RGA is now able to exchange DMABUFs with other devices that only support multi-planar NV12, for example the Hantro JPEG encoder. Signed-off-by: Michael Tretter --- drivers/media/platform/rockchip/rga/rga.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index e0324341e702..a9b4d4bca733 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -278,6 +278,15 @@ static struct rga_fmt formats[] = { .y_div = 2, .x_div = 1, }, + { + .fourcc = V4L2_PIX_FMT_NV12M, + .color_swap = RGA_COLOR_NONE_SWAP, + .hw_format = RGA_COLOR_FMT_YUV420SP, + .depth = 12, + .uv_factor = 4, + .y_div = 2, + .x_div = 1, + }, { .fourcc = V4L2_PIX_FMT_NV16, .color_swap = RGA_COLOR_NONE_SWAP,