Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: staging/imx: update TODO

Update TODO file:

- Remove TODO info about the OV564x driver, while this still needs
to be done (add a OV5642 driver or merge with OV5640 driver), it
is not relevant here.

- Update TODO about methods for retrieving CSI bus config.

- Add some TODO's about OF graph parsing restrictions.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Steve Longerbeam and committed by
Mauro Carvalho Chehab
45267fed e762fe4c

+51 -12
+51 -12
drivers/staging/media/imx/TODO
··· 1 1 2 - - Clean up and move the ov5642 subdev driver to drivers/media/i2c, or 3 - merge support for OV5642 into drivers/media/i2c/ov5640.c, and create 4 - the binding docs for it. 5 - 6 2 - The Frame Interval Monitor could be exported to v4l2-core for 7 3 general use. 8 4 9 - - At driver load time, the device-tree node that is the original source 10 - (the "sensor"), is parsed to record its media bus configuration, and 11 - this info is required in imx-media-csi.c to setup the CSI. 12 - Laurent Pinchart argues that instead the CSI subdev should call its 13 - neighbor's g_mbus_config op (which should be propagated if necessary) 14 - to get this info. However Hans Verkuil is planning to remove the 15 - g_mbus_config op. For now this driver uses the parsed DT mbus config 16 - method until this issue is resolved. 5 + - The CSI subdevice parses its nearest upstream neighbor's device-tree 6 + bus config in order to setup the CSI. Laurent Pinchart argues that 7 + instead the CSI subdev should call its neighbor's g_mbus_config op 8 + (which should be propagated if necessary) to get this info. However 9 + Hans Verkuil is planning to remove the g_mbus_config op. For now this 10 + driver uses the parsed DT bus config method until this issue is 11 + resolved. 17 12 18 13 - This media driver supports inheriting V4L2 controls to the 19 14 video capture devices, from the subdevices in the capture device's ··· 16 21 link_notify callback when the pipeline is modified. It should be 17 22 decided whether this feature is useful enough to make it generally 18 23 available by exporting to v4l2-core. 24 + 25 + - The OF graph is walked at probe time to form the list of fwnodes to 26 + be passed to v4l2_async_notifier_register(), starting from the IPU 27 + CSI ports. And after all async subdevices have been bound, 28 + v4l2_fwnode_parse_link() is used to form the media links between 29 + the entities discovered by walking the OF graph. 30 + 31 + While this approach allows support for arbitrary OF graphs, there 32 + are some assumptions for this to work: 33 + 34 + 1. All port parent nodes reachable in the graph from the IPU CSI 35 + ports bind to V4L2 async subdevice drivers. 36 + 37 + If a device has mixed-use ports such as video plus audio, the 38 + endpoints from the audio ports are followed to devices that must 39 + bind to V4L2 subdevice drivers, and not for example, to an ALSA 40 + driver or a non-V4L2 media driver. If the device were bound to 41 + such a driver, imx-media would never get an async completion 42 + notification because the device fwnode was added to the async 43 + list, but the driver does not interface with the V4L2 async 44 + framework. 45 + 46 + 2. Every port reachable in the graph is treated as a media pad, 47 + owned by the V4L2 subdevice that is bound to the port's parent. 48 + 49 + This presents problems for devices that don't make this port = pad 50 + assumption. Examples are SMIAPP compatible cameras which define only 51 + a single output port node, but which define multiple pads owned 52 + by multiple subdevices (pixel-array, binner, scaler). Or video 53 + decoders (entity function MEDIA_ENT_F_ATV_DECODER), which also define 54 + only a single output port node, but define multiple pads for video, 55 + VBI, and audio out. 56 + 57 + A workaround at present is to set the port reg properties to 58 + correspond to the media pad index that the port represents. A 59 + possible long-term solution is to implement a subdev API that 60 + maps a port id to a media pad index. 61 + 62 + 3. Every endpoint of a port reachable in the graph is treated as 63 + a media link, between V4L2 subdevices that are bound to the 64 + port parents of the local and remote endpoints. 65 + 66 + Which means a port must not contain mixed-use endpoints, they 67 + must all refer to media links between V4L2 subdevices.