All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Philippe De Muyter <phdm@macq.eu>,
	linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com
Subject: Re: subdev sensor driver and V4L2_FRMIVAL_TYPE_CONTINUOUS/V4L2_FRMIVAL_TYPE_STEPWISE
Date: Tue, 15 Mar 2016 14:40:33 +0200	[thread overview]
Message-ID: <20160315124033.GU11084@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <56E7F7EE.10308@xs4all.nl>

Hi Hans,

On Tue, Mar 15, 2016 at 12:54:22PM +0100, Hans Verkuil wrote:
> On 03/15/16 12:06, Sakari Ailus wrote:
> > Hi Philippe,
> > 
> > On Tue, Mar 15, 2016 at 11:14:17AM +0100, Philippe De Muyter wrote:
> >> Hi,
> >>
> >> Sorry if you read the following twice, but the subject of my previous post
> >> was not precise enough :(
> >>
> >> I am in the process of converting a sensor driver compatible with the imx6
> >> freescale linux kernel, to a subdev driver compatible with a current kernel
> >> and Steve Longerbeam's work.
> >>
> >> My sensor can work at any fps (even fractional) up to 60 fps with its default
> >> frame size or even higher when using crop or "binning'.  That fact is reflected
> >> in my previous implemetation of VIDIOC_ENUM_FRAMEINTERVALS, which answered
> >> with a V4L2_FRMIVAL_TYPE_CONTINUOUS-type reply.
> >>
> >> This seem not possible anymore because of the lack of the needed fields
> >> in the 'struct v4l2_subdev_frame_interval_enum' used to delegate the question
> >> to the subdev driver.  V4L2_FRMIVAL_TYPE_STEPWISE does not seem possible
> >> anymore either.  Has that been replaced by something else or is that
> >> functionality not considered relevant anymorea ?
> > 
> > I think the issue was that the CONTINUOUS and STEPWISE were considered too
> > clumsy for applications and practically no application was using them, or at
> > least the need for these was not seen to be there. They were not added to
> > the V4L2 sub-device implementation of the interface as a result.
> 
> It never made sense to me why the two APIs weren't kept the same.
> 
> My suggestion would be to add step_width and step_height fields to
> struct v4l2_subdev_frame_size_enum, that way you have the same functionality
> back.
> 
> I.e. for discrete formats the min values equal the max values, for continuous
> formats the step values are both 1 (or 0 for compability's sake) and the
> remainder maps to a stepwise range.

On frame intervals... I'm not against changing it if there's a need to.

Cc'ing Laurent who I believe wrote the original API. I probably acked it.

We just needed to add the type field (snatch one from the reserved array),
DISCRETE translates to zero so there are on compatibility issues either.
struct v4l2_frmival_stepwise will consume all remaining reserved entries
with the exception of one, but there is still room for it.

Documentation is needed as well.

I don't think it'd be very pretty but I guess there's no way around that at
this point. We should have had the which field before the interval field.

-- 
Regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

      parent reply	other threads:[~2016-03-15 12:40 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           ` [PATCH 1/2] [media] v4l2-subdev.h: allow V4L2_FRMIVAL_TYPE_CONTINUOUS & _STEPWISE Mauro Carvalho Chehab
2016-03-15 12:40     ` Sakari Ailus [this message]

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=20160315124033.GU11084@valkosipuli.retiisi.org.uk \
    --to=sakari.ailus@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=phdm@macq.eu \
    /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.