From: Hans Verkuil <hverkuil@xs4all.nl>
To: Florian Echtler <floe@butterbrot.org>, linux-media@vger.kernel.org
Cc: linux-input@vger.kernel.org, Martin Kaltenbrunner <modin@yuri.at>
Subject: Re: [PATCH v2 1/3] sur40: properly report a single frame rate of 60 FPS
Date: Wed, 6 Jul 2016 10:40:30 +0200 [thread overview]
Message-ID: <577CC3FE.5080200@xs4all.nl> (raw)
In-Reply-To: <cfd020d2-5834-11ac-1b1c-cb98aa872354@xs4all.nl>
On 07/05/16 09:06, Hans Verkuil wrote:
> On 07/05/2016 08:56 AM, Florian Echtler wrote:
>> Hello Hans,
>>
>> On 05.07.2016 08:41, Hans Verkuil wrote:
>>> On 05/31/2016 10:15 PM, Florian Echtler wrote:
>>>> The device hardware is always running at 60 FPS, so report this both via
>>>> PARM_IOCTL and ENUM_FRAMEINTERVALS.
>>>>
>>>> Signed-off-by: Martin Kaltenbrunner <modin@yuri.at>
>>>> Signed-off-by: Florian Echtler <floe@butterbrot.org>
>>>> ---
>>>> drivers/input/touchscreen/sur40.c | 20 ++++++++++++++++++--
>>>> 1 file changed, 18 insertions(+), 2 deletions(-)
>>>>
>>>> @@ -880,6 +893,9 @@ static const struct v4l2_ioctl_ops sur40_video_ioctl_ops = {
>>>> .vidioc_enum_framesizes = sur40_vidioc_enum_framesizes,
>>>> .vidioc_enum_frameintervals = sur40_vidioc_enum_frameintervals,
>>>>
>>>> + .vidioc_g_parm = sur40_ioctl_parm,
>>>> + .vidioc_s_parm = sur40_ioctl_parm,
>>>
>>> Why is s_parm added when you can't change the framerate?
>>
>> Oh, I thought it's mandatory to always have s_parm if you have g_parm
>> (even if it always returns the same values).
>>
>>> Same questions for the
>>> enum_frameintervals function: it doesn't hurt to have it, but if there is only
>>> one unchangeable framerate, then it doesn't make much sense.
>>
>> If you don't have enum_frameintervals, how would you find out about the
>> framerate otherwise? Is g_parm itself enough already for all userspace
>> tools?
>
> It should be. The enum_frameintervals function is much newer than g_parm.
>
> Frankly, I have the same problem with enum_framesizes: it reports only one
> size. These two enum ioctls are normally only implemented if there are at
> least two choices. If there is no choice, then G_FMT will return the size
> and G_PARM the framerate and there is no need to enumerate anything.
>
> The problem is that the spec is ambiguous as to the requirements if there
> is only one choice for size and interval. Are the enum ioctls allowed in
> that case? Personally I think there is nothing against that. But should
> S_PARM also be allowed even though it can't actually change the frameperiod?
>
> Don't bother making changes yet, let me think about this for a bit.
OK, I came to the conclusion that if enum_frameintervals returns one or
more intervals, then s_parm should be present, even if there is only one
possible interval.
I have updated the compliance utility to check for this.
Regards,
Hans
next prev parent reply other threads:[~2016-07-06 8:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 20:15 [PATCH v2 1/3] sur40: properly report a single frame rate of 60 FPS Florian Echtler
2016-05-31 20:15 ` [PATCH v2 2/3] sur40: lower poll interval to fix occasional FPS drops to ~56 FPS Florian Echtler
2016-05-31 20:15 ` [PATCH v2 3/3] sur40: fix occasional oopses on device close Florian Echtler
2016-07-05 6:41 ` [PATCH v2 1/3] sur40: properly report a single frame rate of 60 FPS Hans Verkuil
2016-07-05 6:56 ` Florian Echtler
2016-07-05 7:06 ` Hans Verkuil
2016-07-06 8:40 ` Hans Verkuil [this message]
2016-07-06 20:51 ` Florian Echtler
2016-07-07 6:35 ` Hans Verkuil
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=577CC3FE.5080200@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=floe@butterbrot.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=modin@yuri.at \
/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;
as well as URLs for NNTP newsgroup(s).