imx8mm CSI camera problem

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

imx8mm CSI camera problem

4,211 Views
markusnm
Contributor I

Hello,

we are having trouble to find the issue with our CSI camera module, HM5065, on our custom board with iMX8MM chip.

We are using Yocto Zeus, Kernel V 5.4.3.

The camera is connected via i2c and 2 CSI lanes, with external MCLK. As starting point for our development we chose the OV5640 camera module (ov5640_camera_mipi_v2.c), as you can see from the function definitions inside our driver file.

Attached files:
- Device Tree snippet (device-tree-snip.txt)
- Cam driver hm5065.c (dmesg log line prefix >>[HM5065])
- mxc_mipi_csi.c (dmesg log line prefix >>[MXC])
- mx6s_capture.c (dmesg log line prefix >>[MX6S])
- DMESG log

The camera driver is built as external module, and loaded via

 

 

echo 0x1f > /sys/class/video4linux/video0/dev_debug
modprobe ov5640_camera_mipi_v2

 

 

After the driver is loaded, the camera is activated with gst-launch:

 

 

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=2592,height=1944 ! jpegenc ! filesink location=/tmp/test.jpg

 

 

When executed, the following output is given:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

And then the application hangs until killed by CTRL+C. The file at /tmp/test.jpg is always created, but always 0 byte size.

The resulting DMESG output:
At timestamp 67.614 the driver is loaded (modprobe)
At timestamp 81.106 gst-launch is executed
At timestamp 85.075 the camera firmware/control code has been uploaded and streaming started

When the camera stream starts, the device makes a distinct 'click' noise, and the scope confirms clock and data are being sent.

We know that data is being processed by the CSI-PHY. Because of a mistake during development, we had a mixup in our driver code, that caused it to send the firmware/control code to the camera and started the stream from inside the probe function (and never stopped it). When we started our device with this, loaded the driver, and then ran gst-launch, we observed lots of errors in our log:

>>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 1

With the last digit incrementing. The Errors were received with inconsistent delays of around 5-15ms (expected ~32ms for 15FPS mode) I think this confirms that the actual physical link and the logical link are established and working, correct? Otherwise, the CSI FIFO could not overflow.

We have a "demo board" with the camera module, also 2 CSI lanes, and we recorded the firmware/control code from it with a logic analyzer, and checked it against the datasheet.

I have tried to change HSSETTLE as suggested (https://community.nxp.com/t5/i-MX-Processors/Explenation-for-HS-SETTLE-parameter-in-MIPI-CSI-D-PHY-r...), but it makes no difference. Also csis-clk-settle = <2>; we tested <0>, <1> and <2>.

We triple-checked our H/W; trace width,length / impedance, noise, power, etc.

How do we proceed? How to find out what could be the issue?

Thanks,
Markus

0 Kudos
Reply
8 Replies

4,202 Views
khang_letruong
Senior Contributor III

Hi @markusnm,

Could you share the output of below commands :
$ v4l2-ctl --list-devices
$ v4l2-ctl --device /dev/video0 --all

Also, are you sure that your sensor outputs JPEG ? Below is the format option in HM5065 :

HM5065_DataFormat.png

Best Regards,

K.

0 Kudos
Reply

4,194 Views
markusnm
Contributor I

Hi @khang_letruong 

Thanks for your quick reply.

$ v4l2-ctl --list-devices

 

v4l2-ctl --list-devices
i.MX6S_CSI (platform:32e20000.csi1_bridge):
  /dev/video0

v4l2-ctl --device /dev/video0 --all

 

Driver Info:
  Driver name : mx6s-csi
  Card type : i.MX6S_CSI
  Bus info : platform:32e20000.csi1_bridge
  Driver version : 5.4.3
  Capabilities : 0x84200001
    Video Capture
    Streaming
    Extended Pix Format
    Device Capabilities
  Device Caps : 0x04200001
    Video Capture
    Streaming
    Extended Pix Format
Priority: 0
Video input : 0 (Camera: ok)
Format Unknown (00000000):
Crop Capability Video Capture:
  Bounds : Left 0, Top 0, Width 0, Height 0
  Default : Left 0, Top 0, Width 0, Height 0
  Pixel Aspect: 1/1
Crop: Left 0, Top 0, Width 0, Height 0
Selection: crop, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: native_size, Left 0, Top 0, Width 0, Height 0, Flags:
Streaming Parameters Video Capture:
  Capabilities : timeperframe
  Frames per second: 15.000 (15/1)
  Read buffers : 0

Also, are you sure that your sensor outputs JPEG ? Below is the format option in HM5065 :

I am certain it does not do JPG. It is set to YUYV with the firmware/control commands we send, and also YUYV format is selected in our driver and the CSI driver reports so:

[ 81.803730] video0: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=YUYV, description='YUYV 4:2:2'

Why do you think we selected JPG? In my understanding, gstreamer does this conversion just for convenience (we would be OK with RAW or any format really), because we supply the argument

 ! jpegenc !

with gst-launch. Its just quicker to check a JPG during testing.

Is there anything else we can check?

 

Edit: After starting the camera with gst-launch, v4l2-ctl --device /dev/video0 --all changes to

Driver Info:
Driver name : mx6s-csi
Card type : i.MX6S_CSI
Bus info : platform:32e20000.csi1_bridge
Driver version : 5.4.3
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 0
Video input : 0 (Camera: ok)
Format Video Capture:
Width/Height : 2592/1944
Pixel Format : 'YUYV' (YUYV 4:2:2)
Field : None
Bytes per Line : 0
Size Image : 10077696
Colorspace : Default
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 0, Height 0
Default : Left 0, Top 0, Width 0, Height 0
Pixel Aspect: 1/1
Crop: Left 0, Top 0, Width 0, Height 0
Selection: crop, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: native_size, Left 0, Top 0, Width 0, Height 0, Flags:
Streaming Parameters Video Capture:
Capabilities : timeperframe
Capture mode : high quality
Frames per second: 15.000 (15/1)
Read buffers : 0

 

 

0 Kudos
Reply

4,174 Views
khang_letruong
Senior Contributor III

Hi @markusnm,

Have you verified (with an oscilloscope) the MIPI-CSI2 signals (clock-lane and the 2 data-lanes) to make sure that they reach the iMX8MM ?

Can you use the v4l2-ctl to dump RAW data out ?

Regards,
K.

0 Kudos
Reply

4,156 Views
markusnm
Contributor I

Hi @khang_letruong 

Using command

v4l2-ctl --device /dev/video0 --stream-mmap --stream-to=frame.raw --stream-count=10

Exits without output if used before above mentioned gst-launch command.

If used after gst-launch, the command will hang indefinitely, but interestingly, now the log starts to go crazy with repeated output:

[ 345.204151] >>[MXC] {status}={0x00000010} @ mipi_csis_irq_handler:967
[ 345.212614] >>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 1649
[ 345.219574] >>[MXC] (V4L) <mipi_csis_irq_handler> status: 00000010
[ 345.225750] >>[MXC] (V4L) <dump_regs> --- mipi_csis_irq_handler ---
[ 345.232014] >>[MXC] (V4L) <dump_regs> CTRL: 0x03060301
[ 345.237669] >>[MXC] (V4L) <dump_regs> DPHYCTRL: 0x00004105
[ 345.243324] >>[MXC] (V4L) <dump_regs> CONFIG: 0x000f0000
[ 345.248979] >>[MXC] (V4L) <dump_regs> DPHYSTS: 0xdeadcafe
[ 345.254633] >>[MXC] (V4L) <dump_regs> INTMSK: 0xf00fffff
[ 345.260288] >>[MXC] (V4L) <dump_regs> RESOL: 0xdeadcafe
[ 345.265943] >>[MXC] (V4L) <dump_regs> SDW_CONFIG: 0x00000000

 

We can confirm there is data being transmitted over CSI-clock/data0/data1.

0 Kudos
Reply

4,149 Views
markusnm
Contributor I

Using command

v4l2-ctl -d /dev/video0 --set-fmt-video=width=2592,height=1944 --stream-mmap --stream-count=1 --stream-to=/tmp/test.raw --verbose

after loading the driver, but without using gst-launch, results in a kernel panic:

Spoiler
[ 1371.619074] >>[MX6S] STrace: mx6s_csi_open:1264
[ 1371.624780] >>[HM5065] Stacktrace: ov5640_s_power:696, on:1
[ 1371.633202] >>[HM5065] Stacktrace: ov5640_power_down:319, I:1
[ 1371.676884] >>[HM5065] Endtrace: ov5640_s_power:704
[ 1371.684523] >>[MXC] (V4L) <mipi_csis_pm_resume> mipi_csis_pm_resume: flags: 0x0
[ 1371.694686] >>[MXC] {runtime}={0x00000001} @ mipi_csis_pm_resume:1305
[ 1371.703989] >>[MXC] STrace: mipi_csis_clk_enable:603
[ 1371.711823] >>[MX6S] STrace: csi_clk_enable:435
[ 1371.719191] >>[MX6S] STrace: csi_init_interface:519
[ 1371.726919] >>[MX6S] STrace: mx6s_csi_init:790
[ 1371.734220] >>[MX6S] STrace: mx6s_csi_open:1293
[ 1371.741609] videodev: v4l2_open: video0: open (0)
[ 1371.741647] >>[MX6S] STrace: mx6s_vidioc_querycap:1628
[ 1371.749624] video0: VIDIOC_QUERYCAP: driver=mx6s-csi, card=i.MX6S_CSI, bus=platform:32e20000.csi1_bridge, version=0x00050403, capabilities=0x84200001, device_caps=0x04200001
[ 1371.749645] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
[ 1371.749661] video0: VIDIOC_TRY_EXT_CTRLS: error -25: which=0x0, count=0, error_idx=0, request_fd=0
[ 1371.749668] video0: VIDIOC_QUERYCTRL: error -25: id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.749677] >>[MX6S] VIDIOC_G_SELECTION not implemented
[ 1371.757698] video0: VIDIOC_G_SELECTION: type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
[ 1371.757713] >>[MX6S] STrace: mx6s_vidioc_querycap:1628
[ 1371.765703] video0: VIDIOC_QUERYCAP: driver=mx6s-csi, card=i.MX6S_CSI, bus=platform:32e20000.csi1_bridge, version=0x00050403, capabilities=0x84200001, device_caps=0x04200001
[ 1371.765915] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
[ 1371.765931] video0: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765939] video0: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765945] video0: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765951] video0: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765957] video0: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765962] video0: VIDIOC_QUERYCTRL: error -25: id=0x980904, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765968] video0: VIDIOC_QUERYCTRL: error -25: id=0x980905, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765974] video0: VIDIOC_QUERYCTRL: error -25: id=0x980906, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765979] video0: VIDIOC_QUERYCTRL: error -25: id=0x980907, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765985] video0: VIDIOC_QUERYCTRL: error -25: id=0x980908, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765991] video0: VIDIOC_QUERYCTRL: error -25: id=0x980909, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.765996] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766002] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766008] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766013] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766019] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766024] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766030] video0: VIDIOC_QUERYCTRL: error -25: id=0x980910, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766035] video0: VIDIOC_QUERYCTRL: error -25: id=0x980911, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766041] video0: VIDIOC_QUERYCTRL: error -25: id=0x980912, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766047] video0: VIDIOC_QUERYCTRL: error -25: id=0x980913, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766052] video0: VIDIOC_QUERYCTRL: error -25: id=0x980914, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766058] video0: VIDIOC_QUERYCTRL: error -25: id=0x980915, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766063] video0: VIDIOC_QUERYCTRL: error -25: id=0x980916, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766069] video0: VIDIOC_QUERYCTRL: error -25: id=0x980917, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766074] video0: VIDIOC_QUERYCTRL: error -25: id=0x980918, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766080] video0: VIDIOC_QUERYCTRL: error -25: id=0x980919, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766085] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766091] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766096] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766102] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766107] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766113] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766119] video0: VIDIOC_QUERYCTRL: error -25: id=0x980920, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766124] video0: VIDIOC_QUERYCTRL: error -25: id=0x980921, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766130] video0: VIDIOC_QUERYCTRL: error -25: id=0x980922, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766135] video0: VIDIOC_QUERYCTRL: error -25: id=0x980923, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766141] video0: VIDIOC_QUERYCTRL: error -25: id=0x980924, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766146] video0: VIDIOC_QUERYCTRL: error -25: id=0x980925, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766152] video0: VIDIOC_QUERYCTRL: error -25: id=0x980926, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766158] video0: VIDIOC_QUERYCTRL: error -25: id=0x980927, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766163] video0: VIDIOC_QUERYCTRL: error -25: id=0x980928, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766168] video0: VIDIOC_QUERYCTRL: error -25: id=0x980929, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766174] video0: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766180] video0: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 1371.766192] unknown mbus:0x0
[ 1371.771460] >>[MX6S] STrace: mx6s_vidioc_g_fmt_vid_cap:1609
[ 1371.779873] video0: VIDIOC_G_FMT: type=0
[ 1371.779919] video0: VIDIOC_S_FMT: error -22: type=0
[ 1371.779993] video0: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x2, id=0x0, flags=0x0
[ 1371.780002] video0: VIDIOC_G_INPUT: value=0
[ 1371.780009] video0: VIDIOC_ENUMINPUT: index=0, name=Camera, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x4
[ 1371.780018] video0: VIDIOC_QUERYSTD: error -515: std=0x00000000
[ 1371.780079] >>[MX6S] {count}={0x00000004} @ mx6s_videobuf_setup:698
[ 1371.789017] >>[MX6S] {size}={0x00000000} @ mx6s_videobuf_setup:699
[ 1371.798048] >>[MX6S] {pix.sizeimage}={0x00000000} @ mx6s_videobuf_setup:704
[ 1371.807871] >>[MX6S] {new count}={0x00000004} @ mx6s_videobuf_setup:715
[ 1371.817329] >>[MX6S] STrace: mx6s_videobuf_setup:717
[ 1371.825180] ------------[ cut here ]------------
[ 1371.832624] WARNING: CPU: 3 PID: 249582 at drivers/media/common/videobuf2/videobuf2-core.c:738 vb2_core_reqbufs+0x120/0x488
[ 1371.846598] Modules linked in: ov5640_camera_mipi_v2 rfcomm hci_uart btbcm cdc_acm bnep brcmfmac cfg80211 brcmutil ci_hdrc_imx ci_hdrc bluetooth ecdh_generic ehci_hcd ecc libaes ulpi udc_core roles phy_generic usbmisc_imx usbcore snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_fsl_sai snd_soc_wm8904 imx_pcm_dma_v2 snd_soc_core snd_pcm_dmaengine snd_pcm imx_sdma snd_timer snd hx280enc hantrodec_845s galcore(O) fuse ipv6 nf_defrag_ipv6
[ 1371.887933] CPU: 3 PID: 249582 Comm: v4l2-ctl Tainted: G W O 5.4.3-imx8mm+g654af11a644b #1
[ 1371.900179] Hardware name: Variscite DART-MX8MM (DT)
[ 1371.908003] pstate: 40000005 (nZcv daif -PAN -UAO)
[ 1371.915655] pc : vb2_core_reqbufs+0x120/0x488
[ 1371.922866] lr : vb2_core_reqbufs+0xdc/0x488
[ 1371.929992] sp : ffff80001df73aa0
[ 1371.936165] x29: ffff80001df73aa0 x28: 00000000c0145608
[ 1371.944334] x27: 000000000000001f x26: 0000000000000000
[ 1371.952503] x25: ffff000015e0c970 x24: ffff800010d92000
[ 1371.960673] x23: 0000000000000001 x22: ffff80001df73cd8
[ 1371.968842] x21: ffff00000c6e8000 x20: 0000000000000000
[ 1371.977011] x19: ffff000015e0c910 x18: 0000000000000010
[ 1371.985181] x17: 0000000000000000 x16: 0000000000000000
[ 1371.993350] x15: ffff00000c6e8460 x14: ffffffffffffffff
[ 1372.001521] x13: ffff80009df737e7 x12: ffff80001df737ef
[ 1372.009690] x11: ffff800010ccb000 x10: ffff800010d4b8e0
[ 1372.017860] x9 : 0000000000000000 x8 : ffff800010d4c000
[ 1372.026029] x7 : ffff00000c6e8000 x6 : 0000000000000254
[ 1372.034198] x5 : 0000000000000000 x4 : ffff00003fdb5840
[ 1372.042367] x3 : 0000000000000001 x2 : ffff80001df73afc
[ 1372.050536] x1 : 0000000000000000 x0 : ffff80001df73af8
[ 1372.058706] Call trace:
[ 1372.064014] vb2_core_reqbufs+0x120/0x488
[ 1372.070880] vb2_reqbufs+0x78/0x88
[ 1372.077141] mx6s_vidioc_reqbufs+0x3c/0x70
[ 1372.084098] v4l_reqbufs+0x48/0x58
[ 1372.090353] __video_do_ioctl+0x17c/0x3e0
[ 1372.097222] video_usercopy+0x210/0x5c0
[ 1372.103916] video_ioctl2+0x14/0x20
[ 1372.110262] v4l2_ioctl+0x3c/0x58
[ 1372.116438] do_vfs_ioctl+0x964/0xb48
[ 1372.122955] ksys_ioctl+0x44/0x90
[ 1372.129128] __arm64_sys_ioctl+0x1c/0x28
[ 1372.135910] el0_svc_common.constprop.0+0x68/0x160
[ 1372.143556] el0_svc_handler+0x20/0x80
[ 1372.150163] el0_svc+0x8/0xc
[ 1372.155901] ---[ end trace b41ee9b450bc0e7d ]---
[ 1372.163453] video0: VIDIOC_REQBUFS: error -22: count=4, type=vid-cap, memory=mmap
[ 1372.163507] >>[MX6S] STrace: mx6s_csi_close:1308
[ 1372.170888] >>[MX6S] STrace: csi_init_interface:519
[ 1372.178602] >>[MX6S] STrace: csi_clk_disable:443
[ 1372.186082] >>[MX6S] STrace: mx6s_csi_deinit:800
[ 1372.193553] >>[HM5065] Stacktrace: ov5640_s_power:696, on:0
[ 1372.201993] >>[HM5065] Endtrace: ov5640_s_power:704
[ 1372.209724] >>[MXC] {on}={0x00000000} @ mipi_csis_s_power:742
[ 1372.218333] >>[MXC] STrace: mipi_csis_pm_suspend:1274
[ 1372.226249] >>[MXC] (V4L) <mipi_csis_pm_suspend> mipi_csis_pm_suspend: flags: 0x1
[ 1372.236586] >>[MXC] {on}={0x00000000} @ mipi_csis_enable_interrupts:399
[ 1372.246055] >>[MXC] STrace: mipi_csis_system_enable:501
[ 1372.254149] >>[MXC] STrace: mipi_csis_stop_stream:699
[ 1372.262062] >>[MXC] STrace: mipi_csis_clk_disable:615
[ 1372.269976] >>[MX6S] STrace: mx6s_csi_close:1324
[ 1372.277460] videodev: v4l2_release: video0: release

The stracktrace of the panic indicates no involvement of my own code / driver.

When we reboot the device, reload the kernel module, then execute gst-launch and v4l2-ctl like so:

 

modprobe ov5640_camera_mipi_v2.ko

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=2592,height=1944 ! jpegenc ! filesink location=/tmp/test.jpg

v4l2-ctl -d /dev/video0 --set-fmt-video=width=2592,height=1944 --stream-mmap --stream-count=1 --stream-to=/tmp/test.raw --verbose

We will receive output from v4l2-ctl:

VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 2592/1944
Pixel Format : 'YUYV' (YUYV 4:2:2)
Field : None
Bytes per Line : 5184
Size Image : 10077696
Colorspace : Default
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :

And produces this log (dmesg):

Spoiler
[ 221.856508] >>[MX6S] STrace: mx6s_csi_open:1264
[ 221.861608] >>[HM5065] Stacktrace: ov5640_s_power:696, on:1
[ 221.870011] >>[HM5065] Stacktrace: ov5640_power_down:319, I:1
[ 221.911109] >>[HM5065] Endtrace: ov5640_s_power:704
[ 221.918679] >>[MXC] (V4L) <mipi_csis_pm_resume> mipi_csis_pm_resume: flags: 0x0
[ 221.928818] >>[MXC] {runtime}={0x00000001} @ mipi_csis_pm_resume:1305
[ 221.938138] >>[MXC] STrace: mipi_csis_clk_enable:603
[ 221.945973] >>[MX6S] STrace: csi_clk_enable:435
[ 221.953365] >>[MX6S] STrace: csi_init_interface:519
[ 221.961125] >>[MX6S] STrace: mx6s_csi_init:790
[ 221.968430] >>[MX6S] STrace: mx6s_csi_open:1293
[ 221.975827] videodev: v4l2_open: video0: open (0)
[ 221.975871] >>[MX6S] STrace: mx6s_vidioc_querycap:1628
[ 221.983840] video0: VIDIOC_QUERYCAP: driver=mx6s-csi, card=i.MX6S_CSI, bus=platform:32e20000.csi1_bridge, version=0x00050403, capabilities=0x84200001, device_caps=0x04200001
[ 221.983859] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
[ 221.983875] video0: VIDIOC_TRY_EXT_CTRLS: error -25: which=0x0, count=0, error_idx=0, request_fd=0
[ 221.983882] video0: VIDIOC_QUERYCTRL: error -25: id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 221.983890] >>[MX6S] VIDIOC_G_SELECTION not implemented
[ 221.991955] video0: VIDIOC_G_SELECTION: type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
[ 221.991974] >>[MX6S] STrace: mx6s_vidioc_querycap:1628
[ 221.999945] video0: VIDIOC_QUERYCAP: driver=mx6s-csi, card=i.MX6S_CSI, bus=platform:32e20000.csi1_bridge, version=0x00050403, capabilities=0x84200001, device_caps=0x04200001
[ 222.000174] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
[ 222.000190] video0: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000199] video0: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000205] video0: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000211] video0: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000220] video0: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000225] video0: VIDIOC_QUERYCTRL: error -25: id=0x980904, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000231] video0: VIDIOC_QUERYCTRL: error -25: id=0x980905, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000237] video0: VIDIOC_QUERYCTRL: error -25: id=0x980906, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000243] video0: VIDIOC_QUERYCTRL: error -25: id=0x980907, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000248] video0: VIDIOC_QUERYCTRL: error -25: id=0x980908, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000254] video0: VIDIOC_QUERYCTRL: error -25: id=0x980909, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000259] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000267] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000273] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000279] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000284] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000290] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000295] video0: VIDIOC_QUERYCTRL: error -25: id=0x980910, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000301] video0: VIDIOC_QUERYCTRL: error -25: id=0x980911, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000307] video0: VIDIOC_QUERYCTRL: error -25: id=0x980912, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000312] video0: VIDIOC_QUERYCTRL: error -25: id=0x980913, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000318] video0: VIDIOC_QUERYCTRL: error -25: id=0x980914, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000323] video0: VIDIOC_QUERYCTRL: error -25: id=0x980915, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000329] video0: VIDIOC_QUERYCTRL: error -25: id=0x980916, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000334] video0: VIDIOC_QUERYCTRL: error -25: id=0x980917, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000340] video0: VIDIOC_QUERYCTRL: error -25: id=0x980918, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000346] video0: VIDIOC_QUERYCTRL: error -25: id=0x980919, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000351] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000357] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000362] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000370] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000376] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000382] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000387] video0: VIDIOC_QUERYCTRL: error -25: id=0x980920, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000393] video0: VIDIOC_QUERYCTRL: error -25: id=0x980921, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000398] video0: VIDIOC_QUERYCTRL: error -25: id=0x980922, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000404] video0: VIDIOC_QUERYCTRL: error -25: id=0x980923, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000412] video0: VIDIOC_QUERYCTRL: error -25: id=0x980924, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000417] video0: VIDIOC_QUERYCTRL: error -25: id=0x980925, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000423] video0: VIDIOC_QUERYCTRL: error -25: id=0x980926, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000428] video0: VIDIOC_QUERYCTRL: error -25: id=0x980927, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000434] video0: VIDIOC_QUERYCTRL: error -25: id=0x980928, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000439] video0: VIDIOC_QUERYCTRL: error -25: id=0x980929, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000445] video0: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000453] video0: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
[ 222.000466] >>[MX6S] STrace: mx6s_vidioc_g_fmt_vid_cap:1609
[ 222.008387] video0: VIDIOC_G_FMT: type=vid-cap, width=2592, height=1944, pixelformat=YUYV, field=none, bytesperline=0, sizeimage=10077696, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
[ 222.008440] >>[MXC] STrace: mipi_csis_set_fmt:821
[ 222.015936] >>[HM5065] Stacktrace: ov5640_find_datafmt:303
[ 222.024265] >>[HM5065] Stacktrace: ov5640_find_datafmt:312, datafmt_index:0
[ 222.034126] >>[HM5065] Stacktrace: ov5640_set_fmt:861
[ 222.042019] >>[HM5065] Stacktrace: get_capturemode:280
[ 222.050024] >>[HM5065] Stacktrace: get_capturemode:285, capturemode_index:5
[ 222.059841] >>[HM5065] Endtrace: ov5640_set_fmt:881
[ 222.064730] >>[MX6S] STrace: mx6s_vidioc_try_fmt_vid_cap:1550
[ 222.073343] >>[MX6S] set to pixelformat 'YUYV-1'
[ 222.080823] >>[MX6S] STrace: csi_deinterlace_enable:576
[ 222.088914] >>[MX6S] {width:}={0x00000a20} @ mx6s_configure_csi:950
[ 222.098037] >>[MX6S] {cr1:}={0x00020902} @ mx6s_configure_csi:951
[ 222.106992] >>[MX6S] {cr18:}={0x3c4ad030} @ mx6s_configure_csi:952
[ 222.116031] >>[MX6S] STrace: mx6s_vidioc_s_fmt_vid_cap:1582
[ 222.121610] video0: VIDIOC_S_FMT: type=vid-cap, width=2592, height=1944, pixelformat=YUYV, field=none, bytesperline=5184, sizeimage=10077696, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
[ 222.121674] >>[MXC] STrace: mipi_csis_enum_mbus_code:797
[ 222.129820] >>[HM5065] Stacktrace: ov5640_enum_mbus_code:926, I:0
[ 222.138809] >>[HM5065] Endtrace: ov5640_enum_mbus_code:936
[ 222.147150] >>[MX6S] STrace: mx6s_vidioc_enum_fmt_vid_cap:1508
[ 222.155850] video0: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=YUYV, description='YUYV 4:2:2'
[ 222.155988] video0: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x2, id=0x0, flags=0x0
[ 222.155999] video0: VIDIOC_G_INPUT: value=0
[ 222.156006] video0: VIDIOC_ENUMINPUT: index=0, name=Camera, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x4
[ 222.156014] video0: VIDIOC_QUERYSTD: error -515: std=0x00000000
[ 222.156106] >>[MX6S] {count}={0x00000004} @ mx6s_videobuf_setup:698
[ 222.165012] >>[MX6S] {size}={0x00000000} @ mx6s_videobuf_setup:699
[ 222.174036] >>[MX6S] {pix.sizeimage}={0x0099c600} @ mx6s_videobuf_setup:704
[ 222.183840] >>[MX6S] {new count}={0x00000004} @ mx6s_videobuf_setup:715
[ 222.193311] >>[MX6S] STrace: mx6s_videobuf_setup:717
[ 222.211947] video0: VIDIOC_REQBUFS: count=4, type=vid-cap, memory=mmap
[ 222.211983] video0: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=10077696
[ 222.211994] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.211998] video0: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x99d000, length=10077696
[ 222.212006] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.212009] video0: VIDIOC_QUERYBUF: 00:00:00.00000000 index=2, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x133a000, length=10077696
[ 222.212017] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.212019] video0: VIDIOC_QUERYBUF: 00:00:00.00000000 index=3, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1cd7000, length=10077696
[ 222.212027] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.212098] >>[MX6S] vma start=0xffffa2ca6000, size=10080256, ret=0
[ 222.221065] >>[MX6S] STrace: mx6s_csi_mmap:1362
[ 222.228460] videodev: v4l2_mmap: video0: mmap (0)
[ 222.228532] >>[MX6S] vma start=0xffffa2309000, size=10080256, ret=0
[ 222.237598] >>[MX6S] STrace: mx6s_csi_mmap:1362
[ 222.244996] videodev: v4l2_mmap: video0: mmap (0)
[ 222.245057] >>[MX6S] vma start=0xffffa196c000, size=10080256, ret=0
[ 222.254144] >>[MX6S] STrace: mx6s_csi_mmap:1362
[ 222.261546] videodev: v4l2_mmap: video0: mmap (0)
[ 222.261617] >>[MX6S] vma start=0xffffa0fcf000, size=10080256, ret=0
[ 222.270677] >>[MX6S] STrace: mx6s_csi_mmap:1362
[ 222.278074] videodev: v4l2_mmap: video0: mmap (0)
[ 222.278099] >>[MX6S] STrace: mx6s_videobuf_prepare:730
[ 222.286119] video0: VIDIOC_QBUF: 00:00:00.00000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=10077696, offset/userptr=0x0, length=10077696
[ 222.286133] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.286150] >>[MX6S] STrace: mx6s_videobuf_prepare:730
[ 222.294117] video0: VIDIOC_QBUF: 00:00:00.00000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=10077696, offset/userptr=0x99d000, length=10077696
[ 222.294129] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.294140] >>[MX6S] STrace: mx6s_videobuf_prepare:730
[ 222.302131] video0: VIDIOC_QBUF: 00:00:00.00000000 index=2, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=10077696, offset/userptr=0x133a000, length=10077696
[ 222.302147] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.302164] >>[MX6S] STrace: mx6s_videobuf_prepare:730
[ 222.310102] video0: VIDIOC_QBUF: 00:00:00.00000000 index=3, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=10077696, offset/userptr=0x1cd7000, length=10077696
[ 222.310115] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
[ 222.310131] >>[MX6S] STrace: mx6s_vidioc_g_fmt_vid_cap:1609
[ 222.318533] video0: VIDIOC_G_FMT: type=vid-cap, width=2592, height=1944, pixelformat=YUYV, field=none, bytesperline=0, sizeimage=10077696, colorspace=0, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
[ 222.318556] >>[MX6S] STrace: mx6s_videobuf_queue:771
[ 222.326362] >>[MX6S] STrace: mx6s_videobuf_queue:771
[ 222.334165] >>[MX6S] STrace: mx6s_videobuf_queue:771
[ 222.342004] >>[MX6S] STrace: mx6s_videobuf_queue:771
[ 222.349810] >>[MX6S] STrace: mx6s_start_streaming:965
[ 222.360369] >>[MX6S] STrace: mx6s_start_streaming:1022
[ 222.375089] >>[MX6S] STrace: mx6s_csi_enable:813
[ 222.381284] >>[MX6S] STrace: csi_enable:557
[ 222.388319] >>[MXC] (V4L) <mipi_csis_s_stream> mipi_csis_s_stream: 1, state: 0x1
[ 222.398589] >>[MXC] {enable}={0x00000001} @ mipi_csis_s_stream:755
[ 222.407638] >>[MXC] (V4L) <__mipi_csis_set_format> fmt: 0x2008, 2592 x 1944
[ 222.417424] >>[MXC] {colorformat}={0x00000878} @ __mipi_csis_set_format:518
[ 222.427239] >>[MXC] {pixelformat}={0x07980a20} @ __mipi_csis_set_format:524
[ 222.437058] >>[MXC] {hsync_clk_settle}={0x0d800000} @ mipi_csis_set_hsync_settle:537
[ 222.447675] >>[MXC] {MIPI_CSIS_CMN_CTRL}={0x00004100} @ mipi_csis_set_params:585
[ 222.457917] >>[MXC] {MIPI_CSIS_CMN_CTRL(shadow)}={0x00004100} @ mipi_csis_set_params:586
[ 222.468873] >>[MXC] {MIPI_CSIS_ISPCONFIG_CH0}={0x00000078} @ mipi_csis_set_params:587
[ 222.479554] >>[MXC] {MIPI_CSIS_ISPSYNC_CH0}={0x00000000} @ mipi_csis_set_params:588
[ 222.490061] >>[MXC] {MIPI_CSIS_CLK_CTRL}={0x000f0001} @ mipi_csis_set_params:589
[ 222.500316] >>[MXC] {MIPI_CSIS_DPHYCTRL_L}={0x000001f4} @ mipi_csis_set_params:590
[ 222.510741] >>[MXC] {MIPI_CSIS_DPHYCTRL_H}={0x00000000} @ mipi_csis_set_params:591
[ 222.521168] >>[MXC] STrace: mipi_csis_system_enable:501
[ 222.529268] >>[MXC] {on}={0x00000001} @ mipi_csis_enable_interrupts:399
[ 222.538727] >>[MXC] STrace: mipi_csis_start_stream:692
[ 222.546725] >>[HM5065] Stacktrace: ov5640_s_stream:1099
[ 222.554820] >>[HM5065] Stacktrace: ov5640_s_stream:1101, s_stream:1
[ 222.563934] >>[HM5065] Stacktrace: OV5640_stream_on:428
[ 222.731059] >>[MX6S] STrace: mx6s_vidioc_streamon:1658
[ 222.738793] video0: VIDIOC_STREAMON: type=vid-cap
[ 222.738836] videodev: v4l2_poll: video0: poll: 00000000
[ 222.890455] >>[MXC] {status}={0x01000010} @ mipi_csis_irq_handler:967
[ 222.898765] >>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 1
[ 222.905462] >>[MXC] (V4L) <mipi_csis_irq_handler> Frame Start: 1
[ 222.911464] >>[MXC] (V4L) <mipi_csis_irq_handler> status: 01000010
[ 222.917641] >>[MXC] (V4L) <dump_regs> --- mipi_csis_irq_handler ---
[ 222.923904] >>[MXC] (V4L) <dump_regs> CTRL: 0x03060301
[ 222.929559] >>[MXC] (V4L) <dump_regs> DPHYCTRL: 0x00004105
[ 222.935214] >>[MXC] (V4L) <dump_regs> CONFIG: 0x000f0000
[ 222.940869] >>[MXC] (V4L) <dump_regs> DPHYSTS: 0xdeadcafe
[ 222.946524] >>[MXC] (V4L) <dump_regs> INTMSK: 0xf00fffff
[ 222.952179] >>[MXC] (V4L) <dump_regs> RESOL: 0xdeadcafe
[ 222.957834] >>[MXC] (V4L) <dump_regs> SDW_CONFIG: 0x00000000
[ 222.963520] >>[MXC] {status}={0x00000010} @ mipi_csis_irq_handler:967
[ 222.972806] >>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 2
[ 222.979502] >>[MXC] (V4L) <mipi_csis_irq_handler> status: 00000010
[ 222.985678] >>[MXC] (V4L) <dump_regs> --- mipi_csis_irq_handler ---
[ 222.991941] >>[MXC] (V4L) <dump_regs> CTRL: 0x03060301
[ 222.997596] >>[MXC] (V4L) <dump_regs> DPHYCTRL: 0x00004105
[ 223.003251] >>[MXC] (V4L) <dump_regs> CONFIG: 0x000f0000
[ 223.008906] >>[MXC] (V4L) <dump_regs> DPHYSTS: 0xdeadcafe
[ 223.014560] >>[MXC] (V4L) <dump_regs> INTMSK: 0xf00fffff
[ 223.020215] >>[MXC] (V4L) <dump_regs> RESOL: 0xdeadcafe
[ 223.025870] >>[MXC] (V4L) <dump_regs> SDW_CONFIG: 0x00000000
[ 223.051616] >>[MXC] {status}={0x00000010} @ mipi_csis_irq_handler:967
[ 223.059673] >>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 3
[ 223.066370] >>[MXC] (V4L) <mipi_csis_irq_handler> status: 00000010
[ 223.072546] >>[MXC] (V4L) <dump_regs> --- mipi_csis_irq_handler ---
[ 223.078809] >>[MXC] (V4L) <dump_regs> CTRL: 0x03060301
[ 223.084464] >>[MXC] (V4L) <dump_regs> DPHYCTRL: 0x00004105
[ 223.090119] >>[MXC] (V4L) <dump_regs> CONFIG: 0x000f0000
[ 223.095774] >>[MXC] (V4L) <dump_regs> DPHYSTS: 0xdeadcafe
[ 223.101429] >>[MXC] (V4L) <dump_regs> INTMSK: 0xf00fffff
[ 223.107084] >>[MXC] (V4L) <dump_regs> RESOL: 0xdeadcafe
[ 223.112739] >>[MXC] (V4L) <dump_regs> SDW_CONFIG: 0x00000000
[ 223.118431] >>[MXC] {status}={0x00000010} @ mipi_csis_irq_handler:967
[ 223.127716] >>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 4
[ 223.134413] >>[MXC] (V4L) <mipi_csis_irq_handler> status: 00000010
[ 223.140589] >>[MXC] (V4L) <dump_regs> --- mipi_csis_irq_handler ---
[ 223.146851] >>[MXC] (V4L) <dump_regs> CTRL: 0x03060301
[ 223.152506] >>[MXC] (V4L) <dump_regs> DPHYCTRL: 0x00004105
[ 223.158161] >>[MXC] (V4L) <dump_regs> CONFIG: 0x000f0000
[ 223.163815] >>[MXC] (V4L) <dump_regs> DPHYSTS: 0xdeadcafe
[ 223.169470] >>[MXC] (V4L) <dump_regs> INTMSK: 0xf00fffff
[ 223.175125] >>[MXC] (V4L) <dump_regs> RESOL: 0xdeadcafe
[ 223.180780] >>[MXC] (V4L) <dump_regs> SDW_CONFIG: 0x00000000
[ 223.186470] >>[MXC] {status}={0x00000010} @ mipi_csis_irq_handler:967
[ 223.195751] >>[MXC] (V4L) <mipi_csis_irq_handler> FIFO Overflow Error: 5
[ 223.202448] >>[MXC] (V4L) <mipi_csis_irq_handler> status: 00000010
[ 223.208624] >>[MXC] (V4L) <dump_regs> --- mipi_csis_irq_handler ---
[ 223.214887] >>[MXC] (V4L) <dump_regs> CTRL: 0x03060301
[ 223.220541] >>[MXC] (V4L) <dump_regs> DPHYCTRL: 0x00004105
[ 223.226196] >>[MXC] (V4L) <dump_regs> CONFIG: 0x000f0000
[ 223.231850] >>[MXC] (V4L) <dump_regs> DPHYSTS: 0xdeadcafe
[ 223.237505] >>[MXC] (V4L) <dump_regs> INTMSK: 0xf00fffff
[ 223.243159] >>[MXC] (V4L) <dump_regs> RESOL: 0xdeadcafe
[ 223.248814] >>[MXC] (V4L) <dump_regs> SDW_CONFIG: 0x00000000

 

 

0 Kudos
Reply

4,142 Views
khang_letruong
Senior Contributor III

Hi @markusnm,

Was you able to capture test.raw with v4l2-ctl command (after launching gst-launch for example)?

Regards,
Khang

 

0 Kudos
Reply

4,138 Views
markusnm
Contributor I

Hi @khang_letruong

no its the same as GStreamer; the file is created but 0 byte sized. 

0 Kudos
Reply

4,117 Views
khang_letruong
Senior Contributor III

Hi @markusnm ,

I wish I had same HW to do the investigation with you. I saw that you inspired from the ov5640 that had similar characteristics as the HM5065 (resolutions). I would guess that the output format of hm5065 was not recognized by the the SoC.

While the ov5640's default output is YUV422 (reg 0x501F, value 0x00), I would suggest you to enable the test pattern as well as to try with YCbCr_Rec601 (0x01) output instead of YCbCr_Jfif (0x00) in register 0x0046 of hm5065.

Regards,
K.

Tags (1)
0 Kudos
Reply