From patchwork Fri Feb 4 12:15:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12735020 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 10824C433EF for ; Fri, 4 Feb 2022 12:17:48 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JPu44Pkw5I9kjOzbaQMPXls0VNUtpCNo9ZIEbDMp43M=; b=1+DX6t4+eemW+I 63RbP9+eYVWvPAqqCVCM58ofo5zysGEDJvz0Sz5RzyZPi3des8koLDJ9+wQ326v0t+NdEslZoLoTd EQ/NzlRFnYOu3aTaf/3wRBqcqMaEjaozY+iniyAW4PxvTRksTdvIY/srxsMfe/JMD0cMGcabfnRp4 xcGGkw3g+2IsD4+t4DhUuehzFQoghkGSsAt5YhDmPD/T+Wyd+FFM9jJcJ3xYu6JnURQ/mvKM+0r3a d32Vvun7F5RaZPt7LQTByaZV7liA8qvaDfjlFganDonhc2u7fKJqtgIavhGyG3myj++usb4ejlH/k LcGhVYTDufD16T7kLLpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFxVr-004D6g-3e; Fri, 04 Feb 2022 12:16:27 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFxUx-004CaV-RC for linux-arm-kernel@lists.infradead.org; Fri, 04 Feb 2022 12:15:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1643976931; x=1675512931; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EEvmELRomxbDMI2VuE/soti3drclybeWHepOSKt/hkw=; b=hgi/6zV0NCJkbAxr1/De77j4VOl772336hLIHiYlqeokMp/+urAPUCs4 HL/F2utAj/A5HdcE8Q8q3OQTLeN0L9bEdnEjvhcxcMWcMQHjY3pY7981I 48alHq6D7+wogsSF6n9Wik2ZWLi35rLF4IhClhvytgf1ogbVVnfdOfFK+ 8H18IJxws5nDBd3iByDTob83QKP/7rUGc3dV731TLVlVT22JO/zkfXAEP U7LXRdavMQ+U/RYvLIxMvNHqMcR11BWbv7kzePwLaDOkP2PFsppppxaN8 E4D/m8/6Ax7cQCTVtRuD3XbIx1lox3cXp8SWQnOiHvxut4dEdhJnDvjJO w==; X-IronPort-AV: E=Sophos;i="5.88,342,1635199200"; d="scan'208";a="21903436" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 04 Feb 2022 13:15:26 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 04 Feb 2022 13:15:26 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 04 Feb 2022 13:15:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1643976926; x=1675512926; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EEvmELRomxbDMI2VuE/soti3drclybeWHepOSKt/hkw=; b=mantmV7PeyQB9YOtQOrEWqyKyg2sh4alMqKOVHPHYkD9vJTbpiUa70Zi gSm1zZbUY6IMr963DNaGPof2a4j8gc3lP9gSyRVZAc/6n/uVczJSpmd4f UxO0z7dd19oFxM+LBXILAvXXEjUQ4h+jzDgnK+SwbY7VWMKkz5Kh81mGu +B7QQiiezLR/QtW7fy1nnMmL42AYbT+2i5PpbMmudCVQQ30MTdRuxd71K KdDEjBaywLTRQWpgIPb759dRn9fKIIMGEDsS6TE7oiVWhXXKE9DLytXgk 9sElGxr15C9ztr1V0seP0ibdqTW3hVVeNpGioRB5GZQyc8CKpjmgYRulz g==; X-IronPort-AV: E=Sophos;i="5.88,342,1635199200"; d="scan'208";a="21903435" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 04 Feb 2022 13:15:26 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 26FEC280075; Fri, 4 Feb 2022 13:15:26 +0100 (CET) From: Alexander Stein To: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Rui Miguel Silva , Laurent Pinchart , Dorota Czaplejewicz Cc: Alexander Stein , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] media: imx: utils: Add more Bayer formats Date: Fri, 4 Feb 2022 13:15:13 +0100 Message-Id: <20220204121514.2762676-8-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220204121514.2762676-1-alexander.stein@ew.tq-group.com> References: <20220204121514.2762676-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220204_041532_237452_E3B9B14E X-CRM114-Status: GOOD ( 12.70 ) 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 Without this the ioctl VIDIOC_ENUM_FMT will not list the 10/12/14-Bit Bayer formats. This in return results in "v4l2-ctl --set-fmt-video pixelformat='RG10'" failing to set the pixelformat as it is not enumerated as supported format. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart --- This adds the following formats to `v4l2-ctl --list-formats` [...] [18]: 'BG10' (10-bit Bayer BGBG/GRGR) [19]: 'GB10' (10-bit Bayer GBGB/RGRG) [20]: 'BA10' (10-bit Bayer GRGR/BGBG) [21]: 'RG10' (10-bit Bayer RGRG/GBGB) [22]: 'BG12' (12-bit Bayer BGBG/GRGR) [23]: 'GB12' (12-bit Bayer GBGB/RGRG) [24]: 'BA12' (12-bit Bayer GRGR/BGBG) [25]: 'RG12' (12-bit Bayer RGRG/GBGB) [26]: 'BG14' (14-bit Bayer BGBG/GRGR) [27]: 'GB14' (14-bit Bayer GBGB/RGRG) [28]: 'GR14' (14-bit Bayer GRGR/BGBG) [29]: 'RG14' (14-bit Bayer RGRG/GBGB) [...] drivers/staging/media/imx/imx-media-utils.c | 72 +++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index e0a256a08c3b..ea56c82d3b32 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -130,6 +130,78 @@ static const struct imx_media_pixfmt pixel_formats[] = { .cs = IPUV3_COLORSPACE_RGB, .bpp = 8, .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SBGGR10, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SBGGR10_1X10), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 10, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGBRG10, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGBRG10_1X10), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 10, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGRBG10, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGRBG10_1X10), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 10, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SRGGB10, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SRGGB10_1X10), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 10, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SBGGR12, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SBGGR12_1X12), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 12, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGBRG12, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGBRG12_1X12), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 12, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGRBG12, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGRBG12_1X12), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 12, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SRGGB12, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SRGGB12_1X12), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 12, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SBGGR14, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SBGGR14_1X14), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 14, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGBRG14, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGBRG14_1X14), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 14, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGRBG14, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGRBG14_1X14), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 14, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SRGGB14, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SRGGB14_1X14), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 14, + .bayer = true, }, { .fourcc = V4L2_PIX_FMT_SBGGR16, .codes = IMX_BUS_FMTS(