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 A7F8F1F4CAE; Sun, 26 Oct 2025 22:28:44 +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=1761517726; cv=none; b=iTVy+trKzmx32QFpJROOf+FTlyByB5MJ5nLYP/wXhANDu9vBqiwcK/O8NB+6b7TXA2Yla++TKvXIfszg1ILVg5KMAtSlII5rqLmUXfQ+j98bBLcUGay9TbAvwjPJ4f/SNR/5gz9Tv5XbLYUvEXJ3bZb8skz1R8B/ltsiJy36SSQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761517726; c=relaxed/simple; bh=VKQFo2wPNIL18CuB3qiB0jANg2tkXXNSpvhyiVgRsMc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YzC0ZZwAg4kOL3eLSj0+s8QBycapg1Q77Al0c+Wu0QVFAj1gNxVvbAYv+slIagB9GtbzxIMgPVFeahWYepU3aJQLSFRVDz4pRX4sQBixKXJPcqlNgAVr4UlCeB6xTmvZMVoS7nbvbX0XNVSUer2pDztnffT2EIW8ZAmSq8edUW4= 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: linux-kernel@vger.kernel.org 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