From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Hans de Goede <hansg@kernel.org>
Subject: Re: [RFC PATCH v1 2/4] media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval
Date: Sun, 26 Nov 2023 02:08:02 +0200 [thread overview]
Message-ID: <20231126000802.GA20658@pendragon.ideasonboard.com> (raw)
In-Reply-To: <e71ab7fb-eaac-45de-b31c-27d9ba5f5744@ideasonboard.com>
On Tue, Oct 24, 2023 at 10:11:39AM +0300, Tomi Valkeinen wrote:
> On 24/10/2023 03:51, Laurent Pinchart wrote:
> > Due to a historical mishap, the v4l2_subdev_frame_interval structure
> > is the only part of the V4L2 subdev userspace API that doesn't contain a
> > 'which' field. This prevents trying frame intervals using the subdev
> > 'TRY' state mechanism.
> >
> > Add a 'which' field is simple as the structure has 8 reserved fields.
>
> "Adding"
>
> > This would however break userspace as the field is currently set to 0,
> > corresponding to V4L2_SUBDEV_FORMAT_TRY, while the corresponding ioctls
> > currently operate on the 'ACTIVE' state. We thus need to add a new
>
> That's not the only problem. It wouldn't work even if 0 would be
> 'ACTIVE'. The userspace is required to clear the reserved fields, but
> the newly added 'which' field is no longer a reserved field, and thus
> the userspace might not clear it, leading to it being uninitialized. But
> this is solved with the V4L2_SUBDEV_CLIENT_CAP_WHICH_INTERVAL.
Yes, I didn't claim it would be the only problem :-)
> > subdev client cap, V4L2_SUBDEV_CLIENT_CAP_WHICH_INTERVAL, to indicate
> > that userspace is aware of this new field.
> >
> > All drivers that implement the subdev .g_frame_interval() and
> > .s_frame_interval() operations are updated to return -EINVAL when
>
> .get_frame_interval() and .set_frame_interval() now =).
Will be fixed in v2.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-11-26 0:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 0:51 [RFC PATCH v1 0/4] media: v4l2-subdev: Improve frame interval handling Laurent Pinchart
2023-10-24 0:51 ` [RFC PATCH v1 1/4] media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations Laurent Pinchart
2023-10-24 0:51 ` [RFC PATCH v1 2/4] media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval Laurent Pinchart
2023-10-24 7:11 ` Tomi Valkeinen
2023-11-26 0:08 ` Laurent Pinchart [this message]
2023-10-24 0:51 ` [RFC PATCH v1 3/4] media: v4l2-subdev: Store frame interval in subdev state Laurent Pinchart
2023-10-24 7:21 ` Tomi Valkeinen
2023-10-24 7:38 ` Laurent Pinchart
2023-10-24 7:40 ` Tomi Valkeinen
2023-11-27 10:39 ` Laurent Pinchart
2023-10-24 0:51 ` [RFC PATCH v1 4/4] media: i2c: thp7312: " Laurent Pinchart
2023-10-24 7:31 ` [RFC PATCH v1 0/4] media: v4l2-subdev: Improve frame interval handling Tomi Valkeinen
2023-10-24 7:39 ` Laurent Pinchart
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=20231126000802.GA20658@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=hansg@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
--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