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 17B671F30C3 for ; Sun, 26 Oct 2025 22:28:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761517724; cv=none; b=r3KbZFuzNlfqE/5NRusdh51u0TU5IS5iL86vVRm2U3cEW0hrzGFhMjb+dNihS4Boxqvd0joQRyE9Ec5XNy8zRv3GC9/B/LTSqWefop0wCeRHKMouNFVrW1Z1yKb5amGD2jqgAyWx/82P2p9tZrsEQKmxjnfZ0CTBJTuJ8Wm42j8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761517724; c=relaxed/simple; bh=VKQFo2wPNIL18CuB3qiB0jANg2tkXXNSpvhyiVgRsMc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tTFP3LlA+oS4EN+SOq3u5Hiygmgw0EJIuAY4qQmtCMABnvW8imp3HANHv3jbls63SOdCA6Ot+cBZbHJlqUkUt3a5huLwyzGrDirab7feJkIka6j/tWDPjcWnQxlK+CHYCubImN9EP/MzTNEd3gh4Zo0sU1j1k1451jCbHAMno5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=razqeGsB; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="razqeGsB" Received: from pendragon.ideasonboard.com (82-203-161-16.bb.dnainternet.fi [82.203.161.16]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C0CFF1F0E; Sun, 26 Oct 2025 23:26:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761517614; bh=VKQFo2wPNIL18CuB3qiB0jANg2tkXXNSpvhyiVgRsMc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=razqeGsBxSglcceb1F4Gdb98xf7ZRp6vHkqCOab9W65FnNoegiSim+m2Fk8fj/49C MrM6YyoR7BoGpLT0pWLToks4e4XLehxL1gMaMbf2ifuo7vwxdXtfqEk5x0cK7Xt1FF Th5s1naHJYqOzkVLYsfVdGGHKcErOyyYxSKhqZ8U= Date: Mon, 27 Oct 2025 00:28:26 +0200 From: Laurent Pinchart To: Frank Li Cc: Guoniu Zhou , Rui Miguel Silva , Martin Kepplinger , Purism Kernel Team , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/4] media: imx8mq-mipi-csi2: Add output filed in csi2_pix_format Message-ID: <20251026222826.GJ13023@pendragon.ideasonboard.com> References: <20250820-csi2_imx8mq-v5-0-e04a6fc593bd@nxp.com> <20250820-csi2_imx8mq-v5-2-e04a6fc593bd@nxp.com> Precedence: bulk X-Mailing-List: imx@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: On Wed, Aug 20, 2025 at 10:31:25AM -0400, Frank Li wrote: > On Wed, Aug 20, 2025 at 07:04:57PM +0800, Guoniu Zhou wrote: > > Add output filed in csi2_pix_format since the format on the > > source pad might change due to unpacking. > > Nit: wrap at 75 chars position > > Add output filed in csi2_pix_format since the format on the source pad s/filed/field/ > might change due to unpacking. > > Treat 0 as meaning the output uses the same format as the input. > > Reviewed-by: Frank Li > > > Signed-off-by: Guoniu Zhou > > --- > > drivers/media/platform/nxp/imx8mq-mipi-csi2.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c > > index 85700655ecad334c61e9b5f9f073e10b6db2618f..ad7adc677e389e0f35b0cf63195279e197907f8c 100644 > > --- a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c > > +++ b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c > > @@ -139,6 +139,7 @@ struct csi_state { > > A kerneldoc block would be good here to document the fields, it's not very clear from the name what the output field is. > > struct csi2_pix_format { > > u32 code; > > + u32 output; > > }; > > > > /* ----------------------------------------------------------------------------- > > @@ -634,6 +635,9 @@ static int imx8mq_mipi_csi_set_fmt(struct v4l2_subdev *sd, > > fmt = v4l2_subdev_state_get_format(sd_state, MIPI_CSI2_PAD_SOURCE); > > *fmt = sdformat->format; > > > > + /* The format on the source pad might change due to unpacking. */ > > + fmt->code = csi2_fmt->output ? : csi2_fmt->code; > > + > > return 0; > > } > > -- Regards, Laurent Pinchart