AnsweredAssumed Answered

i.MX6SDL V4L2 driver issue.

Question asked by Satoshi Shimoda on Nov 14, 2014
Latest reply on Jan 7, 2015 by gusarambula
Branched to a new discussion

Hi community,

 

I have a problem about i.MX6SDL V4L2 driver.

When execute the following procedure, output image is strange on process 8.

(A image which should be located to the left part is displayed to right part)

 

[Procedure]

1. Open driver.

2. Execute *Setting 1.

3. Output image (VIDIOC_STREAMON)

4. Stop output image (VIDIOC_STREAMOFF)

5. Close driver.

6. Open driver.

7. Execute *Setting 2.

8. Output image (VIDIOC_STREAMON)

 

Then, if change *Setting 1 to *Setting 3, this issue was not occurred.

=====

*Setting 1:

[VIDIOC_S_CROP]

top=24

left=0

width=1024

height=720

[VIDIOC_S_FMT]

fmt.fmt.pix.width=1280

fmt.fmt.pix.height=720

v4l2_rect(4l2_format::fmt.pix.priv)

 .top=0,.left=128,.width=1024, height=720

fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT

fmt.fmt.pix.pixelformat=V4L2_PIX_FMT_NV12

 

*Setting 2:

[VIDIOC_S_CROP]

top=24

left=0

width=1024

height=720

[VIDIOC_S_FMT]

fmt.fmt.pix.width=1280

fmt.fmt.pix.height=720

v4l2_rect(4l2_format::fmt.pix.priv)

 .top=0,.left=0,.width=1024, height=720

fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT

fmt.fmt.pix.pixelformat=V4L2_PIX_FMT_NV12

 

*Setting 3:

[VIDIOC_S_CROP]

top=24

left=0

width=1024

height=720

[VIDIOC_S_FMT]

fmt.fmt.pix.width=1280

fmt.fmt.pix.height=720

v4l2_rect(4l2_format::fmt.pix.priv)

 .top=0,.left=32,.width=960, height=720

fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT

fmt.fmt.pix.pixelformat=V4L2_PIX_FMT_NV12

=====

 

We investigated the root cause and found a solution, but not resolved completely.

=====

[Root Cause]

In show_buf() function (line 535) in drivers/media/video/mxc/output/mxc_vout.c, "var.xoffset" is not updated to "0" when not set "bypass".

And if update "var.xoffset" when set "bypass", it cannot return the value when not set "bypass".

 

[Solution]

Add "var.xoffset = 0" on back line 562.

 

[Remained Issue]

Change the output image form set "bypass" to not set "bypass", the image is output with the var.xoffset value which is the one when set "bypass" about 1 frame.

So the issue I said at first is occurred momentary.

=====

 

Would you give me a advice to resolve this issue completely?

The above procedure or solution was wrong?

 

Best Regards,

Satoshi Shimoda

Outcomes