From: Steve Longerbeam <slongerbeam@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Tim Harvey <tharvey@gateworks.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: imx.rst: Update the imx6-sabreauto ADV7180 instructions
Date: Tue, 15 Oct 2019 18:17:58 -0700 [thread overview]
Message-ID: <e41aa4d6-b84f-33ab-0738-e4f14d582172@gmail.com> (raw)
In-Reply-To: <CAOMZO5B5+_3FxUfgzMJzDH-myfXEQgxT8vfa-0L8cYFK8uhsuQ@mail.gmail.com>
On 10/15/19 12:11 PM, Fabio Estevam wrote:
> Hi Steve,
>
> On Tue, Oct 15, 2019 at 3:19 PM Steve Longerbeam <slongerbeam@gmail.com> wrote:
>
>> I submitted the ICAP driver patch quite a while ago, it was ~2 yrs ago I
>> think. Can't seem to find the link unfortunately.
>>
>> I'll work on updating the driver and retesting, and try resubmitting again.
>>
>> Most of the hooks are present in imx-media-fim.c to use the hardware
>> input capture to measure frame intervals. The only missing piece is the
>> ICAP driver itself.
>>
>> The FIM is explained in the imx.rst doc. It is configured and enabled
>> via v4l2 controls. It will report a v4l2_event to userspace during
> Thanks for the explanation.
>
> I read through imx.rst, but it was not clear for me how to actually
> configure/enable it via v4l2 controls.
>
> Could you please provide an example on how I can configure/enable FIM?
>
> Also, would you have an example on how to achieve the following
> behavior explained at imx.rst?
>
> "If the FIM detects a bad frame interval, the ipuX_csiY subdev will
> send the event
> V4L2_EVENT_IMX_FRAME_INTERVAL_ERROR. Userland can register with
> the FIM event notification on the ipuX_csiY subdev device node.
> Userland can issue a streaming restart when this event is received
> to correct the rolling/split image."
Here's a quick example that uses the end-of-frame method to measure fi's
(all other FIM controls are left at the default values):
v4l2-ctl -d0 --set-ctrl=fim_enable=1
# disable input capture method
v4l2-ctl -d0 --set-ctrl=fim_input_capture_edge=0
v4l2-ctl -d0 --stream-mmap
This example will enable the FIM in Input Capture mode (when it is
actually supported), with no skipped frames at stream on, an interval
error tolerance of 20 usec, and no averaging:
v4l2-ctl -d0 --set-ctrl=fim_enable=1
# enable input capture method, on rising edges
v4l2-ctl -d0 --set-ctrl=fim_input_capture_edge=1
v4l2-ctl -d0 --set-ctrl=fim_input_capture_channel=0
v4l2-ctl -d0 --set-ctrl=fim_tolerance_min=20
v4l2-ctl -d0 --set-ctrl=fim_num_skip=0
v4l2-ctl -d0 --set-ctrl=fim_num_average=1
v4l2-ctl -d0 --stream-mmap
While streaming, bad frame interval events can be polled with:
v4l2-ctl -d0 --wait-for-event=0x08000001
I plan to post an update to the imx.rst doc with these FIM usage examples.
I updated the i.MX GPT input capture driver patch and re-tested on my
modified SabreAuto (CSI0_VSYNC signal routed to SD1_DAT0 pad), and
re-posted, you are cc'ed. Hopefully this will actually get looked at
this time.
Steve
next prev parent reply other threads:[~2019-10-16 1:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 15:44 [PATCH] media: imx.rst: Update the imx6-sabreauto ADV7180 instructions Fabio Estevam
2019-10-12 20:14 ` Steve Longerbeam
2019-10-12 20:24 ` Steve Longerbeam
2019-10-12 21:19 ` Fabio Estevam
2019-10-15 15:49 ` Tim Harvey
2019-10-15 15:53 ` Fabio Estevam
2019-10-15 16:07 ` Tim Harvey
2019-10-15 16:16 ` Fabio Estevam
2019-10-15 16:33 ` Tim Harvey
2019-10-15 16:42 ` Fabio Estevam
2019-10-15 18:19 ` Steve Longerbeam
2019-10-15 19:11 ` Fabio Estevam
2019-10-16 1:17 ` Steve Longerbeam [this message]
2019-10-16 1:32 ` Fabio Estevam
2019-10-16 13:04 ` Fabio Estevam
2019-10-16 17:31 ` Steve Longerbeam
2019-10-16 18:54 ` Fabio Estevam
2019-10-16 19:11 ` Steve Longerbeam
2019-10-16 19:51 ` Fabio Estevam
2020-06-25 10:53 ` Hans Verkuil
2020-06-25 11:38 ` Fabio Estevam
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=e41aa4d6-b84f-33ab-0738-e4f14d582172@gmail.com \
--to=slongerbeam@gmail.com \
--cc=festevam@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=tharvey@gateworks.com \
/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