Hello!
We are developing a v4l2 based driver for our 3D light field image sensor. When implementing higher resolutions, we stumbled upon a strange problem:
Although the TRM states on page 2381 that there is no maximum line length as long as
Minimum Image Size: WxH = 32x32 Pixels
Maximum Image Size: WxH = 128 Mega Pixels
are met, we observed that the maximum line length is dependend on the transfer speed. I’ll give an example:
With 507.840.000 Hz pixelclock and 1269.600.000 Hz CSI clock (using 4 lanes), we can transfer 4k (3840x2160) pictures and smaller, e.g. 1080p (1920x1080). We cannot transfer 8k pictures (7680x4320). Following error occurs:
Oct 26 15:12:58 tegra-mini kernel: [ 6940.356258] vi vi: CSI 4 syncpt timeout, syncpt = 15, err = -11
Oct 26 15:12:58 tegra-mini kernel: [ 6940.362700] vi vi: TEGRA_CSI_DEBUG_COUNTER 0x00000000
Oct 26 15:12:58 tegra-mini kernel: [ 6940.368045] vi vi: TEGRA_CSI_CSI_CIL_STATUS 0x00000013
Oct 26 15:12:58 tegra-mini kernel: [ 6940.374822] vi vi: TEGRA_CSI_CSI_CILX_STATUS 0x00070071
Oct 26 15:12:58 tegra-mini kernel: [ 6940.380434] vi vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x000040b4
Oct 26 15:12:58 tegra-mini kernel: [ 6940.386131] vi vi: TEGRA_VI_CSI_ERROR_STATUS 0x00000004
Oct 26 15:12:58 tegra-mini kernel: [ 6940.556296] vi vi: MW_ACK_DONE syncpoint time out!
Oct 26 15:13:00 tegra-mini kernel: [ 6942.385756] vi vi: CSI 4 syncpt timeout, syncpt = 15, err = -11
Oct 26 15:13:00 tegra-mini kernel: [ 6942.391928] vi vi: TEGRA_CSI_DEBUG_COUNTER 0x00000004
Oct 26 15:13:00 tegra-mini kernel: [ 6942.397210] vi vi: TEGRA_CSI_CSI_CIL_STATUS 0x00000003
Oct 26 15:13:00 tegra-mini kernel: [ 6942.402593] vi vi: TEGRA_CSI_CSI_CILX_STATUS 0x00020030
Oct 26 15:13:00 tegra-mini kernel: [ 6942.408211] vi vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x000041b5
Oct 26 15:13:00 tegra-mini kernel: [ 6942.413955] vi vi: TEGRA_VI_CSI_ERROR_STATUS 0x00000004
Oct 26 15:13:00 tegra-mini kernel: [ 6942.555681] vi vi: MW_ACK_DONE syncpoint time out!
Oct 26 15:13:03 tegra-mini kernel: [ 6944.416477] vi vi: CSI 4 syncpt timeout, syncpt = 15, err = -11
Oct 26 15:13:03 tegra-mini kernel: [ 6944.925639] Host read timeout at address 54081a5c
Oct 26 15:13:03 tegra-mini kernel: [ 6944.927482] vi vi: MW_ACK_DONE syncpoint time out!
Oct 26 15:13:03 tegra-mini kernel: [ 6944.938085] vi vi: TEGRA_CSI_DEBUG_COUNTER 0xffffffff
Oct 26 15:13:03 tegra-mini kernel: [ 6945.445840] Host read timeout at address 5408193c
Oct 26 15:13:03 tegra-mini kernel: [ 6945.451749] vi vi: TEGRA_CSI_CSI_CIL_STATUS 0xffffffff
Oct 26 15:13:04 tegra-mini kernel: [ 6945.959528] Host read timeout at address 54081940
Oct 26 15:13:04 tegra-mini kernel: [ 6945.964644] vi vi: TEGRA_CSI_CSI_CILX_STATUS 0xffffffff
Oct 26 15:13:04 tegra-mini kernel: [ 6946.472554] Host read timeout at address 54081854
Oct 26 15:13:05 tegra-mini kernel: [ 6946.477730] vi vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0xffffffff
Oct 26 15:13:05 tegra-mini kernel: [ 6946.985934] Host read timeout at address 54080584
Oct 26 15:13:05 tegra-mini kernel: [ 6946.986135] vi vi: MW_ACK_DONE syncpoint time out!
The Tegra CSI debug registers don’t provide much insight to us, since they just state that there were some bit problems. Usually mc-errs follow:
Oct 26 14:32:03 tegra-mini kernel: [ 4484.989400] mc-err: status = 0x60012072; addr = 0x809fc680
Oct 26 14:32:03 tegra-mini kernel: [ 4484.995260] mc-err: secure: no, access-type: write, SMMU fault: nr-nw-s
If we now change the pixelclock to 634800000 Hz, leaving the CSI speed at 1269600000, we can no longer transfer 4k pictures, but still 1080p. Trying to transfer 4k pictures generates the same error.
To us this looks like some sort of receive-buffer overflow, but the dmesg output has no leads. The TRM has a chapter about line buffer overflows (at 31.5.6 Line Buffer Overflow), but doesn’t really say how to debug them.
Has anyone ever succesfully transfered large pictures or has any insight on where to look for the overflow? Any help would be highly appreciated.
Best regards!
Olav Schwartz