One frame latency/delay in TX1 V4L stack

hello cloundliu,

could you please evaluate the timing for below 5 stages.
(1) sensor initialization → start streaming
(2) start streaming → send the frame start event
(3) send the frame start event → frame start event arrived
(4) frame start event arrived → memory write complete event arrived
(5) start streaming → memory write complete event arrived

please look into below 2 source files,
thanks

kernel/drivers/media/platform/tegra/camera/channel.c
kernel/drivers/media/platform/tegra/camera/vi2_fops.c

hello JerryChang,

I have applied the patch you give, and evaluated the timing for below 2 stages.

(1) send the frame start event → frame start event arrived
one frame, is about 33.33ms

(2)frame start event arrived → memory write complete event arrived
one frame, is about 33.33ms

I found the number of the ring buffer always greater than two, so the delay always greater than one frame. what caused this?

hello cloundliu,

your evaluate result (1) and (2) were same as ours.
since we had the buffer release mechanism to avoid multiple race conditions, is it expected that queue 2 frames in the ring buffer. please refer to below code snippet also.

/* release buffer N at N+2 frame start event */
        if (chan->num_buffers >= (QUEUED_BUFFERS - 1))
                free_ring_buffers(chan, 1);

hello JerryChang,

I have applied the latency improvement patch(0001-drivers-media-camera-Improve-VI-driver-latency) you give.

/* release buffer N at N+2 frame start event */
        if (chan->num_buffers >= (QUEUED_BUFFERS - 1))
                free_ring_buffers(chan, 1);

updated to

} else {
               /* Put buffer into the release queue */
               spin_lock(&chan->release_lock);
               list_add_tail(&buf->queue, &chan->release);
               spin_unlock(&chan->release_lock);
 
               /* Wait up kthread for release */
               wake_up_interruptible(&chan->release_wait);
       }

So the test result is right???

hello cloundliu,

share the evaluation result from our side with the latency improvement patch, 0001-drivers-media-camera-Improve-VI-driver-latency. this was tested with the 30-fps sensor.

(a) start streaming → send the frame start event ~0.0162 ms
(b) send the frame start event → frame start event arrived ~33 ms
(c) frame start event arrived → memory write complete event arrived ~33ms
(d) start streaming → memory write complete event arrived ~66ms

hello JerryChang,

As you can see from the above result, the camera frame latency is greater than 66ms, about two frames. In theoretically, the camera frame latency is >= 1/fps second, is about 33ms for us.

Question about the evaluation result:

  1. when we capture Nth frame, whether the frame start event was Nth or N+1th frame start event?
  2. If it is N+1th frame start event, why memory write complete event occurs a frame later than frame start? Does the camera host finishes its DMA should consume one frame time?

thanks.

hello cloundliu,

-edit-
the frame latency we could achieve now for a 30fps sensor is 66ms.
we would keep investigate this.
thanks

update investigate result.
let’s focus the frame latency in the VI driver. it’s a combination with (A)waiting for start of frame and (B) sensor programming.
take a 30-fps sensor for example.
(A) is the variable timing from 0~33ms
(B) is the fixed value of 33ms.

you could also evaluate the timing of (A) to confirm it’s variable between 0~33ms.
thanks

Hi JerryChang,

Is there any experiments to evaluate the frame latency in the VI driver? Our approach is to capture clock screen by TX1’s camera, then compare the time difference of screenshot. However, as you will see from our test results, this is not the case, the time difference is greater than 66ms.

That’s the conclusion we came to, but whether more accurate measurement actually get the frame latency remains to be seen.

thanks.

hello cloundliu,

the VI driver only handling capture frame from sensor through user space,
which means as below:
in the $TOP/kernel/drivers/media/platform/tegra/camera/channel.c
from capture thread to vb2_buffer_done()

user space need few ms to draw the buffer to display once the buffer arrived.
hence, if you’re comparing the time difference between clock and display, time difference greater than 66ms is expected.

the most precise evaluate method would be adding few debug prints in line to check the latency.
thanks

Any progress on improving latency below 66 ms? I’m seeing the same behavior for a 120 Hz camera.

hello Jimmy Pettersson,

we had some initial latency improvements included in our next JetPack release. (release 28.2)
please wait for public release and testing with latest formal image.
thanks

