From: Hans Verkuil <hverkuil@xs4all.nl> To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: Re: [PATCH/RFC 26/48] videodev2.h: Add request field to v4l2_pix_format_mplane Date: Fri, 18 Dec 2015 11:18:26 +0000 [thread overview] Message-ID: <5673EB82.2060903@xs4all.nl> (raw) In-Reply-To: <1450341626-6695-27-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Hi Laurent, On 12/17/2015 09:40 AM, Laurent Pinchart wrote: > Let userspace specify a request ID when getting or setting formats. The > support is limited to the multi-planar API at the moment, extending it > to the single-planar API is possible if needed. > > From a userspace point of view the API change is also minimized and > doesn't require any new ioctl. > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > --- > include/uapi/linux/videodev2.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 5af1d2d87558..5b2a8bc80eb2 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -1973,6 +1973,7 @@ struct v4l2_plane_pix_format { > * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding > * @quantization: enum v4l2_quantization, colorspace quantization > * @xfer_func: enum v4l2_xfer_func, colorspace transfer function > + * @request: request ID > */ > struct v4l2_pix_format_mplane { > __u32 width; > @@ -1987,7 +1988,8 @@ struct v4l2_pix_format_mplane { > __u8 ycbcr_enc; > __u8 quantization; > __u8 xfer_func; > - __u8 reserved[7]; > + __u8 reserved[3]; > + __u32 request; I think I mentioned this before: I feel uncomfortable using 4 bytes of the reserved fields when the request ID is limited to 16 bits anyway. I would prefer a __u16 here. Also put the request field *before* the reserved array, not after. Regards, Hans > } __attribute__ ((packed)); > > /** >
WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil@xs4all.nl> To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: Re: [PATCH/RFC 26/48] videodev2.h: Add request field to v4l2_pix_format_mplane Date: Fri, 18 Dec 2015 12:18:26 +0100 [thread overview] Message-ID: <5673EB82.2060903@xs4all.nl> (raw) In-Reply-To: <1450341626-6695-27-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Hi Laurent, On 12/17/2015 09:40 AM, Laurent Pinchart wrote: > Let userspace specify a request ID when getting or setting formats. The > support is limited to the multi-planar API at the moment, extending it > to the single-planar API is possible if needed. > > From a userspace point of view the API change is also minimized and > doesn't require any new ioctl. > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > --- > include/uapi/linux/videodev2.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 5af1d2d87558..5b2a8bc80eb2 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -1973,6 +1973,7 @@ struct v4l2_plane_pix_format { > * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding > * @quantization: enum v4l2_quantization, colorspace quantization > * @xfer_func: enum v4l2_xfer_func, colorspace transfer function > + * @request: request ID > */ > struct v4l2_pix_format_mplane { > __u32 width; > @@ -1987,7 +1988,8 @@ struct v4l2_pix_format_mplane { > __u8 ycbcr_enc; > __u8 quantization; > __u8 xfer_func; > - __u8 reserved[7]; > + __u8 reserved[3]; > + __u32 request; I think I mentioned this before: I feel uncomfortable using 4 bytes of the reserved fields when the request ID is limited to 16 bits anyway. I would prefer a __u16 here. Also put the request field *before* the reserved array, not after. Regards, Hans > } __attribute__ ((packed)); > > /** >
next prev parent reply other threads:[~2015-12-18 11:18 UTC|newest] Thread overview: 114+ 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 ` 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 ` 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 ` Laurent Pinchart 2015-12-17 8:39 ` [PATCH/RFC 03/48] v4l: vsp1: Simplify frame end processing Laurent Pinchart 2015-12-17 8:39 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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-17 8:39 ` Laurent Pinchart 2015-12-18 22:24 ` Sakari Ailus 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-17 8:40 ` Laurent Pinchart 2015-12-19 0:40 ` Sakari Ailus 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 ` 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 ` 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 ` 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-17 8:40 ` Laurent Pinchart 2015-12-18 11:18 ` Hans Verkuil [this message] 2015-12-18 11:18 ` Hans Verkuil 2015-12-18 17:16 ` Laurent Pinchart 2015-12-18 17:16 ` Laurent Pinchart 2015-12-18 17:37 ` Geert Uytterhoeven 2015-12-18 17:37 ` Geert Uytterhoeven 2015-12-21 3:53 ` Laurent Pinchart 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-17 8:40 ` Laurent Pinchart 2015-12-18 11:20 ` Hans Verkuil 2015-12-18 11:20 ` Hans Verkuil 2015-12-21 4:00 ` Laurent Pinchart 2015-12-21 4:00 ` Laurent Pinchart 2015-12-17 8:40 ` [PATCH/RFC 28/48] v4l: Support the request API in format operations Laurent Pinchart 2015-12-17 8:40 ` 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 ` 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 ` 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 ` Laurent Pinchart 2015-12-17 8:40 ` [PATCH/RFC 32/48] vb2: Add allow_requests flag Laurent Pinchart 2015-12-17 8:40 ` 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 ` 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 ` 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 ` Laurent Pinchart 2015-12-17 8:40 ` [PATCH/RFC 36/48] DocBook: media: Document the V4L2 " Laurent Pinchart 2015-12-17 8:40 ` 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 ` 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 ` 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 ` 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 ` Laurent Pinchart 2015-12-17 8:40 ` [PATCH/RFC 41/48] v4l: vsp1: Store active selection rectangles " Laurent Pinchart 2015-12-17 8:40 ` 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 ` 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 ` 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 ` 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 ` 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 ` 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 ` Laurent Pinchart 2015-12-17 8:40 ` [PATCH/RFC 48/48] v4l: vsp1: Support the request API Laurent Pinchart 2015-12-17 8:40 ` 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=5673EB82.2060903@xs4all.nl \ --to=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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.