Commit 7318abfa authored by Philipp Zabel's avatar Philipp Zabel Committed by Hans Verkuil

media: imx: Use get_mbus_config instead of parsing upstream DT endpoints

Stop parsing upstream neighbors' device-tree endpoints to retrieve the
media bus configuration. Instead use the get_mbus_config op and throw an
error if the upstream subdevice does not implement it.

Also drop the corresponding TODO entry and the now unused
imx_media_get_pad_fwnode() function.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Tested-by: default avatarMarco Felsch <m.felsch@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent e65faec5
......@@ -2,18 +2,6 @@
- The Frame Interval Monitor could be exported to v4l2-core for
general use.
- The CSI subdevice parses its nearest upstream neighbor's device-tree
bus config in order to setup the CSI. Laurent Pinchart argues that
instead the CSI subdev should call its neighbor's g_mbus_config op
(which should be propagated if necessary) to get this info. However
Hans Verkuil is planning to remove the g_mbus_config op. For now this
driver uses the parsed DT bus config method until this issue is
resolved.
2020-06: g_mbus has been removed in favour of the get_mbus_config pad
operation which should be used to avoid parsing the remote endpoint
configuration.
- This media driver supports inheriting V4L2 controls to the
video capture devices, from the subdevices in the capture device's
pipeline. The controls for each capture device are updated in the
......
This diff is collapsed.
......@@ -813,39 +813,6 @@ imx_media_pipeline_video_device(struct media_entity *start_entity,
}
EXPORT_SYMBOL_GPL(imx_media_pipeline_video_device);
/*
* Find a fwnode endpoint that maps to the given subdevice's pad.
* If there are multiple endpoints that map to the pad, only the
* first endpoint encountered is returned.
*
* On success the refcount of the returned fwnode endpoint is
* incremented.
*/
struct fwnode_handle *imx_media_get_pad_fwnode(struct media_pad *pad)
{
struct fwnode_handle *endpoint;
struct v4l2_subdev *sd;
if (!is_media_entity_v4l2_subdev(pad->entity))
return ERR_PTR(-ENODEV);
sd = media_entity_to_v4l2_subdev(pad->entity);
fwnode_graph_for_each_endpoint(dev_fwnode(sd->dev), endpoint) {
int pad_idx = media_entity_get_fwnode_pad(&sd->entity,
endpoint,
pad->flags);
if (pad_idx < 0)
continue;
if (pad_idx == pad->index)
return endpoint;
}
return ERR_PTR(-ENODEV);
}
EXPORT_SYMBOL_GPL(imx_media_get_pad_fwnode);
/*
* Turn current pipeline streaming on/off starting from entity.
*/
......
......@@ -219,7 +219,6 @@ imx_media_pipeline_subdev(struct media_entity *start_entity, u32 grp_id,
struct video_device *
imx_media_pipeline_video_device(struct media_entity *start_entity,
enum v4l2_buf_type buftype, bool upstream);
struct fwnode_handle *imx_media_get_pad_fwnode(struct media_pad *pad);
struct imx_media_dma_buf {
void *virt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment