From: Michael Tretter <m.tretter@pengutronix.de>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Jacob Chen <jacob-chen@iotwrt.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH 1/2] media: rockchip: rga: fix field in OUTPUT buffers
Date: Fri, 31 May 2024 16:30:46 +0200 [thread overview]
Message-ID: <ZlnfFu-l0ivMUuf8@pengutronix.de> (raw)
In-Reply-To: <22c65578-c3bf-44cc-a9c2-6e1e29260d3e@xs4all.nl>
On Thu, 30 May 2024 14:47:48 +0200, Hans Verkuil wrote:
> On 28/05/2024 16:05, Michael Tretter wrote:
> > Returned buffers shouldn't contain V4L2_FIELD_ANY as field. Set the
> > field to V4L2_FIELD_NONE, if it isn't set.
> >
> > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> > ---
> > drivers/media/platform/rockchip/rga/rga-buf.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c
> > index 662c81b6d0b5..77c7535893e3 100644
> > --- a/drivers/media/platform/rockchip/rga/rga-buf.c
> > +++ b/drivers/media/platform/rockchip/rga/rga-buf.c
> > @@ -119,6 +119,16 @@ static int rga_buf_prepare(struct vb2_buffer *vb)
> > if (IS_ERR(f))
> > return PTR_ERR(f);
> >
> > + if (V4L2_TYPE_IS_OUTPUT(vb->vb2_queue->type)) {
> > + if (vbuf->field == V4L2_FIELD_ANY)
> > + vbuf->field = V4L2_FIELD_NONE;
> > + if (vbuf->field != V4L2_FIELD_NONE) {
> > + v4l2_err(&ctx->rga->v4l2_dev, "Unsupported field %s\n",
> > + v4l2_field_names[vbuf->field]);
>
> This should be v4l2_dbg: incorrect userspace data should not result in
> spamming of the kernel log. It's fine to report it if debugging is enabled.
I cannot use v4l2_dbg here, as the debug module parameter for the RGA
driver is defined in a different file. I'll just drop the error message
in v2.
Michael
>
> Regards,
>
> Hans
>
> > + return -EINVAL;
> > + }
> > + }
> > +
> > for (i = 0; i < vb->num_planes; i++) {
> > vb2_set_plane_payload(vb, i, f->pix.plane_fmt[i].sizeimage);
> >
> >
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-31 14:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 14:05 [PATCH 0/2] media: rockchip: rga: fix v4l2-compliance errors Michael Tretter
2024-05-28 14:05 ` [PATCH 1/2] media: rockchip: rga: fix field in OUTPUT buffers Michael Tretter
2024-05-30 12:47 ` Hans Verkuil
2024-05-31 14:30 ` Michael Tretter [this message]
2024-05-28 14:05 ` [PATCH 2/2] media: rockchip: rga: fix sequence number handling Michael Tretter
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=ZlnfFu-l0ivMUuf8@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=heiko@sntech.de \
--cc=hverkuil@xs4all.nl \
--cc=jacob-chen@iotwrt.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@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;
as well as URLs for NNTP newsgroup(s).