Repository navigation
media: i2c: ov5647: Grab [HV]FLIP controls when streaming - #7685
Conversation
The HFLIP and VFLIP controls change the pixel format, so can not be changed whilst streaming. Grab those controls when starting streaming, and release them when stopping. Fixes: 7435508 ("media: i2c: ov5647: Support HFLIP and VFLIP") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
Thanks for the quick response and for preparing the fix so promptly. I really appreciate it! |
This is why I say there's little point pointing AI at it - within the first line of your report I knew what the problem was going to be. A clear description of the issue is worth far more than masses of analysis. |
|
Hey 6by9, The funny thing is, I had already analyzed the root cause in detail a few weeks ago and it was definitely in the driver; unfortunately, I’d misplaced my notes on it, so I had to quickly go through the process again. In my prompt, I even mentioned that there was an error in the driver and that I was looking for the cause... Tested successfully on my Raspberry Pi 5 with the kernel from sudo rpi-update pulls/7685. With the OV5647 streaming using --rotation 180, starting a second rpicam-vid instance on the IMX477 no longer changes the OV5647's HFLIP/VFLIP controls or its preview orientation. The patch fixes the issue in my setup. Thanks again for the quick fix! |
JamesH65
left a comment
There was a problem hiding this comment.
Just for my own undersstanding, are these released automagically, rather than needing a specific ungrab?
https://elixir.bootlin.com/linux/v7.2.10/source/include/media/v4l2-ctrls.h#L902
|
Gotcha, I'd missed that this function could both start and stop. Ta! |
The HFLIP and VFLIP controls change the pixel format, so can not be changed whilst streaming.
Grab those controls when starting streaming, and release them when stopping.
Fixes: 7435508 ("media: i2c: ov5647: Support HFLIP and VFLIP")
raspberrypi/libcamera#360