Asynchronous triggering


I have a question regarding asynchronous triggering of the image sensor and receiving that triggered frame.

Is it possible to adjust syncpoint of SOF on VI->ISP path? I’m using argus_camera sample app and I got timeouts when the trigger is apart more than 1500ms.
I assume this timeout passed for syncpoint is hardcoded like the VI->EMC path in vi4_fops.c

[  679.262817] fence timeout on [ffffffc18e47a600] after 1500ms
[  679.269084] name=[nvhost_sync:44], current value=1 waiting value=2
[  679.275465] ---- mlocks ----
[  679.278443] 8: locked by channel 6

[  679.282733] fence timeout on [ffffffc05ea15800] after 1500ms
[  679.282740] name=[nvhost_sync:29], current value=119559 waiting value=119560
[  679.282744] ---- mlocks ----
[  679.282756] 8: locked by channel 6
[  679.282770] fence timeout on [ffffffc05ea15400] after 1500ms

Can you point me to source files for configuring VI->ISP path, because almost everything is bypassed in vi driver (vi4_fops.c)

hello d.kristofic,

  1. please refer to Camera Development chapter for the [Camera Architecture Stack], there are two types to access camera streaming, VI-mode and VI-bypass mode.
    we don’t public Camera_Core sources files which stands for the VI-bypass mode.
  2. may I know what’s your use-case. is the capture events sometimes triggering more than 1500ms?

hi JerryChang,

thank you for the reply.

  1. There are different use-cases. For example, when sensor is in master mode you can have longer frame length or longer exposure time, while when sensor is working in slave mode you can have a HW that triggers sensor for a frame.

Simple example. You want to capture cars that are passing by. So, HW that registers a car will trigger image sensor to output a frame (or few). Cars can come by every few seconds/days, you never know.

So the problem is you can’t recover from the timeout without a source code and few workarounds.

  1. Could you please tell me more about VI GPIO functionality. First, GPIO pins VGP1-VGP6 are they connected to a camera connector? Searching the VGP1 pin in TX2-Pinmux-Template results in GPIO_CAM1, VGP2 in GPIO_CAM2 respectively for others.
    What is the logic behind generating a series of 128 PWM pulses?

  2. How are sync points incremented? for example SOF.

hello d.kristofic,

you cannot just power-on camera sensor and forced it only output frames when event triggered.
assume you would like to capture sensor frames with some specific condition, there are two approaches for your use-case.

  1. keep camera steaming, you only handling the image buffer with HW events, ignore rest of image buffers.
  2. launch camera to capture all frames only when event triggered.

you may refer to below kernel sources about gpio controls,


please refer to below sources for TX2’s VI drivers, please check nvhost_syncpt_wait_timeout_ext() for the syncpt incremented.