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, linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC 27/48] v4l2-subdev.h: Add request field to format and selection structures
Date: Mon, 21 Dec 2015 06:00:03 +0200 [thread overview]
Message-ID: <1476580.ayUQBMxAma@avalon> (raw)
In-Reply-To: <5673EC16.6020302@xs4all.nl>
Hi Hans,
On Friday 18 December 2015 12:20:54 Hans Verkuil wrote:
> On 12/17/2015 09:40 AM, Laurent Pinchart wrote:
> > Let userspace specify a request ID when getting or setting formats or
> > selection rectangles.
> >
> > From a userspace point of view the API change is minimized and doesn't
> > require any new ioctl.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > include/uapi/linux/v4l2-subdev.h | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/uapi/linux/v4l2-subdev.h
> > b/include/uapi/linux/v4l2-subdev.h index dbce2b554e02..2f1691ce9df5
> > 100644
> > --- a/include/uapi/linux/v4l2-subdev.h
> > +++ b/include/uapi/linux/v4l2-subdev.h
> > @@ -32,10 +32,12 @@
> > * enum v4l2_subdev_format_whence - Media bus format type
> > * @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only
> > * @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device
> > + * @V4L2_SUBDEV_FORMAT_REQUEST: format stored in request
> > */
> > enum v4l2_subdev_format_whence {
> > V4L2_SUBDEV_FORMAT_TRY = 0,
> > V4L2_SUBDEV_FORMAT_ACTIVE = 1,
> > + V4L2_SUBDEV_FORMAT_REQUEST = 2,
> > };
> >
> > /**
> > @@ -43,12 +45,17 @@ enum v4l2_subdev_format_whence {
> > * @which: format type (from enum v4l2_subdev_format_whence)
> > * @pad: pad number, as reported by the media API
> > * @format: media bus format (format code and frame size)
> > + * @request: request ID (when which is set to V4L2_SUBDEV_FORMAT_REQUEST)
> > + * @reserved2: for future use, set to zero for now
> > + * @reserved: for future use, set to zero for now
> > */
> > struct v4l2_subdev_format {
> > __u32 which;
> > __u32 pad;
> > struct v4l2_mbus_framefmt format;
> > - __u32 reserved[8];
> > + __u16 request;
> > + __u16 reserved2;
> > + __u32 reserved[7];
>
> I would prefer:
>
> __u16 request;
> __u16 reserved[15];
>
> > };
> >
> > /**
> > @@ -139,6 +146,8 @@ struct v4l2_subdev_frame_interval_enum {
> > * defined in v4l2-common.h; V4L2_SEL_TGT_* .
> > * @flags: constraint flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
> > * @r: coordinates of the selection window
> > + * @request: request ID (when which is set to V4L2_SUBDEV_FORMAT_REQUEST)
> > + * @reserved2: for future use, set to zero for now
> > * @reserved: for future use, set to zero for now
> > *
> > * Hardware may use multiple helper windows to process a video stream.
> > @@ -151,7 +160,9 @@ struct v4l2_subdev_selection {
> > __u32 target;
> > __u32 flags;
> > struct v4l2_rect r;
> > - __u32 reserved[8];
> > + __u16 request;
> > + __u16 reserved2;
> > + __u32 reserved[7];
>
> Ditto.
>
> Generally apps do a memset of reserved, and that will just keep working.
> But adding a reserved2 field means that they have to explicitly set
> reserved2 to 0, which won't happen.
Agreed. Consider it fixed.
> > };
> >
> > /* Backwards compatibility define --- to be removed */
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-12-21 4:00 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 8:39 [PATCH/RFC 00/48] Request API and proof-of-concept implementation Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 01/48] v4l: vsp1: Use pipeline display list to decide how to write to modules Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 02/48] v4l: vsp1: Always setup the display list Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 03/48] v4l: vsp1: Simplify frame end processing Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 04/48] v4l: vsp1: Split display list manager from display list Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 05/48] v4l: vsp1: Store the display list manager in the WPF Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 06/48] v4l: vsp1: bru: Don't program background color in control set handler Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 07/48] v4l: vsp1: rwpf: Don't program alpha value " Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 08/48] v4l: vsp1: sru: Don't program intensity " Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 09/48] v4l: vsp1: Don't setup control handler when starting streaming Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 10/48] v4l: vsp1: Enable display list support for the HS[IT], LUT, SRU and UDS Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 11/48] v4l: vsp1: Don't configure RPF memory buffers before calculating offsets Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 12/48] v4l: vsp1: Remove unneeded entity streaming flag Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 13/48] v4l: vsp1: Document calling context of vsp1_pipeline_propagate_alpha() Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 14/48] v4l: vsp1: Fix 80 characters per line violations Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 15/48] v4l: vsp1: Add header display list support Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 16/48] v4l: vsp1: Use display lists with the userspace API Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 17/48] v4l: vsp1: Move subdev initialization code to vsp1_entity_init() Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 18/48] v4l: vsp1: Consolidate entity ops in a struct vsp1_entity_operations Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 19/48] v4l: vsp1: Fix BRU try compose rectangle storage Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 20/48] v4l: vsp1: Add race condition FIXME comment Laurent Pinchart
2015-12-17 8:39 ` [PATCH/RFC 21/48] media: Move media_device link_notify operation to an ops structure Laurent Pinchart
2015-12-18 22:24 ` Sakari Ailus
2015-12-17 8:40 ` [PATCH/RFC 22/48] media: Add per-file-handle data support Laurent Pinchart
2015-12-19 0:40 ` Sakari Ailus
2015-12-17 8:40 ` [PATCH/RFC 23/48] media: Add request API Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 24/48] media: Add per-entity request data support Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 25/48] videodev2.h: Add request field to v4l2_buffer Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 26/48] videodev2.h: Add request field to v4l2_pix_format_mplane Laurent Pinchart
2015-12-18 11:18 ` Hans Verkuil
2015-12-18 17:16 ` Laurent Pinchart
2015-12-18 17:37 ` Geert Uytterhoeven
2015-12-21 3:53 ` Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 27/48] v4l2-subdev.h: Add request field to format and selection structures Laurent Pinchart
2015-12-18 11:20 ` Hans Verkuil
2015-12-21 4:00 ` Laurent Pinchart [this message]
2015-12-17 8:40 ` [PATCH/RFC 28/48] v4l: Support the request API in format operations Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 29/48] v4l: subdev: Add pad config allocator and init Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 30/48] v4l: subdev: Call pad init_cfg operation when opening subdevs Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 31/48] v4l: subdev: Support the request API in format and selection operations Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 32/48] vb2: Add allow_requests flag Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 33/48] vb2: Add helper function to check for request buffers Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 34/48] vb2: Add helper function to queue request-specific buffer Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 35/48] DocBook: media: Document the media request API Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 36/48] DocBook: media: Document the V4L2 " Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 37/48] DocBook: media: Document the subdev selection API Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 38/48] DocBook: media: Document the V4L2 subdev request API Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 39/48] v4l: vsp1: Implement and use the subdev pad::init_cfg configuration Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 40/48] v4l: vsp1: Store active formats in a pad config structure Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 41/48] v4l: vsp1: Store active selection rectangles " Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 42/48] v4l: vsp1: Create a new configure operation to setup modules Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 43/48] v4l: vsp1: Merge RPF and WPF pad ops structures Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 44/48] v4l: vsp1: Pass a media request to the module configure operations Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 45/48] v4l: vsp1: Use __vsp1_video_try_format to initialize format at init time Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 46/48] v4l: vsp1: Support video device formats stored in requests Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 47/48] v4l: vsp1: Pass display list explicitly to configure functions Laurent Pinchart
2015-12-17 8:40 ` [PATCH/RFC 48/48] v4l: vsp1: Support the request API 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=1476580.ayUQBMxAma@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@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