diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-09-09 17:18:03 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-09-13 20:13:26 +0300 |
commit | 04b20723d457e2e101f3c019046948bbe9c34980 (patch) | |
tree | fac1b002fa56c52d4d09f5065637cb4b71dafd48 /test/v4l2_subdevice | |
parent | e832a00bab6153e4bc3044dc413cee24e5181498 (diff) |
libcamera: device_enumerator_udev: Support entities sharing device nodes
Some media devices, such as V4L2 M2M devices, share the same device node
for multiple entities. The udev enumerator used to support this, but
commit 6e620349009d ("libcamera: device_enumerator: fix udev media graph
loading dependency") broke this.
To fix the problem, rework the media device to V4L2 devices matching
code. A new MediaDeviceDeps internal struct stores unmet device number
dependencies for a media device, and is stored in a list of pending
media devices. To avoid linear lookups, the dependencies are cached in a
reverse map of device number to media device dependencies.
Fixes: 6e620349009d ("libcamera: device_enumerator: fix udev media graph loading dependency")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'test/v4l2_subdevice')
0 files changed, 0 insertions, 0 deletions