From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 09/14] media: omap3isp: better VIDIOC_G/S_PARM handling
Date: Wed, 22 Oct 2025 11:09:16 +0300 [thread overview]
Message-ID: <aPiRLPbzWoW4GFXt@kekkonen.localdomain> (raw)
In-Reply-To: <659149538833acf06f40a5660d03809f9f1c7ef6.1760707611.git.hverkuil+cisco@kernel.org>
Hi Hans,
On Fri, Oct 17, 2025 at 03:26:46PM +0200, Hans Verkuil wrote:
> Fix various v4l2-compliance errors relating to timeperframe.
>
> VIDIOC_G/S_PARM is only supported for Video Output, so disable
> these ioctls for Capture devices.
>
> Ensure numerator and denominator are never 0.
>
> Set missing V4L2_CAP_TIMEPERFRAME capability for VIDIOC_S_PARM.
>
> v4l2-compliance:
>
> fail: v4l2-test-formats.cpp(1388): out->timeperframe.numerator == 0 || out->timeperframe.denominator == 0
> test VIDIOC_G/S_PARM: FAIL
>
> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
> ---
> drivers/media/platform/ti/omap3isp/ispvideo.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c
> index 471defa6e7fb..5603586271f5 100644
> --- a/drivers/media/platform/ti/omap3isp/ispvideo.c
> +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c
> @@ -928,7 +928,10 @@ isp_video_set_param(struct file *file, void *fh, struct v4l2_streamparm *a)
>
> if (a->parm.output.timeperframe.denominator == 0)
> a->parm.output.timeperframe.denominator = 1;
> + if (a->parm.output.timeperframe.numerator == 0)
> + a->parm.output.timeperframe.numerator = 1;
I believe S_PARM support has probably been added for v4l2-compliance in the
past. Should there be either a dummy implementation for more or less all
Media device centric drivers or could this be simply omitted?
>
> + a->parm.output.capability = V4L2_CAP_TIMEPERFRAME;
> vfh->timeperframe = a->parm.output.timeperframe;
>
> return 0;
> @@ -1413,6 +1416,7 @@ static int isp_video_open(struct file *file)
> handle->format.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
> isp_video_pix_to_mbus(&handle->format.fmt.pix, &fmt);
> isp_video_mbus_to_pix(video, &fmt, &handle->format.fmt.pix);
> + handle->timeperframe.numerator = 1;
> handle->timeperframe.denominator = 1;
>
> handle->video = video;
> @@ -1532,12 +1536,15 @@ int omap3isp_video_init(struct isp_video *video, const char *name)
> video->video.vfl_type = VFL_TYPE_VIDEO;
> video->video.release = video_device_release_empty;
> video->video.ioctl_ops = &isp_video_ioctl_ops;
> - if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
> + if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
> video->video.device_caps = V4L2_CAP_VIDEO_CAPTURE
> | V4L2_CAP_STREAMING | V4L2_CAP_IO_MC;
> - else
> + v4l2_disable_ioctl(&video->video, VIDIOC_S_PARM);
> + v4l2_disable_ioctl(&video->video, VIDIOC_G_PARM);
> + } else {
> video->video.device_caps = V4L2_CAP_VIDEO_OUTPUT
> | V4L2_CAP_STREAMING | V4L2_CAP_IO_MC;
> + }
>
> video->pipe.stream_state = ISP_PIPELINE_STREAM_STOPPED;
>
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2025-10-22 8:09 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 13:26 [PATCH 00/14] media: omap3isp: v4l2-compliance fixes Hans Verkuil
2025-10-17 13:26 ` [PATCH 01/14] media: omap3isp: configure entity functions Hans Verkuil
2025-10-17 13:26 ` [PATCH 02/14] media: omap3isp: add V4L2_CAP_IO_MC and don't set bus_info Hans Verkuil
2025-10-17 13:26 ` [PATCH 03/14] media: omap3isp: isp_video_mbus_to_pix/pix_to_mbus fixes Hans Verkuil
2025-10-22 7:48 ` Sakari Ailus
2025-12-01 8:27 ` Hans Verkuil
2025-12-01 10:22 ` Sakari Ailus
2025-12-01 12:56 ` Sakari Ailus
2025-12-01 15:35 ` Hans Verkuil
2025-12-01 16:43 ` Sakari Ailus
2025-12-02 7:18 ` Hans Verkuil
2025-10-17 13:26 ` [PATCH 04/14] media: omap3isp: implement enum_fmt_vid_cap/out Hans Verkuil
2025-10-22 7:56 ` Sakari Ailus
2025-12-01 8:40 ` Hans Verkuil
2025-12-01 11:35 ` Sakari Ailus
2025-12-01 13:44 ` Hans Verkuil
2025-12-01 15:27 ` Sakari Ailus
2025-10-17 13:26 ` [PATCH 05/14] media: omap3isp: use V4L2_COLORSPACE_SRGB instead of _JPEG Hans Verkuil
2025-10-17 13:26 ` [PATCH 06/14] media: omap3isp: set initial format Hans Verkuil
2025-10-17 13:26 ` [PATCH 07/14] media: omap3isp: rework isp_video_try/set_format Hans Verkuil
2025-10-22 8:04 ` Sakari Ailus
2025-12-01 8:48 ` Hans Verkuil
2025-12-01 12:42 ` Sakari Ailus
2025-10-17 13:26 ` [PATCH 08/14] media: omap3isp: implement create/prepare_bufs Hans Verkuil
2025-10-22 8:06 ` Sakari Ailus
2025-12-01 8:54 ` Hans Verkuil
2025-12-01 12:42 ` Sakari Ailus
2025-10-17 13:26 ` [PATCH 09/14] media: omap3isp: better VIDIOC_G/S_PARM handling Hans Verkuil
2025-10-22 8:09 ` Sakari Ailus [this message]
2025-12-01 10:28 ` Hans Verkuil
2025-12-01 13:40 ` Hans Verkuil
2025-12-01 15:10 ` Sakari Ailus
2025-10-17 13:26 ` [PATCH 10/14] media: omap3isp: support ctrl events for isppreview Hans Verkuil
2025-10-17 13:26 ` [PATCH 11/14] media: omap3isp: ispccp2: always clamp in ccp2_try_format() Hans Verkuil
2025-10-17 13:26 ` [PATCH 12/14] media: omap3isp: isppreview: always clamp in preview_try_format() Hans Verkuil
2025-10-17 13:26 ` [PATCH 13/14] DO NOT MERGE: media: omap3isp: change default resolution to 864x648 Hans Verkuil
2025-10-17 13:26 ` [PATCH 14/14] DO NOT MERGE: omap3-beagle-xm.dts: add Leopard Imaging li5m03 support Hans Verkuil
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=aPiRLPbzWoW4GFXt@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil+cisco@kernel.org \
--cc=laurent.pinchart@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