diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2019-05-11 00:50:11 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-05-28 21:15:36 +0300 |
commit | 3ef46bc97ca2c918b7657a08220c7340a9bb07a2 (patch) | |
tree | 2dc3355672c7c66085449f5e256a53d9e56c1ea0 /drivers/staging/media/imx/imx-media-internal-sd.c | |
parent | 6b8952db064480544a03d76601006f3eb9e89383 (diff) | |
download | linux-3ef46bc97ca2c918b7657a08220c7340a9bb07a2.tar.xz |
media: staging/imx: Improve pipeline searching
Export find_pipeline_pad(), renaming to imx_media_pipeline_pad(), and
extend its functionality to allow searching for video devices in the
enabled pipeline in addition to sub-devices.
As part of this:
- Rename imx_media_find_mipi_csi2_channel() to
imx_media_pipeline_csi2_channel().
- Remove imx_media_find_upstream_pad(), it is redundant now.
- Rename imx_media_find_upstream_subdev() to imx_media_pipeline_subdev()
with an additional boolean argument for searching upstream or downstream.
- Add imx_media_pipeline_video_device() which is analogous to
imx_media_pipeline_subdev() but searches for video devices.
- Remove imxmd pointer arg from all of the functions above, it was
never used in those functions. With that change the i.MX5/6 CSI,
VDIC, and IC sub-devices no longer require the media_device.
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx/imx-media-internal-sd.c')
-rw-r--r-- | drivers/staging/media/imx/imx-media-internal-sd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/media/imx/imx-media-internal-sd.c b/drivers/staging/media/imx/imx-media-internal-sd.c index c96f273e2e3d..cb1e4cdd5079 100644 --- a/drivers/staging/media/imx/imx-media-internal-sd.c +++ b/drivers/staging/media/imx/imx-media-internal-sd.c @@ -31,7 +31,7 @@ struct internal_subdev { u32 grp_id; struct internal_pad pad[MAX_INTERNAL_PADS]; - struct v4l2_subdev * (*sync_register)(struct imx_media_dev *imxmd, + struct v4l2_subdev * (*sync_register)(struct v4l2_device *v4l2_dev, struct device *ipu_dev, struct ipu_soc *ipu, u32 grp_id); @@ -224,7 +224,8 @@ int imx_media_register_ipu_internal_subdevs(struct imx_media_dev *imxmd, continue; mutex_unlock(&imxmd->mutex); - sd = intsd->sync_register(imxmd, ipu_dev, ipu, intsd->grp_id); + sd = intsd->sync_register(&imxmd->v4l2_dev, ipu_dev, ipu, + intsd->grp_id); mutex_lock(&imxmd->mutex); if (IS_ERR(sd)) { ret = PTR_ERR(sd); |