Open mchalain opened 2 months ago
Hello every body, Here my trouble, I may send more information. Thank you a lot for any help.
Might be worth adding "over_voltage=2" to config.txt, rebooting and testing again.
Thx popcornmix! but it doesn't the problem. I found that the ISP capture (video14) must start (streamon) before to queue buffer into the ISP output (video13). This limitation is recent, and create a kernel crash and a VideoCore freeze.
Recent is relative. bcm2835-isp last had a very minor update in April 2024, and the firmware side was last changed in April 2023.
Memory says that buffers submitted to the ISP input queue (video13) will be sent to the outputs that are enabled at the point of submission. Submitting to video13 with none of video14-16 enabled should therefore just result in a discard and return of the input buffer. This did change back in Oct 2022 - prior to that it would wait for video14 to be enabled before processing the frame.
I will see if I can find a few moments to run your app (assuming it will build with a simple make
.
Otherwise if you could add start_debug=1
to /boot/firmware/config.txt, reboot, run your app, and then sudo vclog -a
should list any asserts that have fired on the Videocore side. That might give us a heads up on what is going wrong.
Hello, your description looks like I see with each firmware. The new feature may not be an issue (but it's worry to not be able to start the before before choice between preview or record). But the new feature generates a freeze of GPU and after a kernel crash when it tries to get informations from GPU. My current application runs correctly on RaspberryOS, but I made some enhancements and now I have to correct to run on this OS (it runs on Buildroot). I will send to you the log when I correct my code. I saw another issue when I call STREAMOFF if there is buffers in the pipe. But I can give more informations, I was a crash of the unicam driver. Thank you.
I've finally found time to try your app. I'm on a Pi4 so need to render to "screen" (DRM) instead of "gpu" (GL) as your code isn't looking for a correct DRM render device.
The image is very blue, and torn (it looks like a buffer start address is wrong so we get a wrap about 1/3rd of the way down the buffer), but I can't reproduce a crash or firmware lockup.
This is on the latest firmware and kernel.
$ vcgencmd version
May 3 2024 19:32:42
Copyright (c) 2012 Broadcom
version fef7849c350cb250be836afc6d43c742f9ebc97a (clean) (release) (start_db)
$ uname -a
Linux bookworm64-1 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt1 (2024-09-26) aarch64 GNU/Linux
Tried on a Pi3, and get similar results. I get weird images on the display if the -i cam-ov5647 -o isp-in
side is started first, but correct images if the -i isp-out -o screen
side is started first.
The firmware side is stalling processing as there are no output ports enabled, so it views it as unnecessary to process input buffers - all it could do is return them to the application. They should be returned cleanly if the application quits.
TBH having looked at it, it is not expected for a V4L2 M2M device to be opened by 2 totally different processes and effectively be treated as a Linux pipe between processes. There are discussions being had at the moment which will bind a context to these devices so that you can run multiple instances of the ISP, and not by replicating /dev/video nodes as we do at present.
The weird images do make me wonder if there is a path where the ISP isn't correctly configured. That would have the potential to write to random parts of memory and do bad things, however I'm not convinced it's worth chasing down. There is something in the logs that does make it look like we're only producing 480 lines on the output instead of the expected 1080, so I'll have a quick look into that.
There is something different in the ISP configuration depending on whether input or output is started first. If input is started first, I'm only getting 480 output lines signaled, and the conversion is taking around 2250usecs. If output is started first, I'm getting the expected 1080 output lines signaled, and the conversion is taking around 7500usecs.
I think I've identified the issue, so will throw up a test firmware when CI has done the business.
Is this the right place for my bug report? My bug occurs depending on the version of start.elf and fixup.dat and it is available with my application.
The application runs on old raspberry firmwares and on PC. The linux kernel version has not effect on the trouble.
Then I try here to find help.
Describe the bug My application fastvideo uses an ov5647 camera and the ISP directly with V4L2 API (not the libcamera).
A first process reads video0 and push the data to the ISP video13 with DMA_buf protocol.
A second process configure video14 to read the ISP with DMA_buf and push then to the gpu.
But after the STREAM_ON the first process treats one buffer to push on the ISP and the both process doesn't receive any event from the kernel other than a timer. If we kill the second process, this one is blocking inside the STREAM_OFF.
To reproduce
Expected behaviour The camera image should appear on the screen.
Actual behaviour A frame is opened on the screen but it is empty. CTRL+C inside the second process is blocking inside STREAM_OFF
System Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW PiZeroW2 + CAM OV5647
Which OS and version (
cat /etc/rpi-issue
)?Which firmware version (
vcgencmd version
)?and run on
Which kernel version (
uname -a
)?Logs After 1 second I have a kernel oops:
and after the CTRL+C the following kernel message appears
Additional context
Please help