Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Guoniu Zhou <guoniu.zhou@nxp.com>,
	Christian Hemp <c.hemp@phytec.de>,
	Dong Aisheng <aisheng.dong@nxp.com>,
	Jacopo Mondi <jacopo@jmondi.org>,
	linux-media@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] media: nxp: imx8-isi: fix v4l2-compliance test errors
Date: Wed, 25 Sep 2024 22:36:02 +0300	[thread overview]
Message-ID: <20240925193602.GG30399@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240924103304.124085-1-laurentiu.palcu@oss.nxp.com>

Hi Laurentiu,

Thank you for the patch.

On Tue, Sep 24, 2024 at 01:33:04PM +0300, Laurentiu Palcu wrote:
> Running the v4l2-compliance (1.27.0-5208, SHA: af114250d48d) on the m2m
> device fails on the MMAP streaming tests, with the following messages:
> 
> fail: v4l2-test-buffers.cpp(240): g_field() == V4L2_FIELD_ANY
> fail: v4l2-test-buffers.cpp(1508): buf.qbuf(node)
> 
> Apparently, the driver does not properly set the field member of
> vb2_v4l2_buffer struct, returning the default V4L2_FIELD_ANY value which
> is against the guidelines.
> 
> Fixes: cf21f328fcafac ("media: nxp: Add i.MX8 ISI driver")
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> ---
> v2:
>  * set the 'field' in mxc_isi_video_buffer_prepare() as suggested by
>    Laurent;
>  * change the commit subject to make it more generic as the fix does
>    not address only the M2M device compliance errors but also the
>    video capture ones;
> 
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> index ddd42a8f17884..60c55d6839431 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> @@ -898,6 +898,7 @@ int mxc_isi_video_buffer_prepare(struct mxc_isi_dev *isi, struct vb2_buffer *vb2
>  				 const struct v4l2_pix_format_mplane *pix)
>  {
>  	unsigned int i;
> +	struct vb2_v4l2_buffer *v4l2_buf = to_vb2_v4l2_buffer(vb2);

I'll swap those two lines when applying, we usually sort lines (roughly)
by decreasing length.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>  	for (i = 0; i < info->mem_planes; i++) {
>  		unsigned long size = pix->plane_fmt[i].sizeimage;
> @@ -911,6 +912,8 @@ int mxc_isi_video_buffer_prepare(struct mxc_isi_dev *isi, struct vb2_buffer *vb2
>  		vb2_set_plane_payload(vb2, i, size);
>  	}
>  
> +	v4l2_buf->field = pix->field;
> +
>  	return 0;
>  }
>  

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2024-09-25 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 10:33 [PATCH v2] media: nxp: imx8-isi: fix v4l2-compliance test errors Laurentiu Palcu
2024-09-25 19:36 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240925193602.GG30399@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=aisheng.dong@nxp.com \
    --cc=c.hemp@phytec.de \
    --cc=festevam@gmail.com \
    --cc=guoniu.zhou@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=jacopo@jmondi.org \
    --cc=kernel@pengutronix.de \
    --cc=laurentiu.palcu@oss.nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox