From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-media@vger.kernel.org,
Kieran Bingham <kieran@ksquared.org.uk>
Subject: Re: [PATCH] v4l: ioctl: Clear the v4l2_pix_format_mplane reserved field
Date: Thu, 04 Aug 2016 16:21:42 +0300 [thread overview]
Message-ID: <2087876.N3OQSBIB2n@avalon> (raw)
In-Reply-To: <aa4960c5-780e-bd26-4539-fd867e75f2af@xs4all.nl>
Hi Hans,
On Friday 01 Jul 2016 12:52:31 Hans Verkuil wrote:
> On 06/28/2016 03:20 PM, Laurent Pinchart wrote:
> > The S_FMT and TRY_FMT handlers in multiplane mode attempt at clearing
> > the reserved fields of the v4l2_format structure after the pix_mp
> > member. However, the reserved fields are inside pix_mp, not after it.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > drivers/media/v4l2-core/v4l2-ioctl.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > Kieran, this should fix the v4l2-compliance failures you saw when not
> > clearing pix_mp.reserved manually in the FDP1 driver. Could you please
> > test it ?
> >
> > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c
> > b/drivers/media/v4l2-core/v4l2-ioctl.c index 19d3aee3b374..86332072a575
> > 100644
> > --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> > @@ -1508,7 +1508,7 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops
> > *ops,>
> > case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
> > if (unlikely(!is_rx || !is_vid || !ops-
>vidioc_s_fmt_vid_cap_mplane))
> >
> > break;
> >
> > - CLEAR_AFTER_FIELD(p, fmt.pix_mp);
> > + CLEAR_AFTER_FIELD(p, fmt.pix_mp.xfer_func);
>
> The same is needed in v4l_try_fmt.
Yes it is.
[snip]
Oh, surprise, it's here already :-)
> > @@ -1598,7 +1598,7 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops
> > case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
> > if (unlikely(!is_rx || !is_vid || !ops->
> > vidioc_try_fmt_vid_cap_mplane))
> > break;
> > - CLEAR_AFTER_FIELD(p, fmt.pix_mp);
> > + CLEAR_AFTER_FIELD(p, fmt.pix_mp.xfer_func);
> > return ops->vidioc_try_fmt_vid_cap_mplane(file, fh, arg);
> > case V4L2_BUF_TYPE_VIDEO_OVERLAY:
> > if (unlikely(!is_rx || !is_vid || !ops->
> > vidioc_try_fmt_vid_overlay))
> > @@ -1626,7 +1626,7 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops
> > case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
> > if (unlikely(!is_tx || !is_vid || !ops->
> > vidioc_try_fmt_vid_out_mplane))
> > break;
> > - CLEAR_AFTER_FIELD(p, fmt.pix_mp);
> > + CLEAR_AFTER_FIELD(p, fmt.pix_mp.xfer_func);
> > return ops->vidioc_try_fmt_vid_out_mplane(file, fh, arg);
> > case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
> > if (unlikely(!is_tx || !is_vid ||
> > !ops->vidioc_try_fmt_vid_out_overlay))
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2016-08-04 13:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 13:20 [PATCH] v4l: ioctl: Clear the v4l2_pix_format_mplane reserved field Laurent Pinchart
2016-06-30 12:46 ` Kieran Bingham
2016-07-01 10:52 ` Hans Verkuil
2016-08-04 13:21 ` 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=2087876.N3OQSBIB2n@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hverkuil@xs4all.nl \
--cc=kieran@ksquared.org.uk \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.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