All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Philippe De Muyter <phdm@macqel.be>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl
Subject: Re: [PATCH 1/2] [media] v4l2-subdev.h: allow V4L2_FRMIVAL_TYPE_CONTINUOUS & _STEPWISE
Date: Wed, 13 Jul 2016 12:23:31 -0300	[thread overview]
Message-ID: <20160713122331.62f03637@recife.lan> (raw)
In-Reply-To: <1465683659-12221-1-git-send-email-phdm@macqel.be>

Em Sun, 12 Jun 2016 00:20:59 +0200
Philippe De Muyter <phdm@macqel.be> escreveu:

> add max_interval and step_interval to struct
> v4l2_subdev_frame_interval_enum.
> 
> When filled correctly by the sensor driver, those fields must be
> used as follows by the intermediate level :
> 
> 	struct v4l2_frmivalenum *fival;
> 	struct v4l2_subdev_frame_interval_enum fie;
> 
> 	if (fie.max_interval.numerator == 0) {
> 		fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
> 		fival->discrete = fie.interval;
> 	} else if (fie.step_interval.numerator == 0) {
> 		fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS;
> 		fival->stepwise.min = fie.interval;
> 		fival->stepwise.max = fie.max_interval;
> 	} else {
> 		fival->type = V4L2_FRMIVAL_TYPE_STEPWISE;
> 		fival->stepwise.min = fie.interval;
> 		fival->stepwise.max = fie.max_interval;
> 		fival->stepwise.step = fie.step_interval;
> 	}
> 
> Signed-off-by: Philippe De Muyter <phdm@macqel.be>
> ---
>  include/uapi/linux/v4l2-subdev.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h
> index dbce2b554..846dd36 100644
> --- a/include/uapi/linux/v4l2-subdev.h
> +++ b/include/uapi/linux/v4l2-subdev.h
> @@ -127,7 +127,9 @@ struct v4l2_subdev_frame_interval_enum {
>  	__u32 height;
>  	struct v4l2_fract interval;
>  	__u32 which;
> -	__u32 reserved[8];
> +	struct v4l2_fract max_interval;
> +	struct v4l2_fract step_interval;
> +	__u32 reserved[4];

As this changes the userspace API, you need to also patch the
Documentation/media to reflect such change and explain the meaning
for the new fields.

Please notice that the rst documentation is under the "docs-next"
branch at the media_tree.git. You should either patch against that
or wait for the end for 4.8-rc1, where the documentation will be
merged back on the master branch.

>  };
>  
>  /**


-- 
Thanks,
Mauro

  parent reply	other threads:[~2016-07-13 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 10:14 subdev sensor driver and V4L2_FRMIVAL_TYPE_CONTINUOUS/V4L2_FRMIVAL_TYPE_STEPWISE Philippe De Muyter
2016-03-15 11:06 ` Sakari Ailus
2016-03-15 11:54   ` Hans Verkuil
2016-03-15 11:58     ` Philippe De Muyter
2016-03-15 12:11       ` Hans Verkuil
2016-06-11 22:29         ` [PATCH 1/2] [media] v4l2-subdev.h: allow V4L2_FRMIVAL_TYPE_CONTINUOUS & _STEPWISE Philippe De Muyter
2016-06-11 22:31           ` [PATCH 2/2] media: mx6-camif: add V4L2_FRMIVAL_TYPE_STEPWISE & _CONTINUOUS Philippe De Muyter
     [not found]         ` <1465683659-12221-1-git-send-email-phdm@macqel.be>
2016-07-13 15:23           ` Mauro Carvalho Chehab [this message]
2016-03-15 12:40     ` subdev sensor driver and V4L2_FRMIVAL_TYPE_CONTINUOUS/V4L2_FRMIVAL_TYPE_STEPWISE Sakari Ailus

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=20160713122331.62f03637@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=phdm@macqel.be \
    /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 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.