From patchwork Wed Mar 9 11:41:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12774984 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 EF659C433EF for ; Wed, 9 Mar 2022 11:45:06 +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=bBUAn6lvkBzmCelQQt+dV32mbuZUnWLolEYjmsUiMEA=; b=fu91gQl9GXrg4s eRGchF6DOL20MFsNUNVkvYc/B6933V+2WrfODKD7JGFoRHu+wyZYlZNWpkvm1B+hqYMdp65B/sntv WuR74n4GT+Fli3JoHkbu3SWHjf7t5n0NzV0CG885KkWDzvnqUyBDJjw+RPHHs90n7mPT1IA8MqgEY xes/bGc+VHMkE/tCxL3M9lMHvf8szjBa5lNvrFl0I6EY4lxzPA4KjI4jfgnznVE7S7lqtzj1Fhwpt 3mcim0nM1mfWj3dx1sloMB8fjKfYduuxJXQboh00xh0SXomFt2y9DcNCHA3FAhYKhFqTOgKbez3pP HTNgcHeV5vt/cGTvxl7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRujE-008Lts-HQ; Wed, 09 Mar 2022 11:43:41 +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 1nRuhc-008L7T-8y for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2022 11:42:02 +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=1646826120; x=1678362120; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T4YRDfFcrypsN9W2qi4iowIurInzo1YRPeKZxqXyGsk=; b=l3CLAjXYvy5ppUYjzzMBN9i8FkbMS9YBJnVSgZFraqi6+UFS6hFGx5gt a0Cga9ZPsM6+kyb9pka//xeNt3QqBPopVBDghiyMt6TnPp03jFEJSGCMY RD7WzOJRcU48SoCkGGb9jmSAvNYtoPZImWqZJ5OIGLYvpPLaVElKMNKsj X9JKaKHKNGJhoHOa40haiPjK+lRPTBuejCR8s7cPynwXVy2umVBAM3Oyr Vj0VTMnhAPXAdOkT2KFEK+bgW56ubWiks3WMxoxtNy2BYJhYKI8/Ku/C1 lLaD2q+3mTzNob/Lx7CRL89EMIDnAFX9QoXATwQM4mNFvLDY4YsMkxK7z A==; X-IronPort-AV: E=Sophos;i="5.90,167,1643670000"; d="scan'208";a="22553370" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 09 Mar 2022 12:41:55 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 09 Mar 2022 12:41:55 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 09 Mar 2022 12:41:55 +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=1646826115; x=1678362115; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T4YRDfFcrypsN9W2qi4iowIurInzo1YRPeKZxqXyGsk=; b=MqDLgsmXxGLsVNwFRYxqjIqhXLzhQXFhNu8iTRbdIO7Q0CWTAWTyFjtd 6UkgWXAB04m/ii+1j2tcaWuHp0gqarh5m4UR7s/nXi3AbLIQq+8kIAVBM nZPOpQAkdRCA6DAE1IRGP4rvtA3MyRT73cWt9Nz1SyKmO9UXDGjJFRLWB UY0g/y0bt4GzrAyx+ZTFX8HO0J/QqXQ9LD7OFsS1AReT9BX35yuPzMuAF plkt43XJvJHlYhO+O4ftNdK1DbYTNDsTrjvqnfep8yGcNc/iLm2cHUj6Q 9PRf+q3o+J5rFocoXDGpYvrMTOOu32Ms50Dd3BD/N6nsutlV2QXE28gBE w==; X-IronPort-AV: E=Sophos;i="5.90,167,1643670000"; d="scan'208";a="22553369" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 09 Mar 2022 12:41:55 +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 EF933280075; Wed, 9 Mar 2022 12:41:54 +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 v3 6/8] media: imx: utils: Add more Bayer formats Date: Wed, 9 Mar 2022 12:41:42 +0100 Message-Id: <20220309114144.120643-7-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220309114144.120643-1-alexander.stein@ew.tq-group.com> References: <20220309114144.120643-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-20220309_034200_675149_02BCDAD3 X-CRM114-Status: GOOD ( 13.17 ) 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. Reviewed-by: Laurent Pinchart Signed-off-by: Alexander Stein --- Changes in v3: * None 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 0152bbcc5150..e69bbe0d6c83 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(