From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH v4l-utils 2/2] v4l2-compliance: Fix streams use in testSubDevEnumFrameSize()
Date: Wed, 3 Apr 2024 11:43:09 +0300 [thread overview]
Message-ID: <20240403084309.GP16740@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240403-v4l2-compliance-streams-fixes-v1-2-a1c383cc2139@ideasonboard.com>
Hi Tomi,
Thank you for the patch.
On Wed, Apr 03, 2024 at 11:16:29AM +0300, Tomi Valkeinen wrote:
> We don't pass the stream number to testSubDevEnumFrameSize(), which
> instead always uses stream number 0. This causes failures when the
> subdevice uses streams.
>
> Fix this by adding stream parameter, and passing the correct stream ID.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> utils/v4l2-compliance/v4l2-test-subdevs.cpp | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/utils/v4l2-compliance/v4l2-test-subdevs.cpp b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
> index fe7a9e1d..b2667a3b 100644
> --- a/utils/v4l2-compliance/v4l2-test-subdevs.cpp
> +++ b/utils/v4l2-compliance/v4l2-test-subdevs.cpp
> @@ -121,7 +121,7 @@ static int testSubDevEnumFrameInterval(struct node *node, unsigned which,
> }
>
> static int testSubDevEnumFrameSize(struct node *node, unsigned which,
> - unsigned pad, unsigned code)
> + unsigned pad, unsigned stream, unsigned code)
> {
> struct v4l2_subdev_frame_size_enum fse;
> unsigned num_sizes;
> @@ -130,7 +130,7 @@ static int testSubDevEnumFrameSize(struct node *node, unsigned which,
> memset(&fse, 0, sizeof(fse));
> fse.which = which;
> fse.pad = pad;
> - fse.stream = 0;
> + fse.stream = stream;
> fse.code = code;
> ret = doioctl(node, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, &fse);
> node->has_subdev_enum_fsize |= (ret != ENOTTY) << which;
> @@ -140,7 +140,7 @@ static int testSubDevEnumFrameSize(struct node *node, unsigned which,
> memset(&fie, 0, sizeof(fie));
> fie.which = which;
> fie.pad = pad;
> - fie.stream = 0;
> + fie.stream = stream;
> fie.code = code;
> fail_on_test(doioctl(node, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, &fie) != ENOTTY);
> return ret;
> @@ -156,7 +156,7 @@ static int testSubDevEnumFrameSize(struct node *node, unsigned which,
> memset(&fse, 0xff, sizeof(fse));
> fse.which = which;
> fse.pad = pad;
> - fse.stream = 0;
> + fse.stream = stream;
> fse.code = code;
> fse.index = 0;
> fail_on_test(doioctl(node, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, &fse));
> @@ -266,7 +266,7 @@ int testSubDevEnum(struct node *node, unsigned which, unsigned pad, unsigned str
> fail_on_test(mbus_core_enum.stream != stream);
> fail_on_test(mbus_core_enum.index != i);
>
> - ret = testSubDevEnumFrameSize(node, which, pad, mbus_core_enum.code);
> + ret = testSubDevEnumFrameSize(node, which, pad, stream, mbus_core_enum.code);
> fail_on_test(ret && ret != ENOTTY);
> }
> return 0;
>
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2024-04-03 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 8:16 [PATCH 0/2] v4l2-compliance streams fixes Tomi Valkeinen
2024-04-03 8:16 ` [PATCH v4l-utils 1/2] v4l2-compliance: Fix use of routing on 32-bit platforms Tomi Valkeinen
2024-04-03 8:41 ` Laurent Pinchart
2024-04-03 9:00 ` Hans Verkuil
2024-04-03 8:16 ` [PATCH v4l-utils 2/2] v4l2-compliance: Fix streams use in testSubDevEnumFrameSize() Tomi Valkeinen
2024-04-03 8:43 ` 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=20240403084309.GP16740@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
/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