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>,
Dong Aisheng <aisheng.dong@nxp.com>,
Guoniu Zhou <guoniu.zhou@nxp.com>,
Christian Hemp <c.hemp@phytec.de>,
Stefan Riedmueller <s.riedmueller@phytec.de>,
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] media: nxp: imx8-isi: fix m2m device v4l2-compliance test errors
Date: Tue, 24 Sep 2024 01:00:47 +0300 [thread overview]
Message-ID: <20240923220047.GH8227@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240923120048.3200166-1-laurentiu.palcu@oss.nxp.com>
Hi Laurentiu,
Thank you for the patch.
On Mon, Sep 23, 2024 at 03:00:48PM +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.
Strange, I would have sworn v4l2-compliance passed successfully when I
submitted the driver. Maybe it has been updated in the meantime.
> Fixes: cf21f328fcafac ("media: nxp: Add i.MX8 ISI driver")
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> ---
> drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c
> index b71195a3ba256..3f0c9e2ac802d 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c
> @@ -222,6 +222,11 @@ static int mxc_isi_m2m_vb2_buffer_prepare(struct vb2_buffer *vb2)
> struct mxc_isi_m2m_ctx *ctx = vb2_get_drv_priv(vq);
> const struct mxc_isi_m2m_ctx_queue_data *qdata =
> mxc_isi_m2m_ctx_qdata(ctx, vq->type);
> + struct vb2_v4l2_buffer *v4l2_buf = to_vb2_v4l2_buffer(vb2);
> +
> + v4l2_buf->field = vq->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ?
> + ctx->queues.out.format.field :
> + ctx->queues.cap.format.field;
Wouldn't it be better to handle this in mxc_isi_video_buffer_prepare() ?
I think the same issue exists for live capture, not just for M2M
operation.
>
> return mxc_isi_video_buffer_prepare(ctx->m2m->isi, vb2, qdata->info,
> &qdata->format);
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-09-23 22:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 12:00 [PATCH] media: nxp: imx8-isi: fix m2m device v4l2-compliance test errors Laurentiu Palcu
2024-09-23 22:00 ` Laurent Pinchart [this message]
2024-09-24 7:23 ` Laurentiu Palcu
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=20240923220047.GH8227@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=s.riedmueller@phytec.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