Why the stride calculate error on tx2?

Hi,everybody:

My sensor is ov4689,my resolution is 1984x1488

on tx2,I catch the camera’s information with yavta:

nvidia@tegra-ubuntu:~/yavta$ ./yavta /dev/video0                                                                                            
Device /dev/video0 opened.                                                                                                                  
Device `vi-output, ov4689 2-0036' on `platform:15700000.vi:1' (driver 'tegra-video') is a video capture (without mplanes) device.           
Video format: SBGGR10 (30314742) <b>1984</b>x1488 (<b>stride 4096</b>) field none buffer size <b>6094848</b>

on tx1:

ubuntu@tegra-ubuntu:~/yavta$ ./yavta /dev/video0 
Device /dev/video0 opened.
Device `vi-output-1, ov4689 6-0036' on `platform:vi:1' (driver 'tegra-video') is a video capture (without mplanes) device.
Video format: SRGGB10 (30314752) <b>1984</b>x1488 (stride <b>3968</b>) field none buffer size 5904384

The stride should be two times the width.The stride is 4096 on tx2 but 3968.It caused the buffer calculation error.

What should I do to solve this problem?

@Calmcar
It’s cause by the change the alignment from 64 to 256, you can change it back just modify the TEGRA_STRIDE_ALIGNMENT or make your sensor width*2 align to 256.

…/drivers/media/platform/tegra/camera/core.h

@ShaneCCC

Thank you! It works.

But another problem occured.

I found my customer carrier board’s USB can’t work in tx1.But it works normally in tx1.
The USB socket connect to USB1(A38,A39).But it’s not a USB3.0 socket.I just use it as USB2.0
There’s no power in this USB port,it controled by USB1_EN_OC#(A18) with a load switch call APL3511
I pull it up to supply power for USB VBUS,then I pugin a USB device.But it still found no deviece

For USB or pcie to work on custom carrier board, please follow the steps in this link

https://devtalk.nvidia.com/default/topic/1001443/jetson-tx2/extlinux-conf-fdt-no-longer-used-for-dtb-file-specification-/post/5130849/#5130849

@ShaneCCC

According to this link https://devtalk.nvidia.com/default/topic/1005599/jetson-tx2/how-to-get-usb-3-0-to-function-at-a-custom-commtech-carrier-board-at-5gb-s-speed-for-zed-camera-120fps-/

The USB works with Andrey1984’s USB_fix.zip.But only use his device tree.

I want to use my device tree.Where should I modify?

@CamlCar
It’s not device tree. It’s a cfg file.

@ShaneCCC

Then what should I do when I replace the cfg file? Shall I flash the rootfs again?

PS:I do enable the USB port with the device tree by Andrey1984’s USB_fix.zip.That’s another way

CalmCar

  1. Yes, you need to replace Linux_for_Tegra\bootloader\t186ref\BCT\tegra186-mb1-bct-pmic-quill-p3310-1000-c03.cfg and flash the device again.

  2. You can ask Andrey1984 what here modify and apply to you device tree.