From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: References: <20190328142516.30372-1-rui.silva@linaro.org> <20190403101549.GD12646@pendragon.ideasonboard.com> From: Rui Miguel Silva Subject: Re: [PATCH v3 0/5] ARM: imx7s: add media nodes In-reply-to: <20190403101549.GD12646@pendragon.ideasonboard.com> Date: Thu, 04 Apr 2019 05:22:50 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; format=flowed To: Laurent Pinchart Cc: Shawn Guo , Rob Herring , Fabio Estevam , devicetree@vger.kernel.org List-ID: Hi Laurent, On Wed 03 Apr 2019 at 11:15, Laurent Pinchart wrote: > Hi Rui, > > Thank you for the patches. > > On Thu, Mar 28, 2019 at 02:25:11PM +0000, Rui Miguel Silva > wrote: >> This series is a continuation of the >> [PATCH v14 00/13] media: staging/imx7: add i.MX7 media driver >> [0] series. >> All code patches and bindings are already merged, missing only >> this >> dts patches. > > I'm testing this on a custom i.MX7D board, with an IMX296 CSI-2 > sensor, > and the system deadlocks when I start video capture: > > [ 112.426341] capture_start_streaming: vb2 queue ec8029a0 priv > ec802840 imxmd ec7aa444 > [ 112.434499] imx_media_pipeline_set_stream: media device > ec7aa444 > [ 112.442392] INFO: trying to register non-static key. > [ 112.447372] the code is fine but needs lockdep annotation. > [ 112.452861] turning off the locking correctness validator. > [ 112.458357] CPU: 0 PID: 213 Comm: yavta Not tainted > 5.0.0-00078-g97d0c7aa3256 #66 > [ 112.465842] Hardware name: Freescale i.MX7 Dual (Device Tree) > [ 112.471616] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 112.479371] [] (show_stack) from [] > (dump_stack+0xb0/0xe8) > [ 112.486609] [] (dump_stack) from [] > (register_lock_class+0x550/0x5c8) > [ 112.494798] [] (register_lock_class) from > [] (__lock_acquire+0x6c/0x1904) > [ 112.503334] [] (__lock_acquire) from [] > (lock_acquire+0xcc/0x1ec) > [ 112.511175] [] (lock_acquire) from [] > (_raw_spin_lock+0x28/0x38) > [ 112.518928] [] (_raw_spin_lock) from [] > (__mutex_lock+0xc8/0x900) > [ 112.526766] [] (__mutex_lock) from [] > (mutex_lock_nested+0x1c/0x24) > [ 112.534782] [] (mutex_lock_nested) from > [] (imx_media_pipeline_set_stream+0x50/0x110) > [ 112.544361] [] (imx_media_pipeline_set_stream) from > [] (capture_start_streaming+0x38/0xe0) > [ 112.554376] [] (capture_start_streaming) from > [] (vb2_start_streaming+0x5c/0x150) > [ 112.563604] [] (vb2_start_streaming) from > [] (vb2_core_streamon+0x7c/0x14c) > [ 112.572313] [] (vb2_core_streamon) from > [] (__video_do_ioctl+0x210/0x44c) > [ 112.580846] [] (__video_do_ioctl) from [] > (video_usercopy+0x294/0x7e0) > [ 112.589122] [] (video_usercopy) from [] > (do_vfs_ioctl+0x9c/0x9ec) > [ 112.596963] [] (do_vfs_ioctl) from [] > (ksys_ioctl+0x34/0x60) > [ 112.604369] [] (ksys_ioctl) from [] > (ret_fast_syscall+0x0/0x28) > [ 112.612030] Exception stack(0xed237fa8 to 0xed237ff0) > [ 112.617089] 7fa0: 00000000 be8bca2c > 00000003 40045612 be8bca2c 00000000 > [ 112.625275] 7fc0: 00000000 be8bca2c 00000000 00000036 > 000142e8 c0445609 00000000 00014324 > [ 112.633457] 7fe0: 00025014 be8bca00 00012fc8 b6f5bd50 > [ 136.211443] watchdog: BUG: soft lockup - CPU#0 stuck for 22s! > [yavta:213] > [ 136.218241] Modules linked in: ath3k imx296 evbug > [ 136.222960] irq event stamp: 35493 > [ 136.226374] hardirqs last enabled at (35493): [] > _raw_spin_unlock_irq+0x24/0x2c > [ 136.234648] hardirqs last disabled at (35492): [] > __schedule+0xb0/0xa0c > [ 136.242141] softirqs last enabled at (35490): [] > __do_softirq+0x2ac/0x4f8 > [ 136.249896] softirqs last disabled at (35481): [] > irq_exit+0xbc/0x194 > [ 136.257214] CPU: 0 PID: 213 Comm: yavta Not tainted > 5.0.0-00078-g97d0c7aa3256 #66 > [ 136.264702] Hardware name: Freescale i.MX7 Dual (Device Tree) > [ 136.270458] PC is at do_raw_spin_lock+0x70/0x114 > [ 136.275083] LR is at do_raw_spin_lock+0xd8/0x114 > [ 136.279707] pc : [] lr : [] psr: > 80000013 > [ 136.285980] sp : ed237cf8 ip : c0f76670 fp : c110cb94 > [ 136.291212] r10: ec7aa540 r9 : ec7aa560 r8 : c18cb110 > [ 136.296444] r7 : c11c9ca8 r6 : 00000001 r5 : ffffe000 r4 : > ec7aa540 > [ 136.302978] r3 : 0000a444 r2 : 0000ec7a r1 : 00000000 r0 : > 00000000 > [ 136.309513] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA > ARM Segment none > [ 136.316656] Control: 10c5387d Table: ad28406a DAC: 00000051 > [ 136.322410] CPU: 0 PID: 213 Comm: yavta Not tainted > 5.0.0-00078-g97d0c7aa3256 #66 > [ 136.329898] Hardware name: Freescale i.MX7 Dual (Device Tree) > [ 136.335660] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 136.343415] [] (show_stack) from [] > (dump_stack+0xb0/0xe8) > [ 136.350653] [] (dump_stack) from [] > (watchdog_timer_fn+0x234/0x2c8) > [ 136.358674] [] (watchdog_timer_fn) from > [] (__hrtimer_run_queues+0x190/0x578) > [ 136.367561] [] (__hrtimer_run_queues) from > [] (hrtimer_interrupt+0x128/0x2c4) > [ 136.376449] [] (hrtimer_interrupt) from > [] (arch_timer_handler_virt+0x2c/0x34) > [ 136.385423] [] (arch_timer_handler_virt) from > [] (handle_percpu_devid_irq+0xc8/0x344) > [ 136.395004] [] (handle_percpu_devid_irq) from > [] (generic_handle_irq+0x20/0x34) > [ 136.404063] [] (generic_handle_irq) from > [] (__handle_domain_irq+0x50/0xb8) > [ 136.412779] [] (__handle_domain_irq) from > [] (gic_handle_irq+0x4c/0xa8) > [ 136.421144] [] (gic_handle_irq) from [] > (__irq_svc+0x70/0x98) > [ 136.428633] Exception stack(0xed237ca8 to 0xed237cf0) > [ 136.433695] 7ca0: 00000000 00000000 > 0000ec7a 0000a444 ec7aa540 ffffe000 > [ 136.441884] 7cc0: 00000001 c11c9ca8 c18cb110 ec7aa560 > ec7aa540 c110cb94 c0f76670 ed237cf8 > [ 136.450069] 7ce0: c017c948 c017c8e0 80000013 ffffffff > [ 136.455133] [] (__irq_svc) from [] > (do_raw_spin_lock+0x70/0x114) > [ 136.462888] [] (do_raw_spin_lock) from [] > (__mutex_lock+0xc8/0x900) > [ 136.470903] [] (__mutex_lock) from [] > (mutex_lock_nested+0x1c/0x24) > [ 136.478919] [] (mutex_lock_nested) from > [] (imx_media_pipeline_set_stream+0x50/0x110) > [ 136.488499] [] (imx_media_pipeline_set_stream) from > [] (capture_start_streaming+0x38/0xe0) > [ 136.498513] [] (capture_start_streaming) from > [] (vb2_start_streaming+0x5c/0x150) > [ 136.507745] [] (vb2_start_streaming) from > [] (vb2_core_streamon+0x7c/0x14c) > [ 136.516455] [] (vb2_core_streamon) from > [] (__video_do_ioctl+0x210/0x44c) > [ 136.524991] [] (__video_do_ioctl) from [] > (video_usercopy+0x294/0x7e0) > [ 136.533267] [] (video_usercopy) from [] > (do_vfs_ioctl+0x9c/0x9ec) > [ 136.541110] [] (do_vfs_ioctl) from [] > (ksys_ioctl+0x34/0x60) > [ 136.548518] [] (ksys_ioctl) from [] > (ret_fast_syscall+0x0/0x28) > [ 136.556180] Exception stack(0xed237fa8 to 0xed237ff0) > [ 136.561242] 7fa0: 00000000 be8bca2c > 00000003 40045612 be8bca2c 00000000 > [ 136.569430] 7fc0: 00000000 be8bca2c 00000000 00000036 > 000142e8 c0445609 00000000 00014324 > [ 136.577616] 7fe0: 00025014 be8bca00 00012fc8 b6f5bd50 > > Have you tested this on mainline ? :-) Sure, all this was made and tested with mainline and never saw this. > I investigated the issue a bit, > and it seems that the various files in the drivers play around > with > platform_drvdata in a way that isn't very clean, nor very > correct. I am this week in bkk19 Connect, and did not brought the board with me, but I can check it next week. And of course if you are looking at this, patches are welcome. Thanks for the testing. --- Cheers, Rui > >> The main difference from the version in the previous series is >> as >> commented by Laurent: >> - split of dtsi and dts in 2 patches >> - push endpoints to imx7s.dtsi >> >> Cheers, >> Rui >> >> v2->v3: >> Laurent Pinchart: >> - Add label to csi-mux >> - Disable csi-mux in imx7s >> - enable it in warp dts >> - add port@0 to mux >> >> v1->v2: >> Shawn Guo: >> - sort alphabetically >> - hyphen for node name >> - indent align clocks >> - send status to end of property list >> >> Rui Miguel Silva (5): >> ARM: dts: imx7s: add mipi phy power domain >> ARM: dts: imx7s: add multiplexer controls >> ARM: dts: imx7s: Add video mux, csi and mipi_csi >> ARM: dts: imx7s-warp: add csi and mipi_csi node >> ARM: dts: imx7s-warp: add ov2680 sensor node >> >> arch/arm/boot/dts/imx7s-warp.dts | 59 ++++++++++++++++++++ >> arch/arm/boot/dts/imx7s.dtsi | 92 >> +++++++++++++++++++++++++++++++- >> 2 files changed, 149 insertions(+), 2 deletions(-)