[PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload

Stefan Wahren stefan.wahren at i2se.com
Wed Jan 9 08:33:36 UTC 2019


Hi,

[add Arnd]

> Dave Stevenson <dave.stevenson at raspberrypi.org> hat am 8. Januar 2019 um 18:10
> geschrieben:
> 
> 
> Hi Peter
> 
> On Tue, 8 Jan 2019 at 07:21, Peter Robinson <pbrobinson at gmail.com> wrote:
> >
> > Hi Stefan,
> >
> > > This patch series improves the load/unload of bcm2835 camera and audio
> > > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> > >
> > > This series based on current linux-next and Phil Elwell's series ("Improve
> > > VCHIQ
> > > cache line size handling"). After Nicolas' series ("staging:
> > > vc04_services:
> > > Some dead code removal") has been applied, i will rebase my series.
> >
> > I tried testing this series applied to 4.20 with the camera module. I
> > tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> > gstreamer. I basically get the same crash for both options. Desktop is
> > LXDE on 32 bit Fedora 29.
> >
> > I've not yet tried with 5.0-rc1 but it looks like it has this patch
> > series and some other bits for the vchiq drivers in staging.
> 
> I'm trying to sort the patches I have on our kernel tree and get them
> in a shape to get merged to staging.
> I've built for 5.0.0-rc1 and also see the same error using:
> v4l2-ctl -v width=640,height=480,pixelformat=YU12
> v4l2-ctl --stream-mmap=3 --stream-to=/dev/null --stream-count=300
> 

i wasn't able to reproduce this issue yet (Raspberry Pi 3, Firmware:
2018-12-18 + 2018-11-12). qv4l2 and cheese from recent Raspbian shows an greenish image but
works.

I tried to capture a video with cheese but this seems to hang and after some
time i terminated cheese and got this kernel output:

[  238.330187] bcm2835_v4l2: timed out waiting for sync completion
[  238.330202] bcm2835-v4l2: Failed disabling camera, ret -62
[  238.330206] bcm2835-v4l2: Failed to disable camera
[  238.330211] ------------[ cut here ]------------
[  238.330239] WARNING: CPU: 3 PID: 1259 at
drivers/media/common/videobuf2/videobuf2-core.c:1852
__vb2_queue_cancel+0x1d8/0x24c [videobuf2_common]
[  238.330242] Modules linked in: cmac bcm2835_v4l2(C) v4l2_common
videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev
media snd_bcm2835(C) brcmfmac sha256_generic sha256_arm vc4 snd_soc_core
ac97_bus snd_pcm_dmaengine snd_pcm snd_timer cfg80211 snd crc32_arm_ce
raspberrypi_hwmon soundcore brcmutil hci_uart btbcm bluetooth bcm2835_thermal
ecdh_generic vchiq(C) phy_generic microchip lan78xx
[  238.330328] CPU: 3 PID: 1259 Comm: v4l2src1:src Tainted: G         C
       5.0.0-rc1-g3bd6e94be #2
[  238.330331] Hardware name: BCM2835
[  238.330359] [<c031234c>] (unwind_backtrace) from [<c030cd64>]
(show_stack+0x10/0x14)
[  238.330373] [<c030cd64>] (show_stack) from [<c0e33830>]
(dump_stack+0x8c/0xa0)
[  238.330388] [<c0e33830>] (dump_stack) from [<c0345e00>] (__warn+0xe0/0xf8)
[  238.330401] [<c0345e00>] (__warn) from [<c0345f30>]
(warn_slowpath_null+0x40/0x48)
[  238.330421] [<c0345f30>] (warn_slowpath_null) from [<bf4f60b0>]
(__vb2_queue_cancel+0x1d8/0x24c [videobuf2_common])
[  238.330466] [<bf4f60b0>] (__vb2_queue_cancel [videobuf2_common]) from
[<bf4f7a0c>] (vb2_core_queue_release+0x18/0x38 [videobuf2_common])
[  238.330490] [<bf4f7a0c>] (vb2_core_queue_release [videobuf2_common]) from
[<bf5059e8>] (_vb2_fop_release+0x74/0x84 [videobuf2_v4l2])
[  238.330533] [<bf5059e8>] (_vb2_fop_release [videobuf2_v4l2]) from
[<bf4be428>] (v4l2_release+0x94/0xd8 [videodev])
[  238.330571] [<bf4be428>] (v4l2_release [videodev]) from [<c0480054>]
(__fput+0x84/0x1c8)
[  238.330588] [<c0480054>] (__fput) from [<c03640a0>] (task_work_run+0xa8/0xcc)
[  238.330604] [<c03640a0>] (task_work_run) from [<c0349984>]
(do_exit+0x3a4/0xa90)
[  238.330618] [<c0349984>] (do_exit) from [<c034af30>]
(do_group_exit+0x3c/0xd0)
[  238.330634] [<c034af30>] (do_group_exit) from [<c03563a0>]
(get_signal+0x24c/0x6d8)
[  238.330647] [<c03563a0>] (get_signal) from [<c030c184>]
(do_work_pending+0x150/0x5a8)
[  238.330659] [<c030c184>] (do_work_pending) from [<c030106c>]
(slow_work_pending+0xc/0x20)
[  238.330665] Exception stack(0xe589ffb0 to 0xe589fff8)
[  238.330674] ffa0:                                     ab203ea0 00000002
00000000 00000000
[  238.330685] ffc0: 00000008 00000002 ab203ea0 00000150 00000000 009bfd80
ffffffff ffffffff
[  238.330695] ffe0: ab1fe54c ab1fe558 00000000 b6155d68 80000010 ab203ea0
[  238.330701] ---[ end trace 38eb902c180397fe ]---
[  238.330710] videobuf2_common: driver bug: stop_streaming operation is leaving
buf a00b2206 in active state
[  238.330717] videobuf2_common: driver bug: stop_streaming operation is leaving
buf c6a3f306 in active state
[  238.330723] videobuf2_common: driver bug: stop_streaming operation is leaving
buf d3723ebf in active state
[  238.330728] videobuf2_common: driver bug: stop_streaming operation is leaving
buf fd514935 in active state

But i noticed a regression introduced in 5.0-rc1, which might be related. I
tried to run "vchiq_test -f 1" and it never completes. After reverting commit
852b2876a8a8 ("staging: vchiq: rework remove_event handling") vchiq_test [1]
works as expected again.

Regards
Stefan

[1] -
https://github.com/raspberrypi/userland/blob/master/interface/vchiq_arm/vchiq_test.c


More information about the devel mailing list