Thanks Jerry,

I tried L4T 28.2 in the jetpack preview 3.2, on the standard jetson camera (the one shipped with tx2 jetson) I still see roughly ~83 ms when running at 120 FPS.

Is it related to how many buffers the driver as enqueued? From nvcamerasrc element:

(it seems to have a minimum of 10 in que. 10 * 8.33 ~ 83 ms …)

Is it safe to assume this is a driver issue rather than CSI hardware limitation?

Thanks!
Jimmy

hello Jimmy Pettersson,

FYI,
there are some buffering in the kernel driver, please check the code snippet as below,

r28.1_sources/kernel/kernel-4.4/drivers/media/platform/tegra/camera/vi/channel.c

void tegra_channel_ring_buffer(struct tegra_channel *chan,
                               struct vb2_v4l2_buffer *vb,
                               struct timespec *ts, int state)
{
...
         /* release buffer N at N+2 frame start event */
         if (chan->num_buffers >= (QUEUED_BUFFERS - 1))
                 free_ring_buffers(chan, 1);

also,
the latency improvement is included after Jetpack developer preview 3.2
thanks

Hi JerryChang,

Any progress on improving latency for TX2? I have test the R28.1/R28.2, there is nothing improving.
For a 2k-30fps camera, the delay is approximately 120ms on TX2.
Is there any patch to reduce 2-frames delay to 1-frame for kernel ring buffer release?
Like 0001-drivers-media-camera-Improve-VI-driver-latency.7z for TX1.

thanks

hello cloundliu,

may I know how you evaluate the latency?
the latency improvement changes already included in JetPack-3.2
you should manually update the kernel with below two changes for stability issue.
thanks
20180531_topic934387.tar.gz (2.17 KB)

@JerryChang

I have see it on the R28.2 commit log, thank you promptly!

Another question:
How to display quickly through HDMI?The gstreamer pipeline I used as follows:

gst-launch-1.0 v4l2src device=/dev/video0 do-timestamp=true ! \
'video/x-raw, width=2560, height=800,format=UYVY,framerate=30/1' ! nvvidconv ! \
'video/x-raw(memory:NVMM), format=I420, framerate=30/1' ! \
nvoverlaysink sync=false async=false

Then I changed the nvoverlaysink element properties, it became a little fast

sync=false async=false  to sync=true enable-last-sample=false

But after running this command for a while,it report the following error, and video is not flowing.

Additional debug info:
gstbasesink.c(2854):gst_base_sink_is_too_late()
There may be a timestamping problem,or this computer is too slow.
WARNING:A lot of buffers ard being dropped

thanks

Hi,
We suggest you run tegra_multimedia_api\samples\12_camera_v4l2_cuda. tegra_multimedia_api will perform better than gstreamer in latency.

A relative post about glass-to-glass latency with onboard camera:
[url]https://devtalk.nvidia.com/default/topic/1026587/jetson-tx2/csi-latency-is-over-80-milliseconds-/post/5235762/#5235762[/url]

Hi, JerryChang.

I have applied the patch 0001-drivers-media-camera-Improve-VI-driver-latency.7z on R24.2.1.

And it works well to decrease one frame latency on normal environment.

But when the board carried module of tx1 runs in the environment of 66 centigrade, we got a error from serial port.

[  496.741699] video4linux video1: MW_ACK_DONE syncpoint time out!0                                                            
[  496.742511] Unable to handle kernel NULL pointer dereference at virtual address 00000038                                    
[  496.742535] pgd = ffffffc00007d000                                                                                          
[  496.742599] [00000038] *pgd=000000017fc05003, *pmd=000000017fc06003, *pte=00e0000050041407                                  
[  496.742637] Internal error: Oops: 96000046 [#1] PREEMPT SMP                                                                 
[  496.742655] Enter nvdumper_crash_setup_regs                                                                                 
[  496.742724] nvdumper: all registers are saved.                                                                              
[  496.742746] nvdumper: all registers are saved.                                                                              
[  496.792274] nvdumper: all registers are saved.                                                                              
[  496.796718] nvdumper: all registers are saved.                                                                              
[  496.801168] Modules linked in:                                                                                              
[  496.804247] CPU: 2 PID: 2086 Comm: vi-output-1, tc Not tainted 3.10.96+ #1                                                  
[  496.811119] task: ffffffc05e32b200 ti: ffffffc05bb20000 task.ti: ffffffc05bb20000                                           
[  496.818605] PC is at free_ring_buffers+0x3c/0xd0                                                                            
[  496.823221] LR is at tegra_channel_ring_buffer+0x58/0xb8                                                                    
[  496.828528] pc : [<ffffffc00071453c>] lr : [<ffffffc000714628>] pstate: 20000345                                            
[  496.835913] sp : ffffffc05bb23d20                                                                                           
[  496.839225] x29: ffffffc05bb23d20 x28: 0000000000000000                                                                     
[  496.844563] x27: 0000000000000000 x26: ffffffc05bb20000                                                                     
[  496.849900] x25: ffffffc0000d2d04 x24: ffffffc000e1eca0                                                                     
[  496.855236] x23: ffffffc00119a7f0 x22: 0000000000000005                                                                     
[  496.860571] x21: 0000000000000001 x20: 0000000000000001                                                                     
[  496.865909] x19: ffffffc0fc9f8950 x18: e9201438887a295d                                                                     
[  496.871251] x17: 87676c7008db9365 x16: 0000000000000031                                                                     
[  496.876592] x15: 000000000000003a x14: 0000000000000063                                                                     
[  496.881930] x13: 000000000000003d x12: 0000000000000045                                                                     
[  496.887268] x11: 0000000000000043 x10: 0000000000000049                                                                     
[  496.892607] x9 : ffffffc05bb23a10 x8 : ffffffc05e32b720                                                                     
[  496.897946] x7 : 0000000034155555 x6 : 00000000000001f0                                                                     
[  496.903285] x5 : ffffffc0fc9f8950 x4 : 000000000000000b                                                                     
[  496.908627] x3 : 0000000000000005 x2 : 00000000000001e0                                                                     
[  496.913972] x1 : 00000000000001df x0 : 0000000000000000                                                                     
[  496.919313]                                                                                                                 
[  496.919313] PC: 0xffffffc0007144bc:                                                                                         
[  496.924273] 44bc  f9400400 b94002a1 97f23896 f9422a60 f9400400 b9400ea1 97f23892 91000694                                   
[  496.932609] 44dc  910012b5 4b170280 6b0002df 54fffd8c a94153f3 a9425bf5 f9401bf7 a8c47bfd                                   
[  496.940922] 44fc  d65f03c0 a9bd7bfd 910003fd a90153f3 a9025bf5 aa0003f3 2a0103f4 34000541                                   
[  496.949237] 451c  52800035 528000b6 b945da60 9102d800 f8607a60 b948d661 11000422 b908d662                                   
[  496.957544] 453c  b9003801 b9001015 b9450e62 b9426001 34000041 b9005802 b9491661 7100043f                                   
[  496.965855] 455c  54000081 b945e261 7100043f 54000088 b945da61 9105a021 b8217a76 b945da61                                   
[  496.974223] 457c  11000422 b905da62 8b214a61 b945a021 97ffb3e4 b945da60 71000c1f 54000049                                   
[  496.982555] 459c  b905da7f b945de60 51000400 b905de60 b945e260 11000400 b905e260 71000694                                   
[  496.990886]                                                                                                                 
[  496.990886] LR: 0xffffffc0007145a8:                                                                                         
[  496.995849] 45a8  b905de60 b945e260 11000400 b905e260 71000694 54fffb41 a94153f3 a9425bf5                                   
[  497.004184] 45c8  a8c37bfd d65f03c0 a9bd7bfd 910003fd a90153f3 f90013f5 aa0003f3 aa0103f4                                   
[  497.012544] 45e8  39644400 35000060 52800020 39244660 f9400040 f9000e80 f9400441 d2807d00                                   
[  497.020903] 4608  9ac00c20 f9001280 b9491660 7100041f 540000e0 aa1303e0 b945de61 97ffffb7                                   
[  497.029261] 4628  aa1303e0 97fffa85 14000012 91217275 aa1503e0 940d91f7 910d2281 91212262                                   
[  497.037601] 4648  f9442a60 f9042a61 f901a682 f901aa80 f9000001 aa1503e0 940d923d 91184260                                   
[  497.045940] 4668  52800021 2a0103e2 d2800003 97e7283d a94153f3 f94013f5 a8c37bfd d65f03c0                                   
[  497.054279] 4688  a9bd7bfd 910003fd a90153f3 aa0003f3 97ffff14 aa0003f4 b4000320 f9449a60                                   
[  497.062617]                                                                                                                 
[  497.062617] SP: 0xffffffc05bb23ca0:                                                                                         
[  497.067580] 3ca0  00000001 00000000 00000001 00000000 00000005 00000000 0119a7f0 ffffffc0                                   
[  497.075916] 3cc0  00e1eca0 ffffffc0 000d2d04 ffffffc0 5bb20000 ffffffc0 00000000 00000000                                   
[  497.084442] 3ce0  00000000 00000000 5bb23d20 ffffffc0 00714628 ffffffc0 5bb23d20 ffffffc0                                   
[  497.093166] 3d00  0071453c ffffffc0 20000345 00000000 5bb23d20 ffffffc0 003a27ec ffffffc0                                   
[  497.101913] 3d20  5bb23d50 ffffffc0 00714628 ffffffc0 fc9f8950 ffffffc0 ddddd800 ffffffc0                                   
[  497.110632] 3d40  fc9f91ac ffffffc0 fc9f8f60 ffffffc0 5bb23d80 ffffffc0 0071475c ffffffc0                                   
[  497.119365] 3d60  fc9f8950 ffffffc0 ddddd800 ffffffc0 fc9f91ac ffffffc0 5bb23e18 ffffffc0                                   
[  497.128103] 3d80  5bb23db0 ffffffc0 00714d1c ffffffc0 fc9f8950 ffffffc0 ddddd800 ffffffc0                                   
[  497.136871]                                                                                                                 
[  497.136871] X5: 0xffffffc0fc9f88d0:                                                                                         
[  497.141907] 88d0  00000040 00000001 00000001 00000001 00000002 00000000 00000001 00000003                                   
[  497.150638] 88f0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.159381] 8910  00256111 00000000 00000001 00000000 00000000 00000000 00000000 00000002                                   
[  497.168109] 8930  00000001 0003cc00 076a7000 00000000 00000001 00000000 01083108 ffffffc0                                   
[  497.176830] 8950  00000000 00000000 00000000 00000000 fc9f9298 ffffffc0 fc9f8028 ffffffc0                                   
[  497.185554] 8970  fc6e80e8 ffffffc0 00000002 00000000 fc9f8cb0 ffffffc0 00010001 00000000                                   
[  497.194282] 8990  00000000 00000000 00000000 00010001 00010001 00000000 fc9f8d60 ffffffc0                                   
[  497.203029] 89b0  fc6c7e00 ffffffc0 00000000 00000000 00000001 00000000 00000000 00000000                                   
[  497.211780]                                                                                                                 
[  497.211780] X8: 0xffffffc05e32b6a0:                                                                                         
[  497.216815] b6a0  2c312d74 00637420 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.225556] b6c0  fdee0940 ffffffc0 5e32b200 ffffffc0 fdee0940 ffffffc0 00feb5c0 ffffffc0                                   
[  497.234289] b6e0  00000000 00000000 00feb5c0 ffffffc0 00feb5c0 ffffffc0 01140e60 ffffffc0                                   
[  497.243030] b700  da0a3080 ffffffc0 011e2ee8 ffffffc0 5bb23990 ffffffc0 5bb23990 ffffffc0                                   
[  497.251755] b720  00086b08 ffffffc0 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.260491] b740  25252525 25252525 25252525 25252525 746e6f43 2d746e65 676e654c 203a6874                                   
[  497.269236] b760  00006425 00000000 746e6f43 2d746e65 00000000 00000000 00000000 00000000                                   
[  497.278002] b780  ffff0000 ffffffff 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.286741]                                                                                                                 
[  497.286741] X9: 0xffffffc05bb23990:                                                                                         
[  497.291778] 3990  5bb239c0 ffffffc0 0009abc8 ffffffc0 00000000 00000000 00000038 00000000                                   
[  497.300510] 39b0  5bb23c00 ffffffc0 5e32b200 ffffffc0 5bb23b40 ffffffc0 0009ac90 ffffffc0                                   
[  497.309240] 39d0  96000046 00000000 01011e40 ffffffc0 00000038 00000000 5bb23c00 ffffffc0                                   
[  497.317990] 39f0  20000345 00000000 00000025 00000000 000d2d04 ffffffc0 5bb20000 ffffffc0                                   
[  497.326717] 3a10  00000000 00000000 00000000 00000000 5bb23a60 ffffffc0 0012e4d8 ffffffc0                                   
[  497.335466] 3a30  00fe80f0 ffffffc0 1ef1d000 00000000 000001c0 00000000 00000001 01400000                                   
[  497.344193] 3a50  1ff050f0 ffffffc0 5bb23b60 ffffffc0 5bb23aa0 ffffffc0 000b1160 ffffffc0                                   
[  497.352943] 3a70  5bb20000 ffffffc0 5bb23b60 ffffffc0 00000002 00000000 00000000 00000000                                   
[  497.361709]                                                                                                                 
[  497.361709] X19: 0xffffffc0fc9f88d0:                                                                                        
[  497.366830] 88d0  00000040 00000001 00000001 00000001 00000002 00000000 00000001 00000003                                   
[  497.375580] 88f0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.384305] 8910  00256111 00000000 00000001 00000000 00000000 00000000 00000000 00000002                                   
[  497.393032] 8930  00000001 0003cc00 076a7000 00000000 00000001 00000000 01083108 ffffffc0                                   
[  497.401757] 8950  00000000 00000000 00000000 00000000 fc9f9298 ffffffc0 fc9f8028 ffffffc0                                   
[  497.410496] 8970  fc6e80e8 ffffffc0 00000002 00000000 fc9f8cb0 ffffffc0 00010001 00000000                                   
[  497.419221] 8990  00000000 00000000 00000000 00010001 00010001 00000000 fc9f8d60 ffffffc0                                   
[  497.427974] 89b0  fc6c7e00 ffffffc0 00000000 00000000 00000001 00000000 00000000 00000000                                   
[  497.436734]                                                                                                                 
[  497.436734] X23: 0xffffffc00119a770:                                                                                        
[  497.441856] a770  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.450585] a790  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.459318] a7b0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.468035] a7d0  00000000 00000000 00000000 00000000 00000000 00000000 00110011 00000000                                   
[  497.476760] a7f0  00000000 00000000 00000000 00000000 01090040 ffffffc0 34155555 00000018                                   
[  497.485495] a810  0002ee00 00000000 3d8b7c3c 00000002 7fff0600 00009896 0000fa00 00000000                                   
[  497.494226] a830  0098967f 00000000 572c3027 00000000 44b4bc00 003a699c 00000000 00000000                                   
[  497.502975] a850  00000008 00000000 a8d3d1c9 ffffffff 1dde1ece 00000000 38af4732 144be403                                   
[  497.511715]                                                                                                                 
[  497.511715] X24: 0xffffffc000e1ec20:                                                                                        
[  497.516838] ec20  635f7469 65646c68 00746978 00000000 67697326 72673e2d 5f70756f 65737772                                   
[  497.525574] ec40  0000006d 00000000 67697326 72633e2d 675f6465 64726175 74756d5f 00007865                                   
[  497.534299] ec60  6d6f682f 2f642f65 6b6e656a 2f736e69 5f387838 70637363 656b5f6c 6c656e72                                   
[  497.543033] ec80  636e692f 6564756c 6e696c2f 692f7875 6e6f636f 74786574 0000682e 00000000                                   
[  497.551765] eca0  6d6f682f 2f642f65 6b6e656a 2f736e69 5f387838 70637363 656b5f6c 6c656e72                                   
[  497.560496] ecc0  636e692f 6564756c 6e696c2f 662f7875 7a656572 682e7265 00000000 00000000                                   
[  497.569219] ece0  6b736174 7274735f 00746375 00000000 7465735f 6469745f 6464615f 73736572                                   
[  497.577984] ed00  00000000 00000000 2d6d6d26 616d6d3e 65735f70 0000006d 3e2d7826 74696177                                   
[  497.586731]                                                                                                                 
[  497.586731] X25: 0xffffffc0000d2c84:                                                                                        
[  497.591852] 2c84  910003e1 9272c424 f9400884 f900009f 94269983 aa0003f5 91006264 f9400e65                                   
[  497.600581] 2ca4  eb05009f 540000e0 f9400483 f90004a3 f9000065 f9000e64 f9000484 14000009                                   
[  497.609329] 2cc4  91002280 f9400681 eb00003f 540000a0 aa1403e0 2a1703e1 aa1603e2 9400246f                                   
[  497.618058] 2ce4  aa1403e0 aa1503e1 942699e9 a94153f3 a9425bf5 f9401bf7 a8c47bfd d65f03c0                                   
[  497.626788] 2d04  a9be7bfd 910003fd f9000bf3 aa0003f3 94004670 34000100 91006261 f9401262                                   
[  497.635511] 2d24  f9400e63 f9000462 f9000043 f9000e61 f9000421 f9400bf3 a8c27bfd d65f03c0                                   
[  497.644241] 2d44  a9bf7bfd 910003fd aa0003e4 f85f0005 f9400066 52800000 eb0600bf 54000201                                   
[  497.652993] 2d64  b85f8086 b9400867 6b0700df 54000181 1100fcc0 6b1f00df 1a86b000 13067c00                                   
[  497.661739]                                                                                                                 
[  497.661739] X26: 0xffffffc05bb1ff80:                                                                                        
[  497.666858] ff80  d37ef680 911022f7 cb140000 910042f7 8b0016f7 b94006e0 7100041f 540002e0                                   
[  497.675605] ffa0  52800120 f90002bf 17ffffa4 d503201f b94022c1 350002a1 90000201 2a1903e0                                   
[  497.684337] ffc0  912ce021 97fff7a1 52800080 17ffff9b 90000201 52800020 912de021 97fff79b                                   
[  497.693059] ffe0  52800020 17ffff95 2a0003e1 aa1803e0 97fff7ca 17ffffb4 394082e1 f9402ee0                                   
[  497.701793] 0000  00000000 00000000 ffffffff ffffffff 5e32b200 ffffffc0 000be888 ffffffc0                                   
[  497.710530] 0020  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.719262] 0040  00000000 00000000 00000002 00000002 00000100 00000000 57ac6e9d 00000000                                   
[  497.728008] 0060  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.736756]                                                                                                                 
[  497.736756] X29: 0xffffffc05bb23ca0:                                                                                        
[  497.741877] 3ca0  00000001 00000000 00000001 00000000 00000005 00000000 0119a7f0 ffffffc0                                   
[  497.750610] 3cc0  00e1eca0 ffffffc0 000d2d04 ffffffc0 5bb20000 ffffffc0 00000000 00000000                                   
[  497.759326] 3ce0  00000000 00000000 5bb23d20 ffffffc0 00714628 ffffffc0 5bb23d20 ffffffc0                                   
[  497.768052] 3d00  0071453c ffffffc0 20000345 00000000 5bb23d20 ffffffc0 003a27ec ffffffc0                                   
[  497.776650] 3d20  5bb23d50 ffffffc0 00714628 ffffffc0 fc9f8950 ffffffc0 ddddd800 ffffffc0                                   
[  497.784969] 3d40  fc9f91ac ffffffc0 fc9f8f60 ffffffc0 5bb23d80 ffffffc0 0071475c ffffffc0                                   
[  497.793288] 3d60  fc9f8950 ffffffc0 ddddd800 ffffffc0 fc9f91ac ffffffc0 5bb23e18 ffffffc0                                   
[  497.801612] 3d80  5bb23db0 ffffffc0 00714d1c ffffffc0 fc9f8950 ffffffc0 ddddd800 ffffffc0                                   
[  497.809933]                                                                                                                 
[  497.811442] Process vi-output-1, tc (pid: 2086, stack limit = 0xffffffc05bb20058)                                           
[  497.818946] Stack: (0xffffffc05bb23d20 to 0xffffffc05bb24000)                                                               
[  497.824719] 3d20: 5bb23d50 ffffffc0 00714628 ffffffc0 fc9f8950 ffffffc0 ddddd800 ffffffc0                                   
[  497.832972] 3d40: fc9f91ac ffffffc0 fc9f8f60 ffffffc0 5bb23d80 ffffffc0 0071475c ffffffc0                                   
[  497.841240] 3d60: fc9f8950 ffffffc0 ddddd800 ffffffc0 fc9f91ac ffffffc0 5bb23e18 ffffffc0                                   
[  497.849506] 3d80: 5bb23db0 ffffffc0 00714d1c ffffffc0 fc9f8950 ffffffc0 ddddd800 ffffffc0                                   
[  497.857775] 3da0: 5bb23db0 ffffffc0 00714d10 ffffffc0 5bb23e30 ffffffc0 000d22d4 ffffffc0                                   
[  497.866046] 3dc0: c37b3b10 ffffffc0 01198928 ffffffc0 00e1ed18 ffffffc0 fc9f8950 ffffffc0                                   
[  497.874313] 3de0: 00714bb0 ffffffc0 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.882582] 3e00: 00000000 00000000 5e32b200 ffffffc0 000d2d04 ffffffc0 5bb23e18 ffffffc0                                   
[  497.890847] 3e20: 5bb23e18 ffffffc0 000d22b8 ffffffc0 00000000 00000000 00085520 ffffffc0                                   
[  497.899115] 3e40: 000d2214 ffffffc0 c37b3b10 ffffffc0 00000000 00000000 00000000 00000000                                   
[  497.907383] 3e60: 00000000 00000000 000deb7c ffffffc0 00000000 00000000 000e1e6c ffffffc0                                   
[  497.915648] 3e80: fc9f8950 ffffffc0 00000000 ffffffc0 00000000 00000000 5bb23e98 ffffffc0                                   
[  497.923917] 3ea0: 5bb23e98 ffffffc0 00000000 ffffffc0 00000000 00000000 5bb23eb8 ffffffc0                                   
[  497.932178] 3ec0: 5bb23eb8 ffffffc0 c37b3b10 ffffffc0 00000000 00000000 00000000 00000000                                   
[  497.940437] 3ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.948696] 3f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.956955] 3f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.965215] 3f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.973474] 3f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.981730] 3f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.989992] 3fa0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  497.998251] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000005 00000000                                   
[  498.006509] 3fe0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                   
[  498.014738] Call trace:                                                                                                     
[  498.017296] [<ffffffc00071453c>] free_ring_buffers+0x3c/0xd0                                                                
[  498.023055] [<ffffffc000714628>] tegra_channel_ring_buffer+0x58/0xb8                                                        
[  498.029503] [<ffffffc00071475c>] tegra_channel_release_frame+0x4c/0xb0                                                      
[  498.036125] [<ffffffc000714d1c>] tegra_channel_kthread_release+0x16c/0x194                                                  
[  498.043091] [<ffffffc0000d22d4>] kthread+0xc0/0xc8                                                                          
[  498.047974] Code: f8607a60 b948d661 11000422 b908d662 (b9003801)                                                            
[  498.058661] ---[ end trace 52f03a2c8d7a35ed ]---                                                                            
[  498.161185] extcon-gpio-states 1.extcon: Cable state 2                                                                      
[  498.221172] otg state changed: SUSPEND --> HOST                                                                             
[  498.226543] tegra USB phy - inst[0] platform info:                                                                          
[  498.231834] port_otg: yes                                                                                                   
[  498.234662] has_hostpc: yes                                                                                                 
[  498.237458] phy_interface: USB_PHY_INTF_UTMI                                                                                
[  498.241774] op_mode: TEGRA_USB_OPMODE_HOST                                                                                  
[  498.246207] qc2_voltage: 0                                                                                                  
[  498.248915] hot_plug: disabled                                                                                              
[  498.251990] remote_wakeup: enabled                                                                                          
[  498.342496] extcon-gpio-states 1.extcon: Cable state 1

Also it’s not occurred when we back to kernel source before applying the above patch.

Is there any suggestions about this error.

Whether unstable camera signal can lead to this?

Thanks in advance.

hello anhuimain,

please note that latency improvement change is not an official support patch,
hence you should ignore the VI improvement patch if your main concerns is stability.
thanks

Hi, JerryChang

Thank you for your answer.

I agree with you.

And your patch for decrease latency is appreciated greatly to us.

I just want to get very a little message about possible cause about the error, if you could give some hints at your convenience.

I have browsed a lot about error message “MW_ACK_DONE syncpoint time out!0”.

Can it possibly be avoided by increasing value of chan->timeout?