From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C7032F23 for ; Sat, 5 Feb 2022 03:40:40 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 872A7472; Sat, 5 Feb 2022 04:40:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1644032438; bh=M4oWpZz0r0BqnToSL7RS29+fEekesWQcKrZDN5GeO2E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ST7w0dKSwAF4/6257W+6jRHQ4crVFxaz+PmkUYcmu8qPP3eu05D0jrj+q3c4uT/oR LcUJblncmC1jbtnRay7QWpQF0YEXekt7piqiMrwf271c7tQK9j7ZBZ+kygFmLtSZbu twUd50ArBli6uMZWn51/6Qk7qBBC+M8tSGhN0ozc= Date: Sat, 5 Feb 2022 05:40:14 +0200 From: Laurent Pinchart To: Alexander Stein Cc: 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 , Dorota Czaplejewicz , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] media: imx: imx7_media-csi: Add support for additional Bayer patterns Message-ID: References: <20220204121514.2762676-1-alexander.stein@ew.tq-group.com> <20220204121514.2762676-7-alexander.stein@ew.tq-group.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220204121514.2762676-7-alexander.stein@ew.tq-group.com> Hi Alexander, Thank you for the patch. On Fri, Feb 04, 2022 at 01:15:12PM +0100, Alexander Stein wrote: > imx7_csi_configure() allows configuring these Bayer patterns when > starting a stream. So allow these in link_validate() as well. > > Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart > --- > I'm wondering if V4L2_PIX_FMT_SBGGR16 (and their variants) is correct in this > function. imx7_csi_configure() does not list MEDIA_BUS_FMT_Sxxxx16_1X16. > Also I can't find a proper a proper setting in CSI_CR18 of CSI Bridge in > IMX8M Mini RM for RAW16. The feature list names a "16-bit data port for > Bayer data input", but is it actually supported? I do not know anything about > the MIPI CSI data formats though. Maybe someone else can clarify this. The CSI bridge has a 16-bit input. The MIPI_DATA_FORMAT field in CR18 maps to the CSI-2 DT value, and it's not clear if it's only used to filter on the CSI-2 DT, or if it does more than that. If we're lucky, it's the former and we can just use 0x2e. > drivers/staging/media/imx/imx7-media-csi.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c > index 158d2a736c6d..7e737221f187 100644 > --- a/drivers/staging/media/imx/imx7-media-csi.c > +++ b/drivers/staging/media/imx/imx7-media-csi.c > @@ -1004,6 +1004,18 @@ static int imx7_csi_pad_link_validate(struct v4l2_subdev *sd, > case V4L2_PIX_FMT_SGBRG8: > case V4L2_PIX_FMT_SGRBG8: > case V4L2_PIX_FMT_SRGGB8: > + case V4L2_PIX_FMT_SBGGR10: > + case V4L2_PIX_FMT_SGBRG10: > + case V4L2_PIX_FMT_SGRBG10: > + case V4L2_PIX_FMT_SRGGB10: > + case V4L2_PIX_FMT_SBGGR12: > + case V4L2_PIX_FMT_SGBRG12: > + case V4L2_PIX_FMT_SGRBG12: > + case V4L2_PIX_FMT_SRGGB12: > + case V4L2_PIX_FMT_SBGGR14: > + case V4L2_PIX_FMT_SGBRG14: > + case V4L2_PIX_FMT_SGRBG14: > + case V4L2_PIX_FMT_SRGGB14: > case V4L2_PIX_FMT_SBGGR16: > case V4L2_PIX_FMT_SGBRG16: > case V4L2_PIX_FMT_SGRBG16: -- Regards, Laurent Pinchart