iMX6, display problem with mipi adv7282-m device source

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6, display problem with mipi adv7282-m device source

11,402 Views
gabrielgrange
Contributor III

We success in display first acquisition from adv7282-m device after a problematic start (see https://community.nxp.com/message/830163 message)

 

We use PAL video signal and we test without adv7282 progressive format, and with progressive format (mipi clock is double). In these two adv7282 configuration case, we don't reach to synchronize output display image acquisition.

The ADV7282-M output data is 8-bit YCrCb 4:2:2 format and it uses one lane.

Routing MIPI stream into CSI2 is Ok.

 

But gstreamer command :

gst-launch-1.0 --gst-debug=*:1 -v imxv4l2src device=/dev/video0 ! imxv4l2sink

displays:

163824_163824.pngpastedImage_2.png

 Colors are wrong and there is also a vertical scrolling (see mp4 file). 

 

 

If we try to read some VDOA registers (example VDOA_VDOAC(@21E4000), there is a CPU freeze and watch-dog generates reset.

So we try to have more information in IPU configuration, so we add theses two lines un ipu_capture.c :

#undef dev_dbg

#define dev_dbg(dev, format, arg...) {dev_printk(KERN_ERR, dev, format, ##arg);}

We also set to 1 the DEBUG constant in mxc_v4l2_capture.c file

 


 

We try to compare two hardware management:

 

 

BASE1 OK

BASE2  HS

Hardware

Toradex Ixora

Toradex Apalis module : iMX6 quad

Toradex Analogue Camera Adapter

Custom board

iMX6 quad plus

Video decoder

adv7280

adv7282-m

Routing

Channel0 CSI0 / IPU0 parallel

Channel1 CSI1 / IPU0 mipi

Linux version

3.14.52 + adv7180.c patch

3.14.52 + adv7282.c driver

LOG file

LOG2_adv7180.txt

LOG2 adv7282-m.txt

Remarks:

Used Linux kernel and root filesystem are the same (only devicetree is different). Some debug traces has been added for adv drivers.

In case of adv7282-m, there is a start the encoder job from drivers/media/platform/mxc/capture/mxc_v4l2_capture.c file.

With adv7280 we don’t know how iMX6 transforms 720x575 acquisitions to 1024x768 output display. There is no trace in LOG2_adv7280.txt file

 

Our current questions are:

 

  •       Is combinaison one lane, mipi IPU0/CSI1 has been use with iMX6 quad plus design?

  

  •       Why with adv7282-m management, we find ‘In MVC:mxc_streamon’ trace with PFS=0x4 (instead of 0x7 as it appears in LOG2_adv7280.txt file, 0x4 is NA depending on Freescale documentation) ?
  •       What are parameters to manage IPU format from MIPI flow?

Original Attachment has been moved to: LOG2_adv7280.txt.zip

Original Attachment has been moved to: LOG2-adv7282-m.txt.zip

29 Replies

933 Views
dtamarii
Contributor II

Good news,

The image is stable !!!!!
But we have 2 images.

IMG_20161026_160922.jpg

So, now we have 2 stable images.
It seems to be odd and even frame.
The ADV7282-m is configured in order to be in progressif mode.

Why I display 2 frames?
How can I display the progressif frame?
Or How can I display only 1/2 frame?

0 Kudos

933 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi David, the suggestion for how to combine two fields into one frame had already been given to you.

With the above setting, if you can capture 2 camera videoes without scroll, they are correct two fields data, then you just need change the capture IDMAC ch1 to interlaced mode to combine the two fields data into one frame. In file drivers\media\platform\mxc\capture\Ipu_csi_enc.c, function csi_enc_setup():

 case IPU_CSI_CLK_MODE_GATED_CLK:
 case IPU_CSI_CLK_MODE_NONGATED_CLK:
 case IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE:
 case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_DDR:
 case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_SDR:
-  params.csi_mem.interlaced = false;

+  params.csi_mem.interlaced = true;

0 Kudos

933 Views
dtamarii
Contributor II

Thank you very much,

With this last patch, I have 1 stable picture !! Thank you !!!!!

But we have a last little problem.

When "params.csi_mem.interlaced = false;" we always display 2 frames even when we configure the ADV7282-m on  progressive mode.
When we apply patch "params.csi_mem.interlaced = true;" We have one image but with comb effect (even when configured in progressive mode).

I think that I could resolve my prolem by displaying only one of the 2 images with "params.csi_mem.interlaced = false;"

How can I do that?
Have you an other solution in order to avoid comb effect (using internal progressive converter)?

Regards,

David

933 Views
dtamarii
Contributor II

We succes to displays only 1/2 frame.
It seems to be OK, no comb effect.

But we have to display only 288 lines instead of 576.
We have the same behaviour even when we configure the progressive mode for ADV7282-M.

I think that the good way to obtain 576 lines with no comb effect is to use the imx6 internal progressive converter.

How we can activate the progressive converter in order to display one frame with 576 lines without comb effect?

0 Kudos

933 Views
dtamarii
Contributor II

I made research on web and patch exists for Linux 3.0.35 in order to handle progressive CSI input.

Does the Linux 3.14.52 BSP support mipi_csi2 progressive input?

Is there a patch for Linux 3.14.52 in order to support mipi-csi2 progressive input?

0 Kudos

933 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

With the "params.csi_mem.interlaced = false" code, it is for progressive input, just like MIPI CSI camera. It will save data into memory line by line.

And params.csi_mem.interlaced = true is used to capture interlaced input, when capturing data into memory, it will save data line skip one line.

0 Kudos

933 Views
dtamarii
Contributor II

I plan to use embedded VDI and IC with mipi_csi2 interlaced input.

I patch our BSP with :
https://app-community.nxp.com/servlet/JiveServlet/download/330441-2-376887/L3.14.52-IPU-add-CSI-VDI-...

and I download the imx_v4l2_tvin.out :
https://app-community.nxp.com/servlet/JiveServlet/download/330441-2-376888/mxc_v4l2_tvin.tar.gz

Files are recommanded by you on post : https://app-community.nxp.com/docs/DOC-330441

I don't have the libg2d.so.0.8 but create a link to libg2d.so.

I execute the recommended command :

./mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 720 -oh 576 -i 3 -g2d

And I have errors :

root@ebmr-008097676869:/unit_tests# ./mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 720 -oh 576 -i 3 -g2d
g_in_width = 720, g_in_height = 576.
fb_fix.id = DISP4 FG.
fb: smem_start = 0x6ba00000, smem_len = 0x480000.
fb: frame buffer size = 0x180000 bytes.
fb: g_screen_info.xres = 1024, g_screen_info.yres = 768.
fb: g_display_left = 0.
fb: g_display_top = 0.
fb: g_display_width = 720.
fb: g_display_height = 576.
VIDIOC_STREAMON error
start_capturing failed

Please help me to use VDI and IC internal module.

Maybe there is an update of mxc_v4l2_tvin.out?

regards,

David

0 Kudos

933 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

I think you need make the CSI->MEM captuer working first, this can make sure your CSI setting and adv7282 driver is correct:

./mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 720 -oh 576 -i 1 -g2d

After that, you can try the CSI->VDI->MEM case with command

./mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 720 -oh 576 -i 3 -g2d

0 Kudos

948 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Gabriel GRANGE,

 (1)Using real camera and show me images here.

(2)Using virtual channel 0 to debug your board, please!

Regards,

Weidong

0 Kudos