Re: [PATCH] media: imx.rst: Update the imx6-sabreauto ADV7180 instructions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/15/19 12:11 PM, Fabio Estevam wrote:
Hi Steve,

On Tue, Oct 15, 2019 at 3:19 PM Steve Longerbeam <slongerbeam@xxxxxxxxx> 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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux