We've got a custom TVP5147 driver that worked under Dizzy. We recently upgraded to Fido, and I'm getting mxc_v4l_dqueue timeouts now.
I diffed the kernel drivers in drivers/media/platform/mxc/capture and it doesn't look like there were any API changes to the ADV7180 or OV5640 drivers between Dizzy and Fido, so I'd hoped our driver would just continue to work.
I've attached the kernel log from a simple "gst-launch-1.0 imxv4l2src ! imxv4l2sink" to demonstrate the timeouts. I'm hoping there's a known upgrade path for me to take or that someone can point me in the right direction to debug this.
Thank you!
In MVC: mxc_v4l_open
[ 1107.926082] device name is Mxc Camera
[ 1107.926092] Returning size of 720x525
[ 1107.929763] Current FMT: bytesperline - 1440, Width - 720, Height - 525
[ 1107.937795] End of mxc_v4l_open: v2f pix widthxheight 720 x 480
[ 1107.940822] End of mxc_v4l_open: crop_bounds widthxheight 720 x 525
[ 1107.940826] End of mxc_v4l_open: crop_defrect widthxheight 720 x 525
[ 1107.940831] End of mxc_v4l_open: crop_current widthxheight 720 x 525
[ 1107.940835] On Open: Input to ipu size is 720 x 525
[ 1107.940851] ON
[ 1108.052351] tvp514x 2-005c: tvp5147 found at 0xb8 (21a8000.i2c)
[ 1108.056999] tvp514x 2-005c: chip version 0x07 detected
[ 1108.060852] In MVC:mxc_v4l_ioctl
[ 1108.060858] In MVC: mxc_v4l_do_ioctl 80685600
[ 1108.060862] case VIDIOC_QUERYCAP
[ 1108.060880] In MVC:mxc_v4l_ioctl
[ 1108.060884] In MVC: mxc_v4l_do_ioctl 80685600
[ 1108.060887] case VIDIOC_QUERYCAP
[ 1108.060893] In MVC:mxc_v4l_ioctl
[ 1108.060898] In MVC: mxc_v4l_do_ioctl c02c5651
[ 1108.060904] In MVC:mxc_v4l_ioctl
[ 1108.060908] In MVC: mxc_v4l_do_ioctl 80085617
[ 1108.060911] case VIDIOC_G_STD
[ 1108.060915] In mxc_v4l2_g_std
[ 1108.061498] get_current: REG_VIDEO_STD == 0x00000000
[ 1108.068278] get_current: Using std_status 0x00000081
[ 1108.072296] The detected standard is 0 (0x00000000)
[ 1108.075910] Current FMT: bytesperline - 1440, Width - 720, Height - 525
[ 1108.081063] In MVC:mxc_v4l_ioctl
[ 1108.081258] In MVC: mxc_v4l_do_ioctl 40085618
[ 1108.081262] case VIDIOC_S_STD
[ 1108.081266] In mxc_v4l2_s_std b000
[ 1108.081269] Setting standard to NTSC b000
[ 1108.082415] In MVC:mxc_v4l_ioctl
[ 1108.082431] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.082442] In MVC:mxc_v4l_ioctl
[ 1108.082449] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.082747] In MVC:mxc_v4l_ioctl
[ 1108.082756] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.082764] In MVC:mxc_v4l_ioctl
[ 1108.082769] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.082774] In MVC:mxc_v4l_ioctl
[ 1108.082779] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.082788] In MVC:mxc_v4l_ioctl
[ 1108.082792] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.083015] In MVC:mxc_v4l_ioctl
[ 1108.083026] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.083033] In MVC:mxc_v4l_ioctl
[ 1108.083037] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.083042] In MVC:mxc_v4l_ioctl
[ 1108.083046] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.083050] In MVC:mxc_v4l_ioctl
[ 1108.083054] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.083286] In MVC:mxc_v4l_ioctl
[ 1108.083293] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.083299] In MVC:mxc_v4l_ioctl
[ 1108.083304] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.083310] In MVC:mxc_v4l_ioctl
[ 1108.083314] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.083319] In MVC:mxc_v4l_ioctl
[ 1108.083323] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.083547] In MVC:mxc_v4l_ioctl
[ 1108.083556] In MVC: mxc_v4l_do_ioctl c034564b
[ 1108.083565] In MVC:mxc_v4l_ioctl
[ 1108.083569] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.085636] In MVC:mxc_v4l_ioctl
[ 1108.085647] In MVC: mxc_v4l_do_ioctl c0045627
[ 1108.085651] case VIDIOC_S_INPUT
[ 1108.085667] In MVC:mxc_v4l_ioctl
[ 1108.085672] In MVC: mxc_v4l_do_ioctl c02c564a
[ 1108.085680] In MVC:mxc_v4l_ioctl
[ 1108.085686] In MVC: mxc_v4l_do_ioctl c0cc5616
[ 1108.085691] case VIDIOC_S_PARM
[ 1108.085695] In mxc_v4l2_s_param
[ 1108.086312] get_current: REG_VIDEO_STD == 0x00000000
[ 1108.092270] get_current: Using std_status 0x00000081
[ 1108.098580] Using standard 0
[ 1108.100998] Current capabilities are 1000
[ 1108.101003] Current capturemode is 0 change to 0
[ 1108.101007] Current framerate is 29 change to 30
[ 1108.101589] get_current: REG_VIDEO_STD == 0x00000000
[ 1108.106196] get_current: Using std_status 0x00000081
[ 1108.110209] Using standard 0
[ 1108.111795] clock_curr=mclk=0
[ 1108.111800] Returning size of 720x525
[ 1108.114185] Current FMT: bytesperline - 1440, Width - 720, Height - 525
[ 1108.119331] g_fmt_cap returns widthxheight of input as 720 x 525
[ 1108.119548] In MVC:mxc_v4l_ioctl
[ 1108.119566] In MVC: mxc_v4l_do_ioctl c0cc5605
[ 1108.119571] case VIDIOC_S_FMT
[ 1108.119574] In MVC: mxc_v4l2_s_fmt
[ 1108.119578] type=V4L2_BUF_TYPE_VIDEO_CAPTURE
[ 1108.119590] End of mxc_v4l2_s_fmt: v2f pix widthxheight 720 x 480
[ 1108.119596] End of mxc_v4l2_s_fmt: crop_bounds widthxheight 720 x 525
[ 1108.119601] End of mxc_v4l2_s_fmt: crop_defrect widthxheight 720 x 525
[ 1108.119605] End of mxc_v4l2_s_fmt: crop_current widthxheight 720 x 480
[ 1108.119617] In MVC:mxc_v4l_ioctl
[ 1108.119622] In MVC: mxc_v4l_do_ioctl c0145608
[ 1108.119626] case VIDIOC_REQBUFS
[ 1108.119631] In MVC:mxc_streamoff
[ 1108.119635] MVC: In mxc_free_frame_buf
[ 1108.119640] In MVC:mxc_allocate_frame_buf - size=518400
[ 1108.157246] In MVC:mxc_v4l_ioctl
[ 1108.157257] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157262] case VIDIOC_QUERYBUF
[ 1108.157267] In MVC:mxc_v4l2_buffer_status
[ 1108.157285] In MVC:mxc_mmap
[ 1108.157291] pgoff=0x3a380, start=0x76161000, end=0x761e0000
[ 1108.157309] In MVC:mxc_v4l_ioctl
[ 1108.157314] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157317] case VIDIOC_QUERYBUF
[ 1108.157321] In MVC:mxc_v4l2_buffer_status
[ 1108.157485] In MVC:mxc_v4l_ioctl
[ 1108.157491] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157495] case VIDIOC_QUERYBUF
[ 1108.157499] In MVC:mxc_v4l2_buffer_status
[ 1108.157507] In MVC:mxc_mmap
[ 1108.157512] pgoff=0x42880, start=0x75781000, end=0x75800000
[ 1108.157529] In MVC:mxc_v4l_ioctl
[ 1108.157534] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157537] case VIDIOC_QUERYBUF
[ 1108.157540] In MVC:mxc_v4l2_buffer_status
[ 1108.157553] In MVC:mxc_v4l_ioctl
[ 1108.157558] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157562] case VIDIOC_QUERYBUF
[ 1108.157566] In MVC:mxc_v4l2_buffer_status
[ 1108.157573] In MVC:mxc_mmap
[ 1108.157578] pgoff=0x42900, start=0x75702000, end=0x75781000
[ 1108.157593] In MVC:mxc_v4l_ioctl
[ 1108.157597] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157600] case VIDIOC_QUERYBUF
[ 1108.157603] In MVC:mxc_v4l2_buffer_status
[ 1108.157614] In MVC:mxc_v4l_ioctl
[ 1108.157618] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157622] case VIDIOC_QUERYBUF
[ 1108.157625] In MVC:mxc_v4l2_buffer_status
[ 1108.157632] In MVC:mxc_mmap
[ 1108.157637] pgoff=0x42980, start=0x75581000, end=0x75600000
[ 1108.157659] In MVC:mxc_v4l_ioctl
[ 1108.157664] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157668] case VIDIOC_QUERYBUF
[ 1108.157671] In MVC:mxc_v4l2_buffer_status
[ 1108.157682] In MVC:mxc_v4l_ioctl
[ 1108.157686] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157690] case VIDIOC_QUERYBUF
[ 1108.157693] In MVC:mxc_v4l2_buffer_status
[ 1108.157700] In MVC:mxc_mmap
[ 1108.157706] pgoff=0x42a00, start=0x75502000, end=0x75581000
[ 1108.157719] In MVC:mxc_v4l_ioctl
[ 1108.157723] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157727] case VIDIOC_QUERYBUF
[ 1108.157730] In MVC:mxc_v4l2_buffer_status
[ 1108.157743] In MVC:mxc_v4l_ioctl
[ 1108.157748] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157752] case VIDIOC_QUERYBUF
[ 1108.157755] In MVC:mxc_v4l2_buffer_status
[ 1108.157762] In MVC:mxc_mmap
[ 1108.157767] pgoff=0x42a80, start=0x75483000, end=0x75502000
[ 1108.157780] In MVC:mxc_v4l_ioctl
[ 1108.157784] In MVC: mxc_v4l_do_ioctl c0445609
[ 1108.157788] case VIDIOC_QUERYBUF
[ 1108.157791] In MVC:mxc_v4l2_buffer_status
[ 1108.157862] In MVC:mxc_v4l_ioctl
[ 1108.157868] In MVC: mxc_v4l_do_ioctl c044560f
[ 1108.157872] case VIDIOC_QBUF
[ 1108.157878] In MVC:mxc_v4l_ioctl
[ 1108.157882] In MVC: mxc_v4l_do_ioctl c044560f
[ 1108.157885] case VIDIOC_QBUF
[ 1108.157890] In MVC:mxc_v4l_ioctl
[ 1108.157894] In MVC: mxc_v4l_do_ioctl 40045612
[ 1108.157898] case VIDIOC_STREAMON
[ 1108.157901] In MVC:mxc_streamon
[ 1108.160904] In MVC:mxc_v4l_ioctl
[ 1108.160916] In MVC: mxc_v4l_do_ioctl c044560f
[ 1108.160920] case VIDIOC_QBUF
[ 1108.160929] In MVC:mxc_v4l_ioctl
[ 1108.160934] In MVC: mxc_v4l_do_ioctl c0445611
[ 1108.160937] case VIDIOC_DQBUF
[ 1108.160940] In MVC:mxc_v4l_dqueue
[ 1118.154216] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 1118.170388] In MVC:mxc_v4l_ioctl
[ 1118.170411] In MVC: mxc_v4l_do_ioctl c0445611
[ 1118.170421] case VIDIOC_DQBUF
[ 1118.170428] In MVC:mxc_v4l_dqueue
[ 1128.164246] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 1128.179526] In MVC:mxc_v4l_ioctl
[ 1128.179547] In MVC: mxc_v4l_do_ioctl c0445611
[ 1128.179556] case VIDIOC_DQBUF
[ 1128.179564] In MVC:mxc_v4l_dqueue
[ 1138.174255] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
[ 1138.190822] In MVC:mxc_v4l_ioctl
[ 1138.190843] In MVC: mxc_v4l_do_ioctl c0445611
[ 1138.190883] case VIDIOC_DQBUF
[ 1138.190914] In MVC:mxc_v4l_dqueue
[ 1141.444578] ERROR: v4l2 capture: mxc_v4l_dqueue() interrupt received
[ 1141.452169] In MVC:mxc_v4l_close
[ 1141.452182] In MVC:mxc_streamoff
[ 1141.944229] In MVC:mxc_free_frames
[ 1141.944238] OFF
[ 1141.945141] mxc_v4l_close: release resource
[ 1141.945146] MVC: In mxc_free_frame_buf
[ 1141.945731] In MVC:mxc_free_frames
I can actually boot the Fido file system with the Dizzy kernel and get working video; the Dizzy file system with the Fido kernel gives me the same errors as above. That kind of hints that it's not anything like gstreamer but is in the kernel.
I'll inspect the Fido kernel configuration and device tree in more detail.
Hello,
Looks like You have to adapt the TVP5147 driver to new kernel 3.14.28.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
Thank you for the response, but I'm not really sure where to go with it.
Since the drivers for the ADV7180 (which I used as a template) didn't change from 3.10 to 3.14, are there any specific changes you're aware of that I should look at? I see that the v4l2-intdev files were moved to the local directory, it looks like there were some changes to the IPU driver to support using CSI0 and CSI1, but since there were no API changes to the supported camera drivers, I would expect mine to still work.
It looks like the problem might be that csi_enc_callback is not getting called; I can see that ipu_request_irq is being called (and succeeds) with IPU_IRQ_CSI0_OUT_EOF, and that the V4L2 ioctls (STREAMON, QBUF, DQBUF) are being called, but csi_enc_callback is never run.
edit: Additionally, I can see that the driver is locked on the the NTSC signal, pixel clock and pixel data lines are active, etc.