AnsweredAssumed Answered

imx6q: ipu camera preview faults after suspend

Question asked by Maxim Kuk on Dec 14, 2016
Latest reply on Dec 16, 2016 by Maxim Kuk

Hello!

I use imx6q on Sabre SD board with linux 3.14. When I run camera preview via GStreamer or v4l2 itself, after suspend/resume video freezes and "ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0" appears in console.

 

It seems that IPU resumes incorrect and CSI/IDMA channel resets on suspend and not configures again (IPU tasks are always wait for signal and do nothing).

 

What should I do to proper resume IPU? May be there are some patches or newer mxc_v4l2_capture or IPU drivers?

 

in attachement - dmesg output after suspend/resume

 

-------------------------

EDIT:

It seems that I resolve my question. The algorithm is:

- disable SCI on suspend

- restart stream on resume:

  - if ready_q is empty get back one buffer from working_q

  - if after that in ready_q only one buffer - get dummy_frame.buffer for "ping-pong"

 

I added "mxc_streamrestart" function for this purpose. You can get it from patch below. Hope, this patch will not damage anything .

Original Attachment has been moved to: dmesg.log.zip

Original Attachment has been moved to: 0001-fix-camera-preview-fault-after-system-suspend.patch.zip

Outcomes