-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Unicam Media Controller support #4641
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
Conversation
Added a couple of extra patches that will be squashed into the "Add support for configuration via MC API", but Naush may have started reviewing. |
|
||
static void unicam_mc_set_default_format(struct unicam_node *node, int pad_id) | ||
{ | ||
if (pad_id == IMAGE_PAD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still wonder if this should query the subdev for the format, but it's not something other drivers do...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conversion is based largely on Tomi's conversion of ti-vpe, and that doesn't do it.
AIUI The only interaction between the subdevs should be during link_validate, and we do that now.
eab179d
to
9b5a2e2
Compare
Rebased, fixed up comments, added updates to all CSI source overlays, and squashed. Overlays shouldn't change now (expect based on review comments), but v4l2-compliance is complaining so I need to fix that up. |
e478e1f
to
2185d80
Compare
OK, hopefully that has everything sorted. v4l2-compliance is now happy with both nodes. I have also changed the default embedded data buffer size to 16kB - sorry Naush as that sort of makes your latest changes redundant (at least for now). Removing WIP tag, but want Naush's confirmation that we're now all good from his side. |
…roller Switch the pipeline handler to use the new Unicam media controller based driver. With this change, we directly talk to the sensor device driver to set controls and set/get formats in the pipeline handler. This change requires the accompanying Raspberry Pi linux kernel change at raspberrypi/linux#4641. If this kernel change is not present, the pipeline handler will fail to run with an error message informing the user to update the kernel build. Signed-off-by: Naushir Patuck <[email protected]>
Yup, all looks good to me. I'm happy to merge all but d49eb3d straight away. If we can hold off merging the overlays switch to MC, that can be co-ordinated with the userland changes. |
I'll update PR to drop d49eb3d and make a new PR for it (to be merged when libcamera changes are also accepted). |
The driver was making big assumptions about the source device using pad 0 and 1, which doesn't follow for more complex devices where Unicam's source device may be a sink device for something else. Read the pad numbers through media controller, and reference them appropriately. Signed-off-by: Dave Stevenson <[email protected]>
Adds Media Controller API support for more complex pipelines. libcamera is about to switch to using this mechanism for configuring sensors. This can be enabled by either a module parameter, or device tree. Various functions have been moved to group video-centric and mc-centric functions together. Based on a similar conversion done to ti-vpe. Signed-off-by: Dave Stevenson <[email protected]>
Commit db8e94e upstream The existing link format validation failure debug message in media-entity.c helped to pinpoint the point of failure but provided no additional information what's wrong. Tell the user exactly why the validation failed. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2185d80
to
b9ef900
Compare
Overlays patch dropped. Should be good to go. |
kernel: ARM: dts: vc4-kms-v3d: Always disable firmware HDMI See: raspberrypi/linux#4652 kernel: media: bcm2835-codec: Limit video callbacks See: raspberrypi/linux#4646 kernel: staging/bcm2835-camera: Add support for H264_MIN_QP, H264_MAX_QP, MPEG_VIDEO_FORCE_KEY_FRAME See: raspberrypi/linux#4647 kernel: bcm2835-isp: Colorspace fixes See: raspberrypi/linux#4643 kernel: Unicam Media Controller support See: raspberrypi/linux#4641 kernel: config: Enable FSFS_FS_SECURITY See: raspberrypi/linux#4637 kernel: gpio: bcm-virt: Fix the get() method See: raspberrypi/linux#4638 firmware: userland: Reduce debug_sym error messages See: https://forums.raspberrypi.com/viewtopic.php?f=98&t=322238 firmware: arm_dt: Increase maximum line length to 98 See: raspberrypi/linux#4638
kernel: ARM: dts: vc4-kms-v3d: Always disable firmware HDMI See: raspberrypi/linux#4652 kernel: media: bcm2835-codec: Limit video callbacks See: raspberrypi/linux#4646 kernel: staging/bcm2835-camera: Add support for H264_MIN_QP, H264_MAX_QP, MPEG_VIDEO_FORCE_KEY_FRAME See: raspberrypi/linux#4647 kernel: bcm2835-isp: Colorspace fixes See: raspberrypi/linux#4643 kernel: Unicam Media Controller support See: raspberrypi/linux#4641 kernel: config: Enable FSFS_FS_SECURITY See: raspberrypi/linux#4637 kernel: gpio: bcm-virt: Fix the get() method See: raspberrypi/linux#4638 firmware: userland: Reduce debug_sym error messages See: https://forums.raspberrypi.com/viewtopic.php?f=98&t=322238 firmware: arm_dt: Increase maximum line length to 98 See: raspberrypi/linux#4638
Updates bcm2835-unicam to allow it to use Media Controller fully for the more complex pipelines.
This does still want to be updated to add a DT switch between MC-centric and video-centric in addition to the module parameter. There's then the discussion over which we adopt as the default.@naushir has patches to make libcamera work with the new scheme, and that is the way we want to go, but it may need some coordination in changeover.