-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixups for ADV7180/728x on Pi5 #5806
Conversation
8157ef5
to
6ff067e
Compare
Added a couple of other patches for cleaning up the CFE formats table. 16bit formats is being queried on raspberrypi/libcamera#99 and looks to be missing the csi_dt value, so presumably metadata will be dropping into the CFE. |
Not setting the csi_dt for 16bit formats does appear to be an issue. Hacking imx708 to say that it produces RGGB16 produces random noise with the current kernel tree, and the anticipated kernel WARN from cfe.c:855 of
Adding the csi_dt value gives me an error within libcamera of
binHi = 1023, binHi = 1023.
This has been introduced by 55f1ecb. |
No objections to the changes, LGTM. |
This may be explained by the CSI2/FE thinking things are 16-bits and doing no shifts on the pixel data causing the stats to not add up correctly. |
But the link here is between a device node entity and a v4l2-subdev entity IIRC. Surely that has to be a valid configuration? |
I'd agree, but the core code is currently objecting to it since 6.4. |
Noted that if we get "node link is not enabled", then we also get the videobuf2 splat for the driver not cleaning up correctly on a failed start_streaming, and indeed we weren't returning the buffers. Checking the other error paths, noted that the "FE enabled, but FE_CONFIG node is not" path was not calling pm_runtime_put. Fix both paths. Signed-off-by: Dave Stevenson <[email protected]>
CSI2 devices are meant to use the 1Xnn formats rather than 2Xnn such as MEDIA_BUS_FMT_UYVY8_2X8. For devices with ADV7180_FLAG_MIPI_CSI2 set, use MEDIA_BUS_FMT_UYVY8_1X16. Signed-off-by: Dave Stevenson <[email protected]>
For CSI2 receivers that need to know the link frequency, add it as a control to the driver. Interlaced modes are 216Mbp/s or 108MHz, whilst going through the I2P to deinterlace gives 432Mb/s or 216MHz. Signed-off-by: Dave Stevenson <[email protected]>
Seeing as we now have the CSI2 data types defined, make use of them instead of hardcoding the values. Signed-off-by: Dave Stevenson <[email protected]>
Raw 16bit formats didn't have a csi_dt value defined, which presumably would trip the WARN_ON(!fmt->csi_dt); in cfe_start_channel. The value is defined in CSI2 v2.0 as 0x2e, so set it accordingly. Signed-off-by: Dave Stevenson <[email protected]>
a866c35
to
09a022a
Compare
@naushir Any other comments on this one, or can we merge? |
Nope, LGTM. Happy to merge it. |
@naushir for error handling on CFE.
The others add the required information for ADV7180, but I've not got it streaming yet (yes I have set all the media-ctl links, just no buffers).