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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Hi Dave,

> > > 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
>
> It's three independent things:
> - The firmware has failed the failed to enable the camera for reasons unknown.

OK, with the extended firmware enabled I get the following boot
messages before trying to access the camera:

[   27.541690] bcm2835_v4l2: module is from the staging directory, the
quality is unknown, you have been warned.
[   28.203301] bcm2835-v4l2: scene mode selected 0, was 0
[   28.203882] bcm2835-v4l2: V4L2 device registered as video0 - stills
mode > 1280x720
[   28.219128] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.

Any idea what I should be seeing besides this if it enables it
properly, I get different errors if I don't have extended firmware or
not enough memory.

With Stefan's upstream commit 4cc357c500d (staging: bcm2835-camera:
Add hint about possible faulty config) he reports "Not enough GPU
mem?" but I wonder if it's more accurate to report that the wrong
firmware is loaded, I've managed to get that error if I have enough
memory and aren't don't have "start_x=1" (or have start_x=10).

BTW what is enough memory? It seems 32Mb should be enough, tried with
the same results with 64Mb too but I've not found anything explicit
about features vs gpu_mem, until I've started looking at the camera
we've set it to 16Mb due to using the open vc4 driver, but as other
things start to come along like the camera, and presumably accelerated
video decoding, this seems to affect those.

As a side note it would be a useful debug feature from a support PoV
if the following line could also note which firmware is loaded:

[    8.087691] raspberrypi-firmware soc:firmware: Attached to firmware
from 2019-01-09 20:07

Something like "attached to extended/reduced/whatecer firmware from XXXX-XX-XX"

> - The error path then hasn't returned all the buffers to videobuf2,
> hence the warning from videobuf2-core.c:1468
> - The driver has then tried to pass some buffers to MMAL / VCHI which
> tries adding them to an invalid list.
>
> I'm investigating why the firmware is failing to enable the camera
> initially, and then look at cleaning up the error handling.

OK, let me know when you've got something you want me to test.

Peter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux