TC358748 V4L2 Capture Problem

I have developed TC358748 toshiba parallel to MIPI driver.
I can capture / record using yavta & gstreamer.

But my problem is that, the captured frame has green part on right side. Please see below image on below link.

I confirm video timing settings from Toshiba and it seems ok.

So is there any timing related settings need to be done in sensor driver or still, some wrong setting in my tc358748 timing setting?

When you used yavta to do capturing, did you see any VI/CSI error hint? If not, the green bar probably comes from toshiba bridge.

No i am not getting any CSI/vi error on UART debug.
Below is output of yavta capure.

root@tegra-ubuntu:/home/ubuntu/yavta# ./yavta /dev/video0 -c1 -n1 -s1920x1080 -fUYVY -Ftest1.yuvDevice /dev/video0 opened.
Device `vi' on `' is a video capture (without mplanes) device.
Video format set: UYVY (59565955) 1920x1080 (stride 3840) field none buffer size 4147200
Video format: UYVY (59565955) 1920x1080 (stride 3840) field none buffer size 4147200
1 buffers requested.
length: 4147200 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xf6ad5000.
0 (0) [-] none 0 4147200 B 1462859351.043366 1246.727697 0.001 fps ts mono/EoF
Captured 1 frames in 0.032204 seconds (31.051586 fps, 128777138.232408 B/s).
1 buffers released.

So this green bar comes from toshiba bridge?

Am I correct that you’re storing planar YUV data? There is a stripe at the top of the image that also doesn’t match; it looks to me like you’re under-filling your planes (zero’d out YUV planes look dark green) and you are likely writing the last line of the previous frame in the top row of your current image.

Yes that’s right.
So is there any argument in yavta or gstreamer to change data buffer settings? That can prevent under filling of YUV data.

In yavta, i am getting below message.

Device `vi' on `' is a video capture (without mplanes) device.

What’s mean by mplanes in v4l2 device? So, is this the reason i am getting this buffer filling issue?
So still something missing in v4l2 device init in my driver?

The buffers are being allocated and are the correct size. My guess is the device feeding the parallel interface of the Toshiba bridge is not behaving properly. It looks like it is probably off by 1 vsync pulse count and pulsing hsync before the expected number of columns are read out so the bridge signals over MIPI to advance to the next line and you have unwritten columns in your output buffer. Verify the sensor or device providing parallel data is actually providing a 1920x1080 image and that there aren’t issues with blanking issues.

Thanks for the Reply.

Yes the problem is in ic which provide parallel data to tc358748.

By default its configured in wrong mode. After contacting toshiba they suggested right configuration of GS2971 which providing parallel input to TC358748, Now everything works perfectly.

Hi RiteshPanchal,

 Glad to hear that you made progress, I am also looking for a solution to capture SDI, If I read correctly you connected a GS2971 to the TC358748 and you are capturing frames correctly now? Could you share the configuration that you used to remove that green part?

In GS2971, I was using HVF timing using HVALID & VVALID. This might be creating timing sync issue. But later on i changed to CEA timings with VVALID & DE. This change solved my problem of green part.

Thanks for the advice RiteshPanchal

Which pin did you use on Toshiba IC to set the DE input? Is it important which GPIO pin to use?

If you are talking about TC358748, it has only HVALID and VVALID inputs, the GPIOs of TC358748 can only be read or written through I2C.
I believe OP connected DE output from GS2971 to HVALID input of TC358748 to solve the green bar issue.

Yes, yahoo2016 is right…!!!

Thanks a lot, yahoo2016 and RiteshPanchal
I can confirm in a week if this solved our issue