imxmd              38 drivers/staging/media/imx/imx-media-dev-common.c 	struct imx_media_dev *imxmd = notifier2dev(notifier);
imxmd              41 drivers/staging/media/imx/imx-media-dev-common.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
imxmd              55 drivers/staging/media/imx/imx-media-dev-common.c 			imx_media_create_csi_of_links(imxmd, sd);
imxmd              62 drivers/staging/media/imx/imx-media-dev-common.c 			imx_media_create_of_links(imxmd, sd);
imxmd              74 drivers/staging/media/imx/imx-media-dev-common.c static int imx_media_add_vdev_to_pad(struct imx_media_dev *imxmd,
imxmd              93 drivers/staging/media/imx/imx-media-dev-common.c 		v4l2_warn(&imxmd->v4l2_dev, "%s:%u has no vdev list!\n",
imxmd             108 drivers/staging/media/imx/imx-media-dev-common.c 	dev_dbg(imxmd->md.dev, "adding %s to pad %s:%u\n",
imxmd             111 drivers/staging/media/imx/imx-media-dev-common.c 	pad_vdev = devm_kzalloc(imxmd->md.dev, sizeof(*pad_vdev), GFP_KERNEL);
imxmd             129 drivers/staging/media/imx/imx-media-dev-common.c 			ret = imx_media_add_vdev_to_pad(imxmd, vdev,
imxmd             144 drivers/staging/media/imx/imx-media-dev-common.c static int imx_media_alloc_pad_vdev_lists(struct imx_media_dev *imxmd)
imxmd             151 drivers/staging/media/imx/imx-media-dev-common.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
imxmd             153 drivers/staging/media/imx/imx-media-dev-common.c 		vdev_lists = devm_kcalloc(imxmd->md.dev,
imxmd             170 drivers/staging/media/imx/imx-media-dev-common.c static int imx_media_create_pad_vdev_lists(struct imx_media_dev *imxmd)
imxmd             176 drivers/staging/media/imx/imx-media-dev-common.c 	ret = imx_media_alloc_pad_vdev_lists(imxmd);
imxmd             180 drivers/staging/media/imx/imx-media-dev-common.c 	list_for_each_entry(vdev, &imxmd->vdev_list, list) {
imxmd             183 drivers/staging/media/imx/imx-media-dev-common.c 		ret = imx_media_add_vdev_to_pad(imxmd, vdev, link->source);
imxmd             194 drivers/staging/media/imx/imx-media-dev-common.c 	struct imx_media_dev *imxmd = notifier2dev(notifier);
imxmd             197 drivers/staging/media/imx/imx-media-dev-common.c 	mutex_lock(&imxmd->mutex);
imxmd             203 drivers/staging/media/imx/imx-media-dev-common.c 	ret = imx_media_create_pad_vdev_lists(imxmd);
imxmd             207 drivers/staging/media/imx/imx-media-dev-common.c 	ret = v4l2_device_register_subdev_nodes(&imxmd->v4l2_dev);
imxmd             209 drivers/staging/media/imx/imx-media-dev-common.c 	mutex_unlock(&imxmd->mutex);
imxmd             213 drivers/staging/media/imx/imx-media-dev-common.c 	return media_device_register(&imxmd->md);
imxmd             221 drivers/staging/media/imx/imx-media-dev-common.c static int imx_media_inherit_controls(struct imx_media_dev *imxmd,
imxmd             230 drivers/staging/media/imx/imx-media-dev-common.c 		dev_dbg(imxmd->md.dev,
imxmd             252 drivers/staging/media/imx/imx-media-dev-common.c 		ret = imx_media_inherit_controls(imxmd, vfd, pad->entity);
imxmd             263 drivers/staging/media/imx/imx-media-dev-common.c 	struct imx_media_dev *imxmd = container_of(link->graph_obj.mdev,
imxmd             300 drivers/staging/media/imx/imx-media-dev-common.c 			dev_dbg(imxmd->md.dev,
imxmd             310 drivers/staging/media/imx/imx-media-dev-common.c 			dev_dbg(imxmd->md.dev,
imxmd             313 drivers/staging/media/imx/imx-media-dev-common.c 			ret = imx_media_inherit_controls(imxmd, vfd,
imxmd             357 drivers/staging/media/imx/imx-media-dev-common.c 	struct imx_media_dev *imxmd;
imxmd             360 drivers/staging/media/imx/imx-media-dev-common.c 	imxmd = devm_kzalloc(dev, sizeof(*imxmd), GFP_KERNEL);
imxmd             361 drivers/staging/media/imx/imx-media-dev-common.c 	if (!imxmd)
imxmd             364 drivers/staging/media/imx/imx-media-dev-common.c 	dev_set_drvdata(dev, imxmd);
imxmd             366 drivers/staging/media/imx/imx-media-dev-common.c 	strscpy(imxmd->md.model, "imx-media", sizeof(imxmd->md.model));
imxmd             367 drivers/staging/media/imx/imx-media-dev-common.c 	imxmd->md.ops = ops ? ops : &imx_media_md_ops;
imxmd             368 drivers/staging/media/imx/imx-media-dev-common.c 	imxmd->md.dev = dev;
imxmd             370 drivers/staging/media/imx/imx-media-dev-common.c 	mutex_init(&imxmd->mutex);
imxmd             372 drivers/staging/media/imx/imx-media-dev-common.c 	imxmd->v4l2_dev.mdev = &imxmd->md;
imxmd             373 drivers/staging/media/imx/imx-media-dev-common.c 	imxmd->v4l2_dev.notify = imx_media_notify;
imxmd             374 drivers/staging/media/imx/imx-media-dev-common.c 	strscpy(imxmd->v4l2_dev.name, "imx-media",
imxmd             375 drivers/staging/media/imx/imx-media-dev-common.c 		sizeof(imxmd->v4l2_dev.name));
imxmd             377 drivers/staging/media/imx/imx-media-dev-common.c 	media_device_init(&imxmd->md);
imxmd             379 drivers/staging/media/imx/imx-media-dev-common.c 	ret = v4l2_device_register(dev, &imxmd->v4l2_dev);
imxmd             381 drivers/staging/media/imx/imx-media-dev-common.c 		v4l2_err(&imxmd->v4l2_dev,
imxmd             386 drivers/staging/media/imx/imx-media-dev-common.c 	INIT_LIST_HEAD(&imxmd->vdev_list);
imxmd             388 drivers/staging/media/imx/imx-media-dev-common.c 	v4l2_async_notifier_init(&imxmd->notifier);
imxmd             390 drivers/staging/media/imx/imx-media-dev-common.c 	return imxmd;
imxmd             393 drivers/staging/media/imx/imx-media-dev-common.c 	media_device_cleanup(&imxmd->md);
imxmd             399 drivers/staging/media/imx/imx-media-dev-common.c int imx_media_dev_notifier_register(struct imx_media_dev *imxmd,
imxmd             405 drivers/staging/media/imx/imx-media-dev-common.c 	if (list_empty(&imxmd->notifier.asd_list)) {
imxmd             406 drivers/staging/media/imx/imx-media-dev-common.c 		v4l2_err(&imxmd->v4l2_dev, "no subdevs\n");
imxmd             411 drivers/staging/media/imx/imx-media-dev-common.c 	imxmd->notifier.ops = ops ? ops : &imx_media_notifier_ops;
imxmd             412 drivers/staging/media/imx/imx-media-dev-common.c 	ret = v4l2_async_notifier_register(&imxmd->v4l2_dev,
imxmd             413 drivers/staging/media/imx/imx-media-dev-common.c 					   &imxmd->notifier);
imxmd             415 drivers/staging/media/imx/imx-media-dev-common.c 		v4l2_err(&imxmd->v4l2_dev,
imxmd              25 drivers/staging/media/imx/imx-media-dev.c 	struct imx_media_dev *imxmd = notifier2dev(notifier);
imxmd              30 drivers/staging/media/imx/imx-media-dev.c 		ret = imx_media_register_ipu_internal_subdevs(imxmd, sd);
imxmd              35 drivers/staging/media/imx/imx-media-dev.c 	v4l2_info(&imxmd->v4l2_dev, "subdev %s bound\n", sd->name);
imxmd              43 drivers/staging/media/imx/imx-media-dev.c 	struct imx_media_dev *imxmd = notifier2dev(notifier);
imxmd              51 drivers/staging/media/imx/imx-media-dev.c 	mutex_lock(&imxmd->mutex);
imxmd              53 drivers/staging/media/imx/imx-media-dev.c 	imxmd->m2m_vdev = imx_media_csc_scaler_device_init(imxmd);
imxmd              54 drivers/staging/media/imx/imx-media-dev.c 	if (IS_ERR(imxmd->m2m_vdev)) {
imxmd              55 drivers/staging/media/imx/imx-media-dev.c 		ret = PTR_ERR(imxmd->m2m_vdev);
imxmd              59 drivers/staging/media/imx/imx-media-dev.c 	ret = imx_media_csc_scaler_device_register(imxmd->m2m_vdev);
imxmd              61 drivers/staging/media/imx/imx-media-dev.c 	mutex_unlock(&imxmd->mutex);
imxmd              75 drivers/staging/media/imx/imx-media-dev.c 	struct imx_media_dev *imxmd;
imxmd              78 drivers/staging/media/imx/imx-media-dev.c 	imxmd = imx_media_dev_init(dev, NULL);
imxmd              79 drivers/staging/media/imx/imx-media-dev.c 	if (IS_ERR(imxmd))
imxmd              80 drivers/staging/media/imx/imx-media-dev.c 		return PTR_ERR(imxmd);
imxmd              82 drivers/staging/media/imx/imx-media-dev.c 	ret = imx_media_add_of_subdevs(imxmd, node);
imxmd              84 drivers/staging/media/imx/imx-media-dev.c 		v4l2_err(&imxmd->v4l2_dev,
imxmd              89 drivers/staging/media/imx/imx-media-dev.c 	ret = imx_media_dev_notifier_register(imxmd, &imx_media_notifier_ops);
imxmd              96 drivers/staging/media/imx/imx-media-dev.c 	v4l2_async_notifier_cleanup(&imxmd->notifier);
imxmd              97 drivers/staging/media/imx/imx-media-dev.c 	v4l2_device_unregister(&imxmd->v4l2_dev);
imxmd              98 drivers/staging/media/imx/imx-media-dev.c 	media_device_cleanup(&imxmd->md);
imxmd             105 drivers/staging/media/imx/imx-media-dev.c 	struct imx_media_dev *imxmd =
imxmd             108 drivers/staging/media/imx/imx-media-dev.c 	v4l2_info(&imxmd->v4l2_dev, "Removing imx-media\n");
imxmd             110 drivers/staging/media/imx/imx-media-dev.c 	v4l2_async_notifier_unregister(&imxmd->notifier);
imxmd             111 drivers/staging/media/imx/imx-media-dev.c 	imx_media_unregister_ipu_internal_subdevs(imxmd);
imxmd             112 drivers/staging/media/imx/imx-media-dev.c 	v4l2_async_notifier_cleanup(&imxmd->notifier);
imxmd             113 drivers/staging/media/imx/imx-media-dev.c 	imx_media_csc_scaler_device_unregister(imxmd->m2m_vdev);
imxmd             114 drivers/staging/media/imx/imx-media-dev.c 	media_device_unregister(&imxmd->md);
imxmd             115 drivers/staging/media/imx/imx-media-dev.c 	v4l2_device_unregister(&imxmd->v4l2_dev);
imxmd             116 drivers/staging/media/imx/imx-media-dev.c 	media_device_cleanup(&imxmd->md);
imxmd             133 drivers/staging/media/imx/imx-media-internal-sd.c static int create_internal_link(struct imx_media_dev *imxmd,
imxmd             145 drivers/staging/media/imx/imx-media-internal-sd.c 	v4l2_info(&imxmd->v4l2_dev, "%s:%d -> %s:%d\n",
imxmd             152 drivers/staging/media/imx/imx-media-internal-sd.c 		v4l2_err(&imxmd->v4l2_dev, "%s failed: %d\n", __func__, ret);
imxmd             157 drivers/staging/media/imx/imx-media-internal-sd.c static int create_ipu_internal_links(struct imx_media_dev *imxmd,
imxmd             179 drivers/staging/media/imx/imx-media-internal-sd.c 			sink = imxmd->sync_sd[ipu_id][link->remote];
imxmd             181 drivers/staging/media/imx/imx-media-internal-sd.c 			ret = create_internal_link(imxmd, sd, sink, link);
imxmd             190 drivers/staging/media/imx/imx-media-internal-sd.c int imx_media_register_ipu_internal_subdevs(struct imx_media_dev *imxmd,
imxmd             201 drivers/staging/media/imx/imx-media-internal-sd.c 		v4l2_err(&imxmd->v4l2_dev, "invalid IPU device!\n");
imxmd             207 drivers/staging/media/imx/imx-media-internal-sd.c 		v4l2_err(&imxmd->v4l2_dev, "invalid IPU id %d!\n", ipu_id);
imxmd             211 drivers/staging/media/imx/imx-media-internal-sd.c 	mutex_lock(&imxmd->mutex);
imxmd             214 drivers/staging/media/imx/imx-media-internal-sd.c 	if (!imxmd->ipu[ipu_id])
imxmd             215 drivers/staging/media/imx/imx-media-internal-sd.c 		imxmd->ipu[ipu_id] = ipu;
imxmd             221 drivers/staging/media/imx/imx-media-internal-sd.c 		sd = imxmd->sync_sd[ipu_id][i];
imxmd             230 drivers/staging/media/imx/imx-media-internal-sd.c 		mutex_unlock(&imxmd->mutex);
imxmd             231 drivers/staging/media/imx/imx-media-internal-sd.c 		sd = intsd->sync_register(&imxmd->v4l2_dev, ipu_dev, ipu,
imxmd             233 drivers/staging/media/imx/imx-media-internal-sd.c 		mutex_lock(&imxmd->mutex);
imxmd             239 drivers/staging/media/imx/imx-media-internal-sd.c 		imxmd->sync_sd[ipu_id][i] = sd;
imxmd             252 drivers/staging/media/imx/imx-media-internal-sd.c 			sd = imxmd->sync_sd[ipu_id][i];
imxmd             257 drivers/staging/media/imx/imx-media-internal-sd.c 		ret = create_ipu_internal_links(imxmd, intsd, sd, ipu_id);
imxmd             259 drivers/staging/media/imx/imx-media-internal-sd.c 			mutex_unlock(&imxmd->mutex);
imxmd             260 drivers/staging/media/imx/imx-media-internal-sd.c 			imx_media_unregister_ipu_internal_subdevs(imxmd);
imxmd             265 drivers/staging/media/imx/imx-media-internal-sd.c 	mutex_unlock(&imxmd->mutex);
imxmd             271 drivers/staging/media/imx/imx-media-internal-sd.c 		sd = imxmd->sync_sd[ipu_id][i];
imxmd             274 drivers/staging/media/imx/imx-media-internal-sd.c 		mutex_unlock(&imxmd->mutex);
imxmd             276 drivers/staging/media/imx/imx-media-internal-sd.c 		mutex_lock(&imxmd->mutex);
imxmd             279 drivers/staging/media/imx/imx-media-internal-sd.c 	mutex_unlock(&imxmd->mutex);
imxmd             283 drivers/staging/media/imx/imx-media-internal-sd.c void imx_media_unregister_ipu_internal_subdevs(struct imx_media_dev *imxmd)
imxmd             289 drivers/staging/media/imx/imx-media-internal-sd.c 	mutex_lock(&imxmd->mutex);
imxmd             294 drivers/staging/media/imx/imx-media-internal-sd.c 			sd = imxmd->sync_sd[i][j];
imxmd             299 drivers/staging/media/imx/imx-media-internal-sd.c 			mutex_unlock(&imxmd->mutex);
imxmd             301 drivers/staging/media/imx/imx-media-internal-sd.c 			mutex_lock(&imxmd->mutex);
imxmd             305 drivers/staging/media/imx/imx-media-internal-sd.c 	mutex_unlock(&imxmd->mutex);
imxmd              19 drivers/staging/media/imx/imx-media-of.c int imx_media_of_add_csi(struct imx_media_dev *imxmd,
imxmd              26 drivers/staging/media/imx/imx-media-of.c 		dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__,
imxmd              32 drivers/staging/media/imx/imx-media-of.c 	asd = v4l2_async_notifier_add_fwnode_subdev(&imxmd->notifier,
imxmd              38 drivers/staging/media/imx/imx-media-of.c 			dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n",
imxmd              46 drivers/staging/media/imx/imx-media-of.c int imx_media_add_of_subdevs(struct imx_media_dev *imxmd,
imxmd              57 drivers/staging/media/imx/imx-media-of.c 		ret = imx_media_of_add_csi(imxmd, csi_np);
imxmd              85 drivers/staging/media/imx/imx-media-of.c static int create_of_link(struct imx_media_dev *imxmd,
imxmd              95 drivers/staging/media/imx/imx-media-of.c 	remote = imx_media_find_subdev_by_fwnode(imxmd, link->remote_node);
imxmd             126 drivers/staging/media/imx/imx-media-of.c int imx_media_create_of_links(struct imx_media_dev *imxmd,
imxmd             138 drivers/staging/media/imx/imx-media-of.c 		ret = create_of_link(imxmd, sd, &link);
imxmd             152 drivers/staging/media/imx/imx-media-of.c int imx_media_create_csi_of_links(struct imx_media_dev *imxmd,
imxmd             182 drivers/staging/media/imx/imx-media-of.c 		ret = create_of_link(imxmd, csi, &link);
imxmd             725 drivers/staging/media/imx/imx-media-utils.c imx_media_find_subdev_by_fwnode(struct imx_media_dev *imxmd,
imxmd             730 drivers/staging/media/imx/imx-media-utils.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
imxmd             740 drivers/staging/media/imx/imx-media-utils.c imx_media_find_subdev_by_devname(struct imx_media_dev *imxmd,
imxmd             745 drivers/staging/media/imx/imx-media-utils.c 	list_for_each_entry(sd, &imxmd->v4l2_dev.subdevs, list) {
imxmd             758 drivers/staging/media/imx/imx-media-utils.c void imx_media_add_video_device(struct imx_media_dev *imxmd,
imxmd             761 drivers/staging/media/imx/imx-media-utils.c 	mutex_lock(&imxmd->mutex);
imxmd             763 drivers/staging/media/imx/imx-media-utils.c 	list_add_tail(&vdev->list, &imxmd->vdev_list);
imxmd             765 drivers/staging/media/imx/imx-media-utils.c 	mutex_unlock(&imxmd->mutex);
imxmd             914 drivers/staging/media/imx/imx-media-utils.c int imx_media_pipeline_set_stream(struct imx_media_dev *imxmd,
imxmd             925 drivers/staging/media/imx/imx-media-utils.c 	mutex_lock(&imxmd->md.graph_mutex);
imxmd             928 drivers/staging/media/imx/imx-media-utils.c 		ret = __media_pipeline_start(entity, &imxmd->pipe);
imxmd             941 drivers/staging/media/imx/imx-media-utils.c 	mutex_unlock(&imxmd->md.graph_mutex);
imxmd             187 drivers/staging/media/imx/imx-media.h imx_media_find_subdev_by_fwnode(struct imx_media_dev *imxmd,
imxmd             190 drivers/staging/media/imx/imx-media.h imx_media_find_subdev_by_devname(struct imx_media_dev *imxmd,
imxmd             192 drivers/staging/media/imx/imx-media.h void imx_media_add_video_device(struct imx_media_dev *imxmd,
imxmd             217 drivers/staging/media/imx/imx-media.h int imx_media_pipeline_set_stream(struct imx_media_dev *imxmd,
imxmd             225 drivers/staging/media/imx/imx-media.h int imx_media_dev_notifier_register(struct imx_media_dev *imxmd,
imxmd             239 drivers/staging/media/imx/imx-media.h int imx_media_register_ipu_internal_subdevs(struct imx_media_dev *imxmd,
imxmd             241 drivers/staging/media/imx/imx-media.h void imx_media_unregister_ipu_internal_subdevs(struct imx_media_dev *imxmd);
imxmd             246 drivers/staging/media/imx/imx-media.h int imx_media_create_of_links(struct imx_media_dev *imxmd,
imxmd             248 drivers/staging/media/imx/imx-media.h int imx_media_create_csi_of_links(struct imx_media_dev *imxmd,
imxmd             250 drivers/staging/media/imx/imx-media.h int imx_media_of_add_csi(struct imx_media_dev *imxmd,
imxmd             159 drivers/staging/media/imx/imx7-media-csi.c 	struct imx_media_dev *imxmd;
imxmd            1194 drivers/staging/media/imx/imx7-media-csi.c 	struct imx_media_dev *imxmd;
imxmd            1231 drivers/staging/media/imx/imx7-media-csi.c 	imxmd = imx_media_dev_init(dev, NULL);
imxmd            1232 drivers/staging/media/imx/imx7-media-csi.c 	if (IS_ERR(imxmd)) {
imxmd            1233 drivers/staging/media/imx/imx7-media-csi.c 		ret = PTR_ERR(imxmd);
imxmd            1238 drivers/staging/media/imx/imx7-media-csi.c 	ret = imx_media_of_add_csi(imxmd, node);
imxmd            1242 drivers/staging/media/imx/imx7-media-csi.c 	ret = imx_media_dev_notifier_register(imxmd, NULL);
imxmd            1246 drivers/staging/media/imx/imx7-media-csi.c 	csi->imxmd = imxmd;
imxmd            1281 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_async_notifier_cleanup(&imxmd->notifier);
imxmd            1282 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_device_unregister(&imxmd->v4l2_dev);
imxmd            1283 drivers/staging/media/imx/imx7-media-csi.c 	media_device_unregister(&imxmd->md);
imxmd            1284 drivers/staging/media/imx/imx7-media-csi.c 	media_device_cleanup(&imxmd->md);
imxmd            1296 drivers/staging/media/imx/imx7-media-csi.c 	struct imx_media_dev *imxmd = csi->imxmd;
imxmd            1298 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_async_notifier_unregister(&imxmd->notifier);
imxmd            1299 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_async_notifier_cleanup(&imxmd->notifier);
imxmd            1301 drivers/staging/media/imx/imx7-media-csi.c 	media_device_unregister(&imxmd->md);
imxmd            1302 drivers/staging/media/imx/imx7-media-csi.c 	v4l2_device_unregister(&imxmd->v4l2_dev);
imxmd            1303 drivers/staging/media/imx/imx7-media-csi.c 	media_device_cleanup(&imxmd->md);