vin               594 drivers/media/i2c/video-i2c.c 				  struct v4l2_input *vin)
vin               596 drivers/media/i2c/video-i2c.c 	if (vin->index > 0)
vin               599 drivers/media/i2c/video-i2c.c 	strscpy(vin->name, "Camera", sizeof(vin->name));
vin               601 drivers/media/i2c/video-i2c.c 	vin->type = V4L2_INPUT_TYPE_CAMERA;
vin               398 drivers/media/pci/cx18/cx18-ioctl.c static int cx18_enumaudio(struct file *file, void *fh, struct v4l2_audio *vin)
vin               402 drivers/media/pci/cx18/cx18-ioctl.c 	return cx18_get_audio_input(cx, vin->index, vin);
vin               405 drivers/media/pci/cx18/cx18-ioctl.c static int cx18_g_audio(struct file *file, void *fh, struct v4l2_audio *vin)
vin               409 drivers/media/pci/cx18/cx18-ioctl.c 	vin->index = cx->audio_input;
vin               410 drivers/media/pci/cx18/cx18-ioctl.c 	return cx18_get_audio_input(cx, vin->index, vin);
vin               424 drivers/media/pci/cx18/cx18-ioctl.c static int cx18_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
vin               429 drivers/media/pci/cx18/cx18-ioctl.c 	return cx18_get_input(cx, vin->index, vin);
vin               745 drivers/media/pci/ivtv/ivtv-ioctl.c static int ivtv_enumaudio(struct file *file, void *fh, struct v4l2_audio *vin)
vin               749 drivers/media/pci/ivtv/ivtv-ioctl.c 	return ivtv_get_audio_input(itv, vin->index, vin);
vin               752 drivers/media/pci/ivtv/ivtv-ioctl.c static int ivtv_g_audio(struct file *file, void *fh, struct v4l2_audio *vin)
vin               756 drivers/media/pci/ivtv/ivtv-ioctl.c 	vin->index = itv->audio_input;
vin               757 drivers/media/pci/ivtv/ivtv-ioctl.c 	return ivtv_get_audio_input(itv, vin->index, vin);
vin               773 drivers/media/pci/ivtv/ivtv-ioctl.c static int ivtv_enumaudout(struct file *file, void *fh, struct v4l2_audioout *vin)
vin               778 drivers/media/pci/ivtv/ivtv-ioctl.c 	return ivtv_get_audio_output(itv, vin->index, vin);
vin               781 drivers/media/pci/ivtv/ivtv-ioctl.c static int ivtv_g_audout(struct file *file, void *fh, struct v4l2_audioout *vin)
vin               785 drivers/media/pci/ivtv/ivtv-ioctl.c 	vin->index = 0;
vin               786 drivers/media/pci/ivtv/ivtv-ioctl.c 	return ivtv_get_audio_output(itv, vin->index, vin);
vin               798 drivers/media/pci/ivtv/ivtv-ioctl.c static int ivtv_enum_input(struct file *file, void *fh, struct v4l2_input *vin)
vin               803 drivers/media/pci/ivtv/ivtv-ioctl.c 	return ivtv_get_input(itv, vin->index, vin);
vin                43 drivers/media/platform/rcar-vin/rcar-core.c #define rvin_group_id_to_master(vin) ((vin) < 4 ? 0 : 4)
vin                67 drivers/media/platform/rcar-vin/rcar-core.c static unsigned int rvin_group_get_mask(struct rvin_dev *vin,
vin                74 drivers/media/platform/rcar-vin/rcar-core.c 	for (route = vin->info->routes; route->mask; route++) {
vin                75 drivers/media/platform/rcar-vin/rcar-core.c 		if (route->vin == vin->id &&
vin                78 drivers/media/platform/rcar-vin/rcar-core.c 			vin_dbg(vin,
vin                80 drivers/media/platform/rcar-vin/rcar-core.c 				route->vin, route->csi, route->channel);
vin               122 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = NULL;
vin               147 drivers/media/platform/rcar-vin/rcar-core.c 	vin = container_of(vdev, struct rvin_dev, vdev);
vin               148 drivers/media/platform/rcar-vin/rcar-core.c 	master_id = rvin_group_id_to_master(vin->id);
vin               150 drivers/media/platform/rcar-vin/rcar-core.c 	if (WARN_ON(!group->vin[master_id])) {
vin               157 drivers/media/platform/rcar-vin/rcar-core.c 		if (!group->vin[i])
vin               162 drivers/media/platform/rcar-vin/rcar-core.c 				&group->vin[i]->vdev.entity.pads[0]);
vin               169 drivers/media/platform/rcar-vin/rcar-core.c 		mask &= rvin_group_get_mask(group->vin[i], csi_id, channel);
vin               188 drivers/media/platform/rcar-vin/rcar-core.c 			if (group->vin[i] && group->vin[i]->parallel &&
vin               189 drivers/media/platform/rcar-vin/rcar-core.c 			    group->vin[i]->parallel->subdev == sd) {
vin               190 drivers/media/platform/rcar-vin/rcar-core.c 				group->vin[i]->is_csi = false;
vin               196 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Subdevice %s not registered to any VIN\n",
vin               203 drivers/media/platform/rcar-vin/rcar-core.c 	mask_new = mask & rvin_group_get_mask(vin, csi_id, channel);
vin               204 drivers/media/platform/rcar-vin/rcar-core.c 	vin_dbg(vin, "Try link change mask: 0x%x new: 0x%x\n", mask, mask_new);
vin               212 drivers/media/platform/rcar-vin/rcar-core.c 	ret = rvin_set_channel_routing(group->vin[master_id], __ffs(mask_new));
vin               216 drivers/media/platform/rcar-vin/rcar-core.c 	vin->is_csi = true;
vin               251 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_group_init(struct rvin_group *group, struct rvin_dev *vin)
vin               262 drivers/media/platform/rcar-vin/rcar-core.c 	for_each_matching_node(np, vin->dev->driver->of_match_table)
vin               266 drivers/media/platform/rcar-vin/rcar-core.c 	vin_dbg(vin, "found %u enabled VIN's in DT", group->count);
vin               268 drivers/media/platform/rcar-vin/rcar-core.c 	mdev->dev = vin->dev;
vin               271 drivers/media/platform/rcar-vin/rcar-core.c 	match = of_match_node(vin->dev->driver->of_match_table,
vin               272 drivers/media/platform/rcar-vin/rcar-core.c 			      vin->dev->of_node);
vin               304 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_group_get(struct rvin_dev *vin)
vin               311 drivers/media/platform/rcar-vin/rcar-core.c 	ret = of_property_read_u32(vin->dev->of_node, "renesas,id", &id);
vin               313 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "%pOF: No renesas,id property found\n",
vin               314 drivers/media/platform/rcar-vin/rcar-core.c 			vin->dev->of_node);
vin               319 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "%pOF: Invalid renesas,id '%u'\n",
vin               320 drivers/media/platform/rcar-vin/rcar-core.c 			vin->dev->of_node, id);
vin               336 drivers/media/platform/rcar-vin/rcar-core.c 		ret = rvin_group_init(group, vin);
vin               339 drivers/media/platform/rcar-vin/rcar-core.c 			vin_err(vin, "Failed to initialize group\n");
vin               352 drivers/media/platform/rcar-vin/rcar-core.c 	if (group->vin[id]) {
vin               353 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Duplicate renesas,id property value %u\n", id);
vin               359 drivers/media/platform/rcar-vin/rcar-core.c 	group->vin[id] = vin;
vin               361 drivers/media/platform/rcar-vin/rcar-core.c 	vin->id = id;
vin               362 drivers/media/platform/rcar-vin/rcar-core.c 	vin->group = group;
vin               363 drivers/media/platform/rcar-vin/rcar-core.c 	vin->v4l2_dev.mdev = &group->mdev;
vin               373 drivers/media/platform/rcar-vin/rcar-core.c static void rvin_group_put(struct rvin_dev *vin)
vin               375 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_group *group = vin->group;
vin               379 drivers/media/platform/rcar-vin/rcar-core.c 	vin->group = NULL;
vin               380 drivers/media/platform/rcar-vin/rcar-core.c 	vin->v4l2_dev.mdev = NULL;
vin               382 drivers/media/platform/rcar-vin/rcar-core.c 	if (WARN_ON(group->vin[vin->id] != vin))
vin               385 drivers/media/platform/rcar-vin/rcar-core.c 	group->vin[vin->id] = NULL;
vin               398 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin =
vin               403 drivers/media/platform/rcar-vin/rcar-core.c 		rvin_set_alpha(vin, ctrl->val);
vin               437 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_parallel_subdevice_attach(struct rvin_dev *vin,
vin               449 drivers/media/platform/rcar-vin/rcar-core.c 	vin->parallel->source_pad = ret;
vin               452 drivers/media/platform/rcar-vin/rcar-core.c 	vin->parallel->sink_pad = ret < 0 ? 0 : ret;
vin               454 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->info->use_mc) {
vin               455 drivers/media/platform/rcar-vin/rcar-core.c 		vin->parallel->subdev = subdev;
vin               460 drivers/media/platform/rcar-vin/rcar-core.c 	vin->mbus_code = 0;
vin               462 drivers/media/platform/rcar-vin/rcar-core.c 	code.pad = vin->parallel->source_pad;
vin               463 drivers/media/platform/rcar-vin/rcar-core.c 	while (!vin->mbus_code &&
vin               472 drivers/media/platform/rcar-vin/rcar-core.c 			vin->mbus_code = code.code;
vin               473 drivers/media/platform/rcar-vin/rcar-core.c 			vin_dbg(vin, "Found media bus format for %s: %d\n",
vin               474 drivers/media/platform/rcar-vin/rcar-core.c 				subdev->name, vin->mbus_code);
vin               481 drivers/media/platform/rcar-vin/rcar-core.c 	if (!vin->mbus_code) {
vin               482 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Unsupported media bus format for %s\n",
vin               488 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_subdev_call(subdev, video, g_tvnorms, &vin->vdev.tvnorms);
vin               493 drivers/media/platform/rcar-vin/rcar-core.c 	vin->std = V4L2_STD_UNKNOWN;
vin               494 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_subdev_call(subdev, video, g_std, &vin->std);
vin               499 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_ctrl_handler_init(&vin->ctrl_handler, 16);
vin               503 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_ctrl_new_std(&vin->ctrl_handler, &rvin_ctrl_ops,
vin               506 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->ctrl_handler.error) {
vin               507 drivers/media/platform/rcar-vin/rcar-core.c 		ret = vin->ctrl_handler.error;
vin               508 drivers/media/platform/rcar-vin/rcar-core.c 		v4l2_ctrl_handler_free(&vin->ctrl_handler);
vin               512 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_ctrl_add_handler(&vin->ctrl_handler, subdev->ctrl_handler,
vin               515 drivers/media/platform/rcar-vin/rcar-core.c 		v4l2_ctrl_handler_free(&vin->ctrl_handler);
vin               519 drivers/media/platform/rcar-vin/rcar-core.c 	vin->vdev.ctrl_handler = &vin->ctrl_handler;
vin               521 drivers/media/platform/rcar-vin/rcar-core.c 	vin->parallel->subdev = subdev;
vin               526 drivers/media/platform/rcar-vin/rcar-core.c static void rvin_parallel_subdevice_detach(struct rvin_dev *vin)
vin               528 drivers/media/platform/rcar-vin/rcar-core.c 	rvin_v4l2_unregister(vin);
vin               529 drivers/media/platform/rcar-vin/rcar-core.c 	vin->parallel->subdev = NULL;
vin               531 drivers/media/platform/rcar-vin/rcar-core.c 	if (!vin->info->use_mc) {
vin               532 drivers/media/platform/rcar-vin/rcar-core.c 		v4l2_ctrl_handler_free(&vin->ctrl_handler);
vin               533 drivers/media/platform/rcar-vin/rcar-core.c 		vin->vdev.ctrl_handler = NULL;
vin               539 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev);
vin               544 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_device_register_subdev_nodes(&vin->v4l2_dev);
vin               546 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Failed to register subdev nodes\n");
vin               550 drivers/media/platform/rcar-vin/rcar-core.c 	if (!video_is_registered(&vin->vdev)) {
vin               551 drivers/media/platform/rcar-vin/rcar-core.c 		ret = rvin_v4l2_register(vin);
vin               556 drivers/media/platform/rcar-vin/rcar-core.c 	if (!vin->info->use_mc)
vin               560 drivers/media/platform/rcar-vin/rcar-core.c 	source = &vin->parallel->subdev->entity;
vin               561 drivers/media/platform/rcar-vin/rcar-core.c 	sink = &vin->vdev.entity;
vin               563 drivers/media/platform/rcar-vin/rcar-core.c 	ret = media_create_pad_link(source, vin->parallel->source_pad,
vin               564 drivers/media/platform/rcar-vin/rcar-core.c 				    sink, vin->parallel->sink_pad, 0);
vin               566 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Error adding link from %s to %s: %d\n",
vin               576 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev);
vin               578 drivers/media/platform/rcar-vin/rcar-core.c 	vin_dbg(vin, "unbind parallel subdev %s\n", subdev->name);
vin               580 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->lock);
vin               581 drivers/media/platform/rcar-vin/rcar-core.c 	rvin_parallel_subdevice_detach(vin);
vin               582 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->lock);
vin               589 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev);
vin               592 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->lock);
vin               593 drivers/media/platform/rcar-vin/rcar-core.c 	ret = rvin_parallel_subdevice_attach(vin, subdev);
vin               594 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->lock);
vin               598 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_set_subdev_hostdata(subdev, vin);
vin               600 drivers/media/platform/rcar-vin/rcar-core.c 	vin_dbg(vin, "bound subdev %s source pad: %u sink pad: %u\n",
vin               601 drivers/media/platform/rcar-vin/rcar-core.c 		subdev->name, vin->parallel->source_pad,
vin               602 drivers/media/platform/rcar-vin/rcar-core.c 		vin->parallel->sink_pad);
vin               617 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = dev_get_drvdata(dev);
vin               624 drivers/media/platform/rcar-vin/rcar-core.c 	vin->parallel = rvpe;
vin               625 drivers/media/platform/rcar-vin/rcar-core.c 	vin->parallel->mbus_type = vep->bus_type;
vin               627 drivers/media/platform/rcar-vin/rcar-core.c 	switch (vin->parallel->mbus_type) {
vin               629 drivers/media/platform/rcar-vin/rcar-core.c 		vin_dbg(vin, "Found PARALLEL media bus\n");
vin               630 drivers/media/platform/rcar-vin/rcar-core.c 		vin->parallel->mbus_flags = vep->bus.parallel.flags;
vin               633 drivers/media/platform/rcar-vin/rcar-core.c 		vin_dbg(vin, "Found BT656 media bus\n");
vin               634 drivers/media/platform/rcar-vin/rcar-core.c 		vin->parallel->mbus_flags = 0;
vin               637 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Unknown media bus type\n");
vin               644 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_parallel_init(struct rvin_dev *vin)
vin               648 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_async_notifier_init(&vin->notifier);
vin               651 drivers/media/platform/rcar-vin/rcar-core.c 		vin->dev, &vin->notifier, sizeof(struct rvin_parallel_entity),
vin               657 drivers/media/platform/rcar-vin/rcar-core.c 	if (!vin->parallel)
vin               658 drivers/media/platform/rcar-vin/rcar-core.c 		return vin->info->use_mc ? 0 : -ENODEV;
vin               660 drivers/media/platform/rcar-vin/rcar-core.c 	vin_dbg(vin, "Found parallel subdevice %pOF\n",
vin               661 drivers/media/platform/rcar-vin/rcar-core.c 		to_of_node(vin->parallel->asd.match.fwnode));
vin               663 drivers/media/platform/rcar-vin/rcar-core.c 	vin->notifier.ops = &rvin_parallel_notify_ops;
vin               664 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_async_notifier_register(&vin->v4l2_dev, &vin->notifier);
vin               666 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Notifier registration failed\n");
vin               667 drivers/media/platform/rcar-vin/rcar-core.c 		v4l2_async_notifier_cleanup(&vin->notifier);
vin               680 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev);
vin               685 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_device_register_subdev_nodes(&vin->v4l2_dev);
vin               687 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Failed to register subdev nodes\n");
vin               693 drivers/media/platform/rcar-vin/rcar-core.c 		if (vin->group->vin[i] &&
vin               694 drivers/media/platform/rcar-vin/rcar-core.c 		    !video_is_registered(&vin->group->vin[i]->vdev)) {
vin               695 drivers/media/platform/rcar-vin/rcar-core.c 			ret = rvin_v4l2_register(vin->group->vin[i]);
vin               702 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->group->lock);
vin               703 drivers/media/platform/rcar-vin/rcar-core.c 	for (route = vin->info->routes; route->mask; route++) {
vin               709 drivers/media/platform/rcar-vin/rcar-core.c 		if (!vin->group->vin[route->vin])
vin               713 drivers/media/platform/rcar-vin/rcar-core.c 		if (!vin->group->vin[rvin_group_id_to_master(route->vin)])
vin               717 drivers/media/platform/rcar-vin/rcar-core.c 		if (!vin->group->csi[route->csi].subdev)
vin               720 drivers/media/platform/rcar-vin/rcar-core.c 		source = &vin->group->csi[route->csi].subdev->entity;
vin               724 drivers/media/platform/rcar-vin/rcar-core.c 		sink = &vin->group->vin[route->vin]->vdev.entity;
vin               733 drivers/media/platform/rcar-vin/rcar-core.c 			vin_err(vin, "Error adding link from %s to %s\n",
vin               738 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->group->lock);
vin               747 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev);
vin               751 drivers/media/platform/rcar-vin/rcar-core.c 		if (vin->group->vin[i])
vin               752 drivers/media/platform/rcar-vin/rcar-core.c 			rvin_v4l2_unregister(vin->group->vin[i]);
vin               754 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->group->lock);
vin               757 drivers/media/platform/rcar-vin/rcar-core.c 		if (vin->group->csi[i].fwnode != asd->match.fwnode)
vin               759 drivers/media/platform/rcar-vin/rcar-core.c 		vin->group->csi[i].subdev = NULL;
vin               760 drivers/media/platform/rcar-vin/rcar-core.c 		vin_dbg(vin, "Unbind CSI-2 %s from slot %u\n", subdev->name, i);
vin               764 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->group->lock);
vin               771 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = v4l2_dev_to_vin(notifier->v4l2_dev);
vin               774 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->group->lock);
vin               777 drivers/media/platform/rcar-vin/rcar-core.c 		if (vin->group->csi[i].fwnode != asd->match.fwnode)
vin               779 drivers/media/platform/rcar-vin/rcar-core.c 		vin->group->csi[i].subdev = subdev;
vin               780 drivers/media/platform/rcar-vin/rcar-core.c 		vin_dbg(vin, "Bound CSI-2 %s to slot %u\n", subdev->name, i);
vin               784 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->group->lock);
vin               799 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = dev_get_drvdata(dev);
vin               806 drivers/media/platform/rcar-vin/rcar-core.c 		vin_dbg(vin, "OF device %pOF disabled, ignoring\n",
vin               811 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->group->lock);
vin               813 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->group->csi[vep->base.id].fwnode) {
vin               814 drivers/media/platform/rcar-vin/rcar-core.c 		vin_dbg(vin, "OF device %pOF already handled\n",
vin               820 drivers/media/platform/rcar-vin/rcar-core.c 	vin->group->csi[vep->base.id].fwnode = asd->match.fwnode;
vin               822 drivers/media/platform/rcar-vin/rcar-core.c 	vin_dbg(vin, "Add group OF device %pOF to slot %u\n",
vin               825 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->group->lock);
vin               830 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_mc_parse_of_graph(struct rvin_dev *vin)
vin               836 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_lock(&vin->group->lock);
vin               840 drivers/media/platform/rcar-vin/rcar-core.c 		if (vin->group->vin[i]) {
vin               846 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->group->count != count) {
vin               847 drivers/media/platform/rcar-vin/rcar-core.c 		mutex_unlock(&vin->group->lock);
vin               851 drivers/media/platform/rcar-vin/rcar-core.c 	mutex_unlock(&vin->group->lock);
vin               853 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_async_notifier_init(&vin->group->notifier);
vin               865 drivers/media/platform/rcar-vin/rcar-core.c 				vin->group->vin[i]->dev, &vin->group->notifier,
vin               872 drivers/media/platform/rcar-vin/rcar-core.c 	if (list_empty(&vin->group->notifier.asd_list))
vin               875 drivers/media/platform/rcar-vin/rcar-core.c 	vin->group->notifier.ops = &rvin_group_notify_ops;
vin               876 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_async_notifier_register(&vin->v4l2_dev,
vin               877 drivers/media/platform/rcar-vin/rcar-core.c 					   &vin->group->notifier);
vin               879 drivers/media/platform/rcar-vin/rcar-core.c 		vin_err(vin, "Notifier registration failed\n");
vin               880 drivers/media/platform/rcar-vin/rcar-core.c 		v4l2_async_notifier_cleanup(&vin->group->notifier);
vin               887 drivers/media/platform/rcar-vin/rcar-core.c static int rvin_mc_init(struct rvin_dev *vin)
vin               891 drivers/media/platform/rcar-vin/rcar-core.c 	vin->pad.flags = MEDIA_PAD_FL_SINK;
vin               892 drivers/media/platform/rcar-vin/rcar-core.c 	ret = media_entity_pads_init(&vin->vdev.entity, 1, &vin->pad);
vin               896 drivers/media/platform/rcar-vin/rcar-core.c 	ret = rvin_group_get(vin);
vin               900 drivers/media/platform/rcar-vin/rcar-core.c 	ret = rvin_mc_parse_of_graph(vin);
vin               902 drivers/media/platform/rcar-vin/rcar-core.c 		rvin_group_put(vin);
vin               904 drivers/media/platform/rcar-vin/rcar-core.c 	ret = v4l2_ctrl_handler_init(&vin->ctrl_handler, 1);
vin               908 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_ctrl_new_std(&vin->ctrl_handler, &rvin_ctrl_ops,
vin               911 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->ctrl_handler.error) {
vin               912 drivers/media/platform/rcar-vin/rcar-core.c 		ret = vin->ctrl_handler.error;
vin               913 drivers/media/platform/rcar-vin/rcar-core.c 		v4l2_ctrl_handler_free(&vin->ctrl_handler);
vin               917 drivers/media/platform/rcar-vin/rcar-core.c 	vin->vdev.ctrl_handler = &vin->ctrl_handler;
vin               948 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) },
vin               949 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) },
vin               950 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) },
vin               951 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) },
vin               952 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) },
vin               953 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) },
vin               954 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) },
vin               955 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 2, .mask = BIT(0) },
vin               956 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) },
vin               957 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) },
vin               958 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) },
vin               959 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) },
vin               960 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) },
vin               961 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) | BIT(2) },
vin               962 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) },
vin               963 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) },
vin               964 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) },
vin               965 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) },
vin               966 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 4, .mask = BIT(2) },
vin               967 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) },
vin               968 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) },
vin               969 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) },
vin               970 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) },
vin               971 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 6, .mask = BIT(0) },
vin               972 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) },
vin               973 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) },
vin               974 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) },
vin               975 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) },
vin               976 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) },
vin               977 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) | BIT(2) },
vin               978 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) },
vin               979 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) },
vin               992 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) },
vin               993 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) },
vin               994 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 0, .vin = 0, .mask = BIT(2) | BIT(5) },
vin               995 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) },
vin               996 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 0, .vin = 1, .mask = BIT(1) },
vin               997 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) },
vin               998 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(3) },
vin               999 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) },
vin              1000 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 1, .vin = 1, .mask = BIT(5) },
vin              1001 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 0, .vin = 2, .mask = BIT(0) },
vin              1002 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) },
vin              1003 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) },
vin              1004 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) },
vin              1005 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) },
vin              1006 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 2, .vin = 2, .mask = BIT(5) },
vin              1007 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) },
vin              1008 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) },
vin              1009 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 1, .vin = 3, .mask = BIT(2) },
vin              1010 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) },
vin              1011 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) },
vin              1012 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 3, .vin = 3, .mask = BIT(5) },
vin              1013 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) },
vin              1014 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) },
vin              1015 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 0, .vin = 4, .mask = BIT(2) | BIT(5) },
vin              1016 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) },
vin              1017 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 0, .vin = 5, .mask = BIT(1) },
vin              1018 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) },
vin              1019 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(3) },
vin              1020 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) },
vin              1021 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 1, .vin = 5, .mask = BIT(5) },
vin              1022 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 0, .vin = 6, .mask = BIT(0) },
vin              1023 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) },
vin              1024 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) },
vin              1025 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) },
vin              1026 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) },
vin              1027 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 2, .vin = 6, .mask = BIT(5) },
vin              1028 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) },
vin              1029 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) },
vin              1030 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 1, .vin = 7, .mask = BIT(2) },
vin              1031 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) },
vin              1032 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) },
vin              1033 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI21, .channel = 3, .vin = 7, .mask = BIT(5) },
vin              1046 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) },
vin              1047 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) },
vin              1048 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) },
vin              1049 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) },
vin              1050 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(3) },
vin              1051 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) },
vin              1052 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) },
vin              1053 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) },
vin              1054 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) },
vin              1055 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) },
vin              1056 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) },
vin              1057 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) },
vin              1058 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) },
vin              1059 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) },
vin              1060 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) },
vin              1061 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) },
vin              1062 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) },
vin              1063 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 5, .mask = BIT(2) },
vin              1064 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 5, .mask = BIT(3) },
vin              1065 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) },
vin              1066 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 6, .mask = BIT(1) },
vin              1067 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) },
vin              1068 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 6, .mask = BIT(3) },
vin              1069 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) },
vin              1070 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 7, .mask = BIT(0) },
vin              1071 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) },
vin              1072 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 7, .mask = BIT(3) },
vin              1073 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) },
vin              1086 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) },
vin              1087 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) },
vin              1088 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) },
vin              1089 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) },
vin              1090 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) },
vin              1091 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) },
vin              1092 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) },
vin              1093 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 2, .mask = BIT(0) },
vin              1094 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) },
vin              1095 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) },
vin              1096 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) },
vin              1097 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) },
vin              1098 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) },
vin              1099 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) | BIT(2) },
vin              1100 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) },
vin              1101 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) },
vin              1102 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) },
vin              1103 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) },
vin              1104 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 4, .mask = BIT(2) },
vin              1105 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) },
vin              1106 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) },
vin              1107 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 5, .mask = BIT(2) },
vin              1108 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) },
vin              1109 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 6, .mask = BIT(0) },
vin              1110 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 6, .mask = BIT(1) },
vin              1111 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) },
vin              1112 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 6, .mask = BIT(3) },
vin              1113 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) },
vin              1114 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 7, .mask = BIT(0) },
vin              1115 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) | BIT(2) },
vin              1116 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 7, .mask = BIT(3) },
vin              1117 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) },
vin              1130 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) },
vin              1131 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) },
vin              1132 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(3) },
vin              1133 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) },
vin              1134 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) },
vin              1135 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) },
vin              1136 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) },
vin              1149 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) },
vin              1150 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) },
vin              1151 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) },
vin              1152 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) },
vin              1153 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) },
vin              1154 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) },
vin              1155 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) },
vin              1156 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) },
vin              1157 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) },
vin              1158 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 4, .mask = BIT(2) },
vin              1159 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) },
vin              1160 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) },
vin              1161 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) },
vin              1162 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) },
vin              1163 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) },
vin              1164 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) },
vin              1177 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) },
vin              1178 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 0, .vin = 5, .mask = BIT(2) },
vin              1179 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 4, .mask = BIT(2) },
vin              1180 drivers/media/platform/rcar-vin/rcar-core.c 	{ .csi = RVIN_CSI40, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) },
vin              1284 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin;
vin              1288 drivers/media/platform/rcar-vin/rcar-core.c 	vin = devm_kzalloc(&pdev->dev, sizeof(*vin), GFP_KERNEL);
vin              1289 drivers/media/platform/rcar-vin/rcar-core.c 	if (!vin)
vin              1292 drivers/media/platform/rcar-vin/rcar-core.c 	vin->dev = &pdev->dev;
vin              1293 drivers/media/platform/rcar-vin/rcar-core.c 	vin->info = of_device_get_match_data(&pdev->dev);
vin              1294 drivers/media/platform/rcar-vin/rcar-core.c 	vin->alpha = 0xff;
vin              1302 drivers/media/platform/rcar-vin/rcar-core.c 		vin->info = attr->data;
vin              1308 drivers/media/platform/rcar-vin/rcar-core.c 	vin->base = devm_ioremap_resource(vin->dev, mem);
vin              1309 drivers/media/platform/rcar-vin/rcar-core.c 	if (IS_ERR(vin->base))
vin              1310 drivers/media/platform/rcar-vin/rcar-core.c 		return PTR_ERR(vin->base);
vin              1316 drivers/media/platform/rcar-vin/rcar-core.c 	ret = rvin_dma_register(vin, irq);
vin              1320 drivers/media/platform/rcar-vin/rcar-core.c 	platform_set_drvdata(pdev, vin);
vin              1322 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->info->use_mc) {
vin              1323 drivers/media/platform/rcar-vin/rcar-core.c 		ret = rvin_mc_init(vin);
vin              1328 drivers/media/platform/rcar-vin/rcar-core.c 	ret = rvin_parallel_init(vin);
vin              1338 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_ctrl_handler_free(&vin->ctrl_handler);
vin              1340 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->info->use_mc) {
vin              1341 drivers/media/platform/rcar-vin/rcar-core.c 		mutex_lock(&vin->group->lock);
vin              1342 drivers/media/platform/rcar-vin/rcar-core.c 		if (&vin->v4l2_dev == vin->group->notifier.v4l2_dev) {
vin              1343 drivers/media/platform/rcar-vin/rcar-core.c 			v4l2_async_notifier_unregister(&vin->group->notifier);
vin              1344 drivers/media/platform/rcar-vin/rcar-core.c 			v4l2_async_notifier_cleanup(&vin->group->notifier);
vin              1346 drivers/media/platform/rcar-vin/rcar-core.c 		mutex_unlock(&vin->group->lock);
vin              1347 drivers/media/platform/rcar-vin/rcar-core.c 		rvin_group_put(vin);
vin              1351 drivers/media/platform/rcar-vin/rcar-core.c 	rvin_dma_unregister(vin);
vin              1358 drivers/media/platform/rcar-vin/rcar-core.c 	struct rvin_dev *vin = platform_get_drvdata(pdev);
vin              1362 drivers/media/platform/rcar-vin/rcar-core.c 	rvin_v4l2_unregister(vin);
vin              1364 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_async_notifier_unregister(&vin->notifier);
vin              1365 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_async_notifier_cleanup(&vin->notifier);
vin              1367 drivers/media/platform/rcar-vin/rcar-core.c 	if (vin->info->use_mc) {
vin              1368 drivers/media/platform/rcar-vin/rcar-core.c 		mutex_lock(&vin->group->lock);
vin              1369 drivers/media/platform/rcar-vin/rcar-core.c 		if (&vin->v4l2_dev == vin->group->notifier.v4l2_dev) {
vin              1370 drivers/media/platform/rcar-vin/rcar-core.c 			v4l2_async_notifier_unregister(&vin->group->notifier);
vin              1371 drivers/media/platform/rcar-vin/rcar-core.c 			v4l2_async_notifier_cleanup(&vin->group->notifier);
vin              1373 drivers/media/platform/rcar-vin/rcar-core.c 		mutex_unlock(&vin->group->lock);
vin              1374 drivers/media/platform/rcar-vin/rcar-core.c 		rvin_group_put(vin);
vin              1377 drivers/media/platform/rcar-vin/rcar-core.c 	v4l2_ctrl_handler_free(&vin->ctrl_handler);
vin              1379 drivers/media/platform/rcar-vin/rcar-core.c 	rvin_dma_unregister(vin);
vin               144 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_write(struct rvin_dev *vin, u32 value, u32 offset)
vin               146 drivers/media/platform/rcar-vin/rcar-dma.c 	iowrite32(value, vin->base + offset);
vin               149 drivers/media/platform/rcar-vin/rcar-dma.c static u32 rvin_read(struct rvin_dev *vin, u32 offset)
vin               151 drivers/media/platform/rcar-vin/rcar-dma.c 	return ioread32(vin->base + offset);
vin               476 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_set_coeff(struct rvin_dev *vin, unsigned short xs)
vin               497 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[0], VNC1A_REG);
vin               498 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[1], VNC1B_REG);
vin               499 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[2], VNC1C_REG);
vin               501 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[3], VNC2A_REG);
vin               502 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[4], VNC2B_REG);
vin               503 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[5], VNC2C_REG);
vin               505 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[6], VNC3A_REG);
vin               506 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[7], VNC3B_REG);
vin               507 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[8], VNC3C_REG);
vin               509 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[9], VNC4A_REG);
vin               510 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[10], VNC4B_REG);
vin               511 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[11], VNC4C_REG);
vin               513 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[12], VNC5A_REG);
vin               514 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[13], VNC5B_REG);
vin               515 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[14], VNC5C_REG);
vin               517 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[15], VNC6A_REG);
vin               518 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[16], VNC6B_REG);
vin               519 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[17], VNC6C_REG);
vin               521 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[18], VNC7A_REG);
vin               522 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[19], VNC7B_REG);
vin               523 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[20], VNC7C_REG);
vin               525 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[21], VNC8A_REG);
vin               526 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[22], VNC8B_REG);
vin               527 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, p_set->coeff_set[23], VNC8C_REG);
vin               530 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_crop_scale_comp_gen2(struct rvin_dev *vin)
vin               536 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->crop.height != vin->compose.height)
vin               537 drivers/media/platform/rcar-vin/rcar-dma.c 		ys = (4096 * vin->crop.height) / vin->compose.height;
vin               538 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, ys, VNYS_REG);
vin               541 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->crop.width != vin->compose.width)
vin               542 drivers/media/platform/rcar-vin/rcar-dma.c 		xs = (4096 * vin->crop.width) / vin->compose.width;
vin               548 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, xs, VNXS_REG);
vin               554 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_set_coeff(vin, xs);
vin               557 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, 0, VNSPPOC_REG);
vin               558 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, 0, VNSLPOC_REG);
vin               559 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, vin->format.width - 1, VNEPPOC_REG);
vin               560 drivers/media/platform/rcar-vin/rcar-dma.c 	switch (vin->format.field) {
vin               564 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin, vin->format.height / 2 - 1, VNELPOC_REG);
vin               567 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin, vin->format.height - 1, VNELPOC_REG);
vin               571 drivers/media/platform/rcar-vin/rcar-dma.c 	vin_dbg(vin,
vin               573 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->crop.width, vin->crop.height, vin->crop.left,
vin               574 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->crop.top, ys, xs, vin->format.width, vin->format.height,
vin               578 drivers/media/platform/rcar-vin/rcar-dma.c void rvin_crop_scale_comp(struct rvin_dev *vin)
vin               584 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, vin->crop.left, VNSPPRC_REG);
vin               585 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, vin->crop.left + vin->crop.width - 1, VNEPPRC_REG);
vin               587 drivers/media/platform/rcar-vin/rcar-dma.c 	switch (vin->format.field) {
vin               591 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin, vin->crop.top / 2, VNSLPRC_REG);
vin               592 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin, (vin->crop.top + vin->crop.height) / 2 - 1,
vin               596 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin, vin->crop.top, VNSLPRC_REG);
vin               597 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin, vin->crop.top + vin->crop.height - 1,
vin               603 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->info->model != RCAR_GEN3)
vin               604 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_crop_scale_comp_gen2(vin);
vin               606 drivers/media/platform/rcar-vin/rcar-dma.c 	fmt = rvin_format_from_pixel(vin, vin->format.pixelformat);
vin               607 drivers/media/platform/rcar-vin/rcar-dma.c 	stride = vin->format.bytesperline / fmt->bpp;
vin               608 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, stride, VNIS_REG);
vin               615 drivers/media/platform/rcar-vin/rcar-dma.c static int rvin_setup(struct rvin_dev *vin)
vin               620 drivers/media/platform/rcar-vin/rcar-dma.c 	switch (vin->format.field) {
vin               631 drivers/media/platform/rcar-vin/rcar-dma.c 		if (!vin->info->use_mc && vin->std & V4L2_STD_525_60)
vin               652 drivers/media/platform/rcar-vin/rcar-dma.c 	switch (vin->mbus_code) {
vin               664 drivers/media/platform/rcar-vin/rcar-dma.c 		if (!vin->is_csi &&
vin               665 drivers/media/platform/rcar-vin/rcar-dma.c 		    vin->parallel->mbus_type == V4L2_MBUS_BT656)
vin               677 drivers/media/platform/rcar-vin/rcar-dma.c 		if (!vin->is_csi &&
vin               678 drivers/media/platform/rcar-vin/rcar-dma.c 		    vin->parallel->mbus_type == V4L2_MBUS_BT656)
vin               690 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->info->model == RCAR_GEN3)
vin               695 drivers/media/platform/rcar-vin/rcar-dma.c 	if (!vin->is_csi) {
vin               697 drivers/media/platform/rcar-vin/rcar-dma.c 		if (!(vin->parallel->mbus_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW))
vin               701 drivers/media/platform/rcar-vin/rcar-dma.c 		if (!(vin->parallel->mbus_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW))
vin               705 drivers/media/platform/rcar-vin/rcar-dma.c 		if (vin->parallel->mbus_flags & V4L2_MBUS_DATA_ENABLE_LOW)
vin               712 drivers/media/platform/rcar-vin/rcar-dma.c 	switch (vin->format.pixelformat) {
vin               714 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_write(vin,
vin               715 drivers/media/platform/rcar-vin/rcar-dma.c 			   ALIGN(vin->format.width * vin->format.height, 0x80),
vin               739 drivers/media/platform/rcar-vin/rcar-dma.c 		dmr = (vin->alpha ? VNDMR_ABIT : 0) | VNDMR_DTMD_ARGB;
vin               742 drivers/media/platform/rcar-vin/rcar-dma.c 		dmr = VNDMR_A8BIT(vin->alpha) | VNDMR_EXRGB | VNDMR_DTMD_ARGB;
vin               745 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_err(vin, "Invalid pixelformat (0x%x)\n",
vin               746 drivers/media/platform/rcar-vin/rcar-dma.c 			vin->format.pixelformat);
vin               757 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->info->model == RCAR_GEN3) {
vin               759 drivers/media/platform/rcar-vin/rcar-dma.c 		if (vin->is_csi)
vin               769 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, interrupts, VNINTS_REG);
vin               771 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, interrupts, VNIE_REG);
vin               773 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, dmr, VNDMR_REG);
vin               774 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, dmr2, VNDMR2_REG);
vin               777 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, vnmc | VNMC_ME, VNMC_REG);
vin               782 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_disable_interrupts(struct rvin_dev *vin)
vin               784 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, 0, VNIE_REG);
vin               787 drivers/media/platform/rcar-vin/rcar-dma.c static u32 rvin_get_interrupt_status(struct rvin_dev *vin)
vin               789 drivers/media/platform/rcar-vin/rcar-dma.c 	return rvin_read(vin, VNINTS_REG);
vin               792 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_ack_interrupt(struct rvin_dev *vin)
vin               794 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, rvin_read(vin, VNINTS_REG), VNINTS_REG);
vin               797 drivers/media/platform/rcar-vin/rcar-dma.c static bool rvin_capture_active(struct rvin_dev *vin)
vin               799 drivers/media/platform/rcar-vin/rcar-dma.c 	return rvin_read(vin, VNMS_REG) & VNMS_CA;
vin               802 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_set_slot_addr(struct rvin_dev *vin, int slot, dma_addr_t addr)
vin               808 drivers/media/platform/rcar-vin/rcar-dma.c 	fmt = rvin_format_from_pixel(vin, vin->format.pixelformat);
vin               814 drivers/media/platform/rcar-vin/rcar-dma.c 	offsetx = vin->compose.left * fmt->bpp;
vin               815 drivers/media/platform/rcar-vin/rcar-dma.c 	offsety = vin->compose.top * vin->format.bytesperline;
vin               825 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, offset, VNMB_REG(slot));
vin               834 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_fill_hw_slot(struct rvin_dev *vin, int slot)
vin               841 drivers/media/platform/rcar-vin/rcar-dma.c 	if (WARN_ON(vin->queue_buf[slot] != NULL))
vin               844 drivers/media/platform/rcar-vin/rcar-dma.c 	vin_dbg(vin, "Filling HW slot: %d\n", slot);
vin               846 drivers/media/platform/rcar-vin/rcar-dma.c 	if (list_empty(&vin->buf_list)) {
vin               847 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[slot] = NULL;
vin               848 drivers/media/platform/rcar-vin/rcar-dma.c 		phys_addr = vin->scratch_phys;
vin               851 drivers/media/platform/rcar-vin/rcar-dma.c 		buf = list_entry(vin->buf_list.next, struct rvin_buffer, list);
vin               854 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[slot] = vbuf;
vin               860 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_set_slot_addr(vin, slot, phys_addr);
vin               863 drivers/media/platform/rcar-vin/rcar-dma.c static int rvin_capture_start(struct rvin_dev *vin)
vin               868 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_fill_hw_slot(vin, slot);
vin               870 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_crop_scale_comp(vin);
vin               872 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = rvin_setup(vin);
vin               876 drivers/media/platform/rcar-vin/rcar-dma.c 	vin_dbg(vin, "Starting to capture\n");
vin               879 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, VNFC_C_FRAME, VNFC_REG);
vin               881 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->state = STARTING;
vin               886 drivers/media/platform/rcar-vin/rcar-dma.c static void rvin_capture_stop(struct rvin_dev *vin)
vin               889 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, 0, VNFC_REG);
vin               892 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, rvin_read(vin, VNMC_REG) & ~VNMC_ME, VNMC_REG);
vin               904 drivers/media/platform/rcar-vin/rcar-dma.c 	struct rvin_dev *vin = data;
vin               910 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_lock_irqsave(&vin->qlock, flags);
vin               912 drivers/media/platform/rcar-vin/rcar-dma.c 	int_status = rvin_get_interrupt_status(vin);
vin               916 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_ack_interrupt(vin);
vin               920 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->state == STOPPED) {
vin               921 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_dbg(vin, "IRQ while state stopped\n");
vin               926 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->state == STOPPING) {
vin               927 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_dbg(vin, "IRQ while state stopping\n");
vin               932 drivers/media/platform/rcar-vin/rcar-dma.c 	vnms = rvin_read(vin, VNMS_REG);
vin               939 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->state == STARTING) {
vin               941 drivers/media/platform/rcar-vin/rcar-dma.c 			vin_dbg(vin, "Starting sync slot: %d\n", slot);
vin               945 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_dbg(vin, "Capture start synced!\n");
vin               946 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->state = RUNNING;
vin               950 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->queue_buf[slot]) {
vin               951 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[slot]->field = vin->format.field;
vin               952 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[slot]->sequence = vin->sequence;
vin               953 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[slot]->vb2_buf.timestamp = ktime_get_ns();
vin               954 drivers/media/platform/rcar-vin/rcar-dma.c 		vb2_buffer_done(&vin->queue_buf[slot]->vb2_buf,
vin               956 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[slot] = NULL;
vin               959 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_dbg(vin, "Dropping frame %u\n", vin->sequence);
vin               962 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->sequence++;
vin               965 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_fill_hw_slot(vin, slot);
vin               967 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_unlock_irqrestore(&vin->qlock, flags);
vin               973 drivers/media/platform/rcar-vin/rcar-dma.c static void return_all_buffers(struct rvin_dev *vin,
vin               980 drivers/media/platform/rcar-vin/rcar-dma.c 		if (vin->queue_buf[i]) {
vin               981 drivers/media/platform/rcar-vin/rcar-dma.c 			vb2_buffer_done(&vin->queue_buf[i]->vb2_buf,
vin               983 drivers/media/platform/rcar-vin/rcar-dma.c 			vin->queue_buf[i] = NULL;
vin               987 drivers/media/platform/rcar-vin/rcar-dma.c 	list_for_each_entry_safe(buf, node, &vin->buf_list, list) {
vin               998 drivers/media/platform/rcar-vin/rcar-dma.c 	struct rvin_dev *vin = vb2_get_drv_priv(vq);
vin              1002 drivers/media/platform/rcar-vin/rcar-dma.c 		return sizes[0] < vin->format.sizeimage ? -EINVAL : 0;
vin              1005 drivers/media/platform/rcar-vin/rcar-dma.c 	sizes[0] = vin->format.sizeimage;
vin              1012 drivers/media/platform/rcar-vin/rcar-dma.c 	struct rvin_dev *vin = vb2_get_drv_priv(vb->vb2_queue);
vin              1013 drivers/media/platform/rcar-vin/rcar-dma.c 	unsigned long size = vin->format.sizeimage;
vin              1016 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_err(vin, "buffer too small (%lu < %lu)\n",
vin              1029 drivers/media/platform/rcar-vin/rcar-dma.c 	struct rvin_dev *vin = vb2_get_drv_priv(vb->vb2_queue);
vin              1032 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_lock_irqsave(&vin->qlock, flags);
vin              1034 drivers/media/platform/rcar-vin/rcar-dma.c 	list_add_tail(to_buf_list(vbuf), &vin->buf_list);
vin              1036 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_unlock_irqrestore(&vin->qlock, flags);
vin              1039 drivers/media/platform/rcar-vin/rcar-dma.c static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
vin              1056 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->mbus_code = fmt.format.code;
vin              1074 drivers/media/platform/rcar-vin/rcar-dma.c 		switch (vin->format.field) {
vin              1095 drivers/media/platform/rcar-vin/rcar-dma.c 	if (fmt.format.width != vin->format.width ||
vin              1096 drivers/media/platform/rcar-vin/rcar-dma.c 	    fmt.format.height != vin->format.height ||
vin              1097 drivers/media/platform/rcar-vin/rcar-dma.c 	    fmt.format.code != vin->mbus_code)
vin              1103 drivers/media/platform/rcar-vin/rcar-dma.c static int rvin_set_stream(struct rvin_dev *vin, int on)
vin              1112 drivers/media/platform/rcar-vin/rcar-dma.c 	if (!vin->info->use_mc) {
vin              1113 drivers/media/platform/rcar-vin/rcar-dma.c 		ret = v4l2_subdev_call(vin->parallel->subdev, video, s_stream,
vin              1119 drivers/media/platform/rcar-vin/rcar-dma.c 	pad = media_entity_remote_pad(&vin->pad);
vin              1126 drivers/media/platform/rcar-vin/rcar-dma.c 		media_pipeline_stop(&vin->vdev.entity);
vin              1130 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = rvin_mc_validate_format(vin, sd, pad);
vin              1140 drivers/media/platform/rcar-vin/rcar-dma.c 	mdev = vin->vdev.entity.graph_obj.mdev;
vin              1142 drivers/media/platform/rcar-vin/rcar-dma.c 	pipe = sd->entity.pipe ? sd->entity.pipe : &vin->vdev.pipe;
vin              1143 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = __media_pipeline_start(&vin->vdev.entity, pipe);
vin              1152 drivers/media/platform/rcar-vin/rcar-dma.c 		media_pipeline_stop(&vin->vdev.entity);
vin              1159 drivers/media/platform/rcar-vin/rcar-dma.c 	struct rvin_dev *vin = vb2_get_drv_priv(vq);
vin              1164 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->scratch = dma_alloc_coherent(vin->dev, vin->format.sizeimage,
vin              1165 drivers/media/platform/rcar-vin/rcar-dma.c 					  &vin->scratch_phys, GFP_KERNEL);
vin              1166 drivers/media/platform/rcar-vin/rcar-dma.c 	if (!vin->scratch) {
vin              1167 drivers/media/platform/rcar-vin/rcar-dma.c 		spin_lock_irqsave(&vin->qlock, flags);
vin              1168 drivers/media/platform/rcar-vin/rcar-dma.c 		return_all_buffers(vin, VB2_BUF_STATE_QUEUED);
vin              1169 drivers/media/platform/rcar-vin/rcar-dma.c 		spin_unlock_irqrestore(&vin->qlock, flags);
vin              1170 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_err(vin, "Failed to allocate scratch buffer\n");
vin              1174 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = rvin_set_stream(vin, 1);
vin              1176 drivers/media/platform/rcar-vin/rcar-dma.c 		spin_lock_irqsave(&vin->qlock, flags);
vin              1177 drivers/media/platform/rcar-vin/rcar-dma.c 		return_all_buffers(vin, VB2_BUF_STATE_QUEUED);
vin              1178 drivers/media/platform/rcar-vin/rcar-dma.c 		spin_unlock_irqrestore(&vin->qlock, flags);
vin              1182 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_lock_irqsave(&vin->qlock, flags);
vin              1184 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->sequence = 0;
vin              1186 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = rvin_capture_start(vin);
vin              1188 drivers/media/platform/rcar-vin/rcar-dma.c 		return_all_buffers(vin, VB2_BUF_STATE_QUEUED);
vin              1189 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_set_stream(vin, 0);
vin              1192 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_unlock_irqrestore(&vin->qlock, flags);
vin              1195 drivers/media/platform/rcar-vin/rcar-dma.c 		dma_free_coherent(vin->dev, vin->format.sizeimage, vin->scratch,
vin              1196 drivers/media/platform/rcar-vin/rcar-dma.c 				  vin->scratch_phys);
vin              1203 drivers/media/platform/rcar-vin/rcar-dma.c 	struct rvin_dev *vin = vb2_get_drv_priv(vq);
vin              1207 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_lock_irqsave(&vin->qlock, flags);
vin              1209 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->state = STOPPING;
vin              1214 drivers/media/platform/rcar-vin/rcar-dma.c 		rvin_capture_stop(vin);
vin              1217 drivers/media/platform/rcar-vin/rcar-dma.c 		if (!rvin_capture_active(vin)) {
vin              1218 drivers/media/platform/rcar-vin/rcar-dma.c 			vin->state = STOPPED;
vin              1222 drivers/media/platform/rcar-vin/rcar-dma.c 		spin_unlock_irqrestore(&vin->qlock, flags);
vin              1224 drivers/media/platform/rcar-vin/rcar-dma.c 		spin_lock_irqsave(&vin->qlock, flags);
vin              1227 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->state != STOPPED) {
vin              1233 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_err(vin, "Failed stop HW, something is seriously broken\n");
vin              1234 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->state = STOPPED;
vin              1238 drivers/media/platform/rcar-vin/rcar-dma.c 	return_all_buffers(vin, VB2_BUF_STATE_ERROR);
vin              1240 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_unlock_irqrestore(&vin->qlock, flags);
vin              1242 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_set_stream(vin, 0);
vin              1245 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_disable_interrupts(vin);
vin              1248 drivers/media/platform/rcar-vin/rcar-dma.c 	dma_free_coherent(vin->dev, vin->format.sizeimage, vin->scratch,
vin              1249 drivers/media/platform/rcar-vin/rcar-dma.c 			  vin->scratch_phys);
vin              1262 drivers/media/platform/rcar-vin/rcar-dma.c void rvin_dma_unregister(struct rvin_dev *vin)
vin              1264 drivers/media/platform/rcar-vin/rcar-dma.c 	mutex_destroy(&vin->lock);
vin              1266 drivers/media/platform/rcar-vin/rcar-dma.c 	v4l2_device_unregister(&vin->v4l2_dev);
vin              1269 drivers/media/platform/rcar-vin/rcar-dma.c int rvin_dma_register(struct rvin_dev *vin, int irq)
vin              1271 drivers/media/platform/rcar-vin/rcar-dma.c 	struct vb2_queue *q = &vin->queue;
vin              1275 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = v4l2_device_register(vin->dev, &vin->v4l2_dev);
vin              1279 drivers/media/platform/rcar-vin/rcar-dma.c 	mutex_init(&vin->lock);
vin              1280 drivers/media/platform/rcar-vin/rcar-dma.c 	INIT_LIST_HEAD(&vin->buf_list);
vin              1282 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_lock_init(&vin->qlock);
vin              1284 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->state = STOPPED;
vin              1287 drivers/media/platform/rcar-vin/rcar-dma.c 		vin->queue_buf[i] = NULL;
vin              1292 drivers/media/platform/rcar-vin/rcar-dma.c 	q->lock = &vin->lock;
vin              1293 drivers/media/platform/rcar-vin/rcar-dma.c 	q->drv_priv = vin;
vin              1299 drivers/media/platform/rcar-vin/rcar-dma.c 	q->dev = vin->dev;
vin              1303 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_err(vin, "failed to initialize VB2 queue\n");
vin              1308 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = devm_request_irq(vin->dev, irq, rvin_irq, IRQF_SHARED,
vin              1309 drivers/media/platform/rcar-vin/rcar-dma.c 			       KBUILD_MODNAME, vin);
vin              1311 drivers/media/platform/rcar-vin/rcar-dma.c 		vin_err(vin, "failed to request irq\n");
vin              1317 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_dma_unregister(vin);
vin              1331 drivers/media/platform/rcar-vin/rcar-dma.c int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel)
vin              1336 drivers/media/platform/rcar-vin/rcar-dma.c 	ret = pm_runtime_get_sync(vin->dev);
vin              1341 drivers/media/platform/rcar-vin/rcar-dma.c 	vnmc = rvin_read(vin, VNMC_REG);
vin              1342 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, vnmc & ~VNMC_VUP, VNMC_REG);
vin              1346 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, ifmd, VNCSI_IFMD_REG);
vin              1348 drivers/media/platform/rcar-vin/rcar-dma.c 	vin_dbg(vin, "Set IFMD 0x%x\n", ifmd);
vin              1351 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, vnmc, VNMC_REG);
vin              1353 drivers/media/platform/rcar-vin/rcar-dma.c 	pm_runtime_put(vin->dev);
vin              1358 drivers/media/platform/rcar-vin/rcar-dma.c void rvin_set_alpha(struct rvin_dev *vin, unsigned int alpha)
vin              1363 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_lock_irqsave(&vin->qlock, flags);
vin              1365 drivers/media/platform/rcar-vin/rcar-dma.c 	vin->alpha = alpha;
vin              1367 drivers/media/platform/rcar-vin/rcar-dma.c 	if (vin->state == STOPPED)
vin              1370 drivers/media/platform/rcar-vin/rcar-dma.c 	switch (vin->format.pixelformat) {
vin              1372 drivers/media/platform/rcar-vin/rcar-dma.c 		dmr = rvin_read(vin, VNDMR_REG) & ~VNDMR_ABIT;
vin              1373 drivers/media/platform/rcar-vin/rcar-dma.c 		if (vin->alpha)
vin              1377 drivers/media/platform/rcar-vin/rcar-dma.c 		dmr = rvin_read(vin, VNDMR_REG) & ~VNDMR_A8BIT_MASK;
vin              1378 drivers/media/platform/rcar-vin/rcar-dma.c 		dmr |= VNDMR_A8BIT(vin->alpha);
vin              1384 drivers/media/platform/rcar-vin/rcar-dma.c 	rvin_write(vin, dmr,  VNDMR_REG);
vin              1386 drivers/media/platform/rcar-vin/rcar-dma.c 	spin_unlock_irqrestore(&vin->qlock, flags);
vin                67 drivers/media/platform/rcar-vin/rcar-v4l2.c const struct rvin_video_format *rvin_format_from_pixel(struct rvin_dev *vin,
vin                72 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vin->info->model == RCAR_M1 && pixelformat == V4L2_PIX_FMT_XBGR32)
vin                82 drivers/media/platform/rcar-vin/rcar-v4l2.c static u32 rvin_format_bytesperline(struct rvin_dev *vin,
vin                88 drivers/media/platform/rcar-vin/rcar-v4l2.c 	fmt = rvin_format_from_pixel(vin, pix->pixelformat);
vin               106 drivers/media/platform/rcar-vin/rcar-v4l2.c static void rvin_format_align(struct rvin_dev *vin, struct v4l2_pix_format *pix)
vin               110 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (!rvin_format_from_pixel(vin, pix->pixelformat))
vin               136 drivers/media/platform/rcar-vin/rcar-v4l2.c 	walign = vin->format.pixelformat == V4L2_PIX_FMT_NV16 ? 5 : 1;
vin               139 drivers/media/platform/rcar-vin/rcar-v4l2.c 	v4l_bound_align_image(&pix->width, 2, vin->info->max_width, walign,
vin               140 drivers/media/platform/rcar-vin/rcar-v4l2.c 			      &pix->height, 4, vin->info->max_height, 2, 0);
vin               142 drivers/media/platform/rcar-vin/rcar-v4l2.c 	pix->bytesperline = rvin_format_bytesperline(vin, pix);
vin               145 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin_dbg(vin, "Format %ux%u bpl: %u size: %u\n",
vin               153 drivers/media/platform/rcar-vin/rcar-v4l2.c static int rvin_reset_format(struct rvin_dev *vin)
vin               157 drivers/media/platform/rcar-vin/rcar-v4l2.c 		.pad = vin->parallel->source_pad,
vin               161 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(vin_to_source(vin), pad, get_fmt, NULL, &fmt);
vin               165 drivers/media/platform/rcar-vin/rcar-v4l2.c 	v4l2_fill_pix_format(&vin->format, &fmt.format);
vin               167 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_format_align(vin, &vin->format);
vin               169 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->source.top = 0;
vin               170 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->source.left = 0;
vin               171 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->source.width = vin->format.width;
vin               172 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->source.height = vin->format.height;
vin               174 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->crop = vin->source;
vin               175 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->compose = vin->source;
vin               180 drivers/media/platform/rcar-vin/rcar-v4l2.c static int rvin_try_format(struct rvin_dev *vin, u32 which,
vin               184 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               188 drivers/media/platform/rcar-vin/rcar-v4l2.c 		.pad = vin->parallel->source_pad,
vin               198 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (!rvin_format_from_pixel(vin, pix->pixelformat))
vin               201 drivers/media/platform/rcar-vin/rcar-v4l2.c 	v4l2_fill_mbus_format(&format.format, pix, vin->mbus_code);
vin               235 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_format_align(vin, pix);
vin               252 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               257 drivers/media/platform/rcar-vin/rcar-v4l2.c 		 dev_name(vin->dev));
vin               264 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               266 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return rvin_try_format(vin, V4L2_SUBDEV_FORMAT_TRY, &f->fmt.pix, NULL,
vin               273 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               277 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vb2_is_busy(&vin->queue))
vin               280 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = rvin_try_format(vin, V4L2_SUBDEV_FORMAT_ACTIVE, &f->fmt.pix,
vin               285 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format = f->fmt.pix;
vin               286 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->crop = crop;
vin               287 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->compose = compose;
vin               288 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->source = crop;
vin               296 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               298 drivers/media/platform/rcar-vin/rcar-v4l2.c 	f->fmt.pix = vin->format;
vin               317 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               326 drivers/media/platform/rcar-vin/rcar-v4l2.c 		s->r.width = vin->source.width;
vin               327 drivers/media/platform/rcar-vin/rcar-v4l2.c 		s->r.height = vin->source.height;
vin               330 drivers/media/platform/rcar-vin/rcar-v4l2.c 		s->r = vin->crop;
vin               335 drivers/media/platform/rcar-vin/rcar-v4l2.c 		s->r.width = vin->format.width;
vin               336 drivers/media/platform/rcar-vin/rcar-v4l2.c 		s->r.height = vin->format.height;
vin               339 drivers/media/platform/rcar-vin/rcar-v4l2.c 		s->r = vin->compose;
vin               351 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               369 drivers/media/platform/rcar-vin/rcar-v4l2.c 		max_rect.width = vin->source.width;
vin               370 drivers/media/platform/rcar-vin/rcar-v4l2.c 		max_rect.height = vin->source.height;
vin               373 drivers/media/platform/rcar-vin/rcar-v4l2.c 		v4l_bound_align_image(&r.width, 6, vin->source.width, 0,
vin               374 drivers/media/platform/rcar-vin/rcar-v4l2.c 				      &r.height, 2, vin->source.height, 0, 0);
vin               376 drivers/media/platform/rcar-vin/rcar-v4l2.c 		r.top  = clamp_t(s32, r.top, 0, vin->source.height - r.height);
vin               377 drivers/media/platform/rcar-vin/rcar-v4l2.c 		r.left = clamp_t(s32, r.left, 0, vin->source.width - r.width);
vin               379 drivers/media/platform/rcar-vin/rcar-v4l2.c 		vin->crop = s->r = r;
vin               381 drivers/media/platform/rcar-vin/rcar-v4l2.c 		vin_dbg(vin, "Cropped %dx%d@%d:%d of %dx%d\n",
vin               383 drivers/media/platform/rcar-vin/rcar-v4l2.c 			vin->source.width, vin->source.height);
vin               388 drivers/media/platform/rcar-vin/rcar-v4l2.c 		max_rect.width = vin->format.width;
vin               389 drivers/media/platform/rcar-vin/rcar-v4l2.c 		max_rect.height = vin->format.height;
vin               397 drivers/media/platform/rcar-vin/rcar-v4l2.c 		while ((r.top * vin->format.bytesperline) & HW_BUFFER_MASK)
vin               400 drivers/media/platform/rcar-vin/rcar-v4l2.c 		fmt = rvin_format_from_pixel(vin, vin->format.pixelformat);
vin               404 drivers/media/platform/rcar-vin/rcar-v4l2.c 		vin->compose = s->r = r;
vin               406 drivers/media/platform/rcar-vin/rcar-v4l2.c 		vin_dbg(vin, "Compose %dx%d@%d:%d in %dx%d\n",
vin               408 drivers/media/platform/rcar-vin/rcar-v4l2.c 			vin->format.width, vin->format.height);
vin               415 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_crop_scale_comp(vin);
vin               423 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               424 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               435 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               436 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               453 drivers/media/platform/rcar-vin/rcar-v4l2.c 		i->std = vin->vdev.tvnorms;
vin               476 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               477 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               484 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               487 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_subdev_call(vin_to_source(vin), video, s_std, a);
vin               491 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->std = a;
vin               494 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return rvin_reset_format(vin);
vin               499 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               501 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (v4l2_subdev_has_op(vin_to_source(vin), pad, dv_timings_cap))
vin               504 drivers/media/platform/rcar-vin/rcar-v4l2.c 	*a = vin->std;
vin               522 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               523 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               529 drivers/media/platform/rcar-vin/rcar-v4l2.c 	timings->pad = vin->parallel->sink_pad;
vin               541 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               542 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               550 drivers/media/platform/rcar-vin/rcar-v4l2.c 	return rvin_reset_format(vin);
vin               556 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               557 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               565 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               566 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               574 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               575 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               581 drivers/media/platform/rcar-vin/rcar-v4l2.c 	cap->pad = vin->parallel->sink_pad;
vin               592 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               593 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               599 drivers/media/platform/rcar-vin/rcar-v4l2.c 	edid->pad = vin->parallel->sink_pad;
vin               610 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               611 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               617 drivers/media/platform/rcar-vin/rcar-v4l2.c 	edid->pad = vin->parallel->sink_pad;
vin               674 drivers/media/platform/rcar-vin/rcar-v4l2.c static void rvin_mc_try_format(struct rvin_dev *vin,
vin               689 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_format_align(vin, pix);
vin               695 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               697 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_mc_try_format(vin, &f->fmt.pix);
vin               705 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               707 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vb2_is_busy(&vin->queue))
vin               710 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_mc_try_format(vin, &f->fmt.pix);
vin               712 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format = f->fmt.pix;
vin               714 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->crop.top = 0;
vin               715 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->crop.left = 0;
vin               716 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->crop.width = vin->format.width;
vin               717 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->crop.height = vin->format.height;
vin               718 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->compose = vin->crop;
vin               765 drivers/media/platform/rcar-vin/rcar-v4l2.c static int rvin_power_parallel(struct rvin_dev *vin, bool on)
vin               767 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct v4l2_subdev *sd = vin_to_source(vin);
vin               780 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               783 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = pm_runtime_get_sync(vin->dev);
vin               787 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = mutex_lock_interruptible(&vin->lock);
vin               791 drivers/media/platform/rcar-vin/rcar-v4l2.c 	file->private_data = vin;
vin               797 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vin->info->use_mc)
vin               798 drivers/media/platform/rcar-vin/rcar-v4l2.c 		ret = v4l2_pipeline_pm_use(&vin->vdev.entity, 1);
vin               800 drivers/media/platform/rcar-vin/rcar-v4l2.c 		ret = rvin_power_parallel(vin, true);
vin               805 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = v4l2_ctrl_handler_setup(&vin->ctrl_handler);
vin               809 drivers/media/platform/rcar-vin/rcar-v4l2.c 	mutex_unlock(&vin->lock);
vin               813 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vin->info->use_mc)
vin               814 drivers/media/platform/rcar-vin/rcar-v4l2.c 		v4l2_pipeline_pm_use(&vin->vdev.entity, 0);
vin               816 drivers/media/platform/rcar-vin/rcar-v4l2.c 		rvin_power_parallel(vin, false);
vin               820 drivers/media/platform/rcar-vin/rcar-v4l2.c 	mutex_unlock(&vin->lock);
vin               822 drivers/media/platform/rcar-vin/rcar-v4l2.c 	pm_runtime_put(vin->dev);
vin               829 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin = video_drvdata(file);
vin               833 drivers/media/platform/rcar-vin/rcar-v4l2.c 	mutex_lock(&vin->lock);
vin               841 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vin->info->use_mc) {
vin               842 drivers/media/platform/rcar-vin/rcar-v4l2.c 		v4l2_pipeline_pm_use(&vin->vdev.entity, 0);
vin               845 drivers/media/platform/rcar-vin/rcar-v4l2.c 			rvin_power_parallel(vin, false);
vin               848 drivers/media/platform/rcar-vin/rcar-v4l2.c 	mutex_unlock(&vin->lock);
vin               850 drivers/media/platform/rcar-vin/rcar-v4l2.c 	pm_runtime_put(vin->dev);
vin               865 drivers/media/platform/rcar-vin/rcar-v4l2.c void rvin_v4l2_unregister(struct rvin_dev *vin)
vin               867 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (!video_is_registered(&vin->vdev))
vin               870 drivers/media/platform/rcar-vin/rcar-v4l2.c 	v4l2_info(&vin->v4l2_dev, "Removing %s\n",
vin               871 drivers/media/platform/rcar-vin/rcar-v4l2.c 		  video_device_node_name(&vin->vdev));
vin               874 drivers/media/platform/rcar-vin/rcar-v4l2.c 	video_unregister_device(&vin->vdev);
vin               880 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct rvin_dev *vin =
vin               885 drivers/media/platform/rcar-vin/rcar-v4l2.c 		v4l2_event_queue(&vin->vdev, arg);
vin               892 drivers/media/platform/rcar-vin/rcar-v4l2.c int rvin_v4l2_register(struct rvin_dev *vin)
vin               894 drivers/media/platform/rcar-vin/rcar-v4l2.c 	struct video_device *vdev = &vin->vdev;
vin               897 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->v4l2_dev.notify = rvin_notify;
vin               900 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vdev->v4l2_dev = &vin->v4l2_dev;
vin               901 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vdev->queue = &vin->queue;
vin               902 drivers/media/platform/rcar-vin/rcar-v4l2.c 	snprintf(vdev->name, sizeof(vdev->name), "VIN%u output", vin->id);
vin               904 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vdev->lock = &vin->lock;
vin               910 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format.pixelformat	= RVIN_DEFAULT_FORMAT;
vin               911 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format.width = RVIN_DEFAULT_WIDTH;
vin               912 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format.height = RVIN_DEFAULT_HEIGHT;
vin               913 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format.field = RVIN_DEFAULT_FIELD;
vin               914 drivers/media/platform/rcar-vin/rcar-v4l2.c 	vin->format.colorspace = RVIN_DEFAULT_COLORSPACE;
vin               916 drivers/media/platform/rcar-vin/rcar-v4l2.c 	if (vin->info->use_mc) {
vin               920 drivers/media/platform/rcar-vin/rcar-v4l2.c 		rvin_reset_format(vin);
vin               923 drivers/media/platform/rcar-vin/rcar-v4l2.c 	rvin_format_align(vin, &vin->format);
vin               925 drivers/media/platform/rcar-vin/rcar-v4l2.c 	ret = video_register_device(&vin->vdev, VFL_TYPE_GRABBER, -1);
vin               927 drivers/media/platform/rcar-vin/rcar-v4l2.c 		vin_err(vin, "Failed to register video device\n");
vin               931 drivers/media/platform/rcar-vin/rcar-v4l2.c 	video_set_drvdata(&vin->vdev, vin);
vin               933 drivers/media/platform/rcar-vin/rcar-v4l2.c 	v4l2_info(&vin->v4l2_dev, "Device registered as %s\n",
vin               934 drivers/media/platform/rcar-vin/rcar-v4l2.c 		  video_device_node_name(&vin->vdev));
vin               121 drivers/media/platform/rcar-vin/rcar-vin.h 	unsigned int vin;
vin               224 drivers/media/platform/rcar-vin/rcar-vin.h #define vin_to_source(vin)		((vin)->parallel->subdev)
vin               253 drivers/media/platform/rcar-vin/rcar-vin.h 	struct rvin_dev *vin[RCAR_VIN_NUM];
vin               261 drivers/media/platform/rcar-vin/rcar-vin.h int rvin_dma_register(struct rvin_dev *vin, int irq);
vin               262 drivers/media/platform/rcar-vin/rcar-vin.h void rvin_dma_unregister(struct rvin_dev *vin);
vin               264 drivers/media/platform/rcar-vin/rcar-vin.h int rvin_v4l2_register(struct rvin_dev *vin);
vin               265 drivers/media/platform/rcar-vin/rcar-vin.h void rvin_v4l2_unregister(struct rvin_dev *vin);
vin               267 drivers/media/platform/rcar-vin/rcar-vin.h const struct rvin_video_format *rvin_format_from_pixel(struct rvin_dev *vin,
vin               272 drivers/media/platform/rcar-vin/rcar-vin.h void rvin_crop_scale_comp(struct rvin_dev *vin);
vin               274 drivers/media/platform/rcar-vin/rcar-vin.h int rvin_set_channel_routing(struct rvin_dev *vin, u8 chsel);
vin               275 drivers/media/platform/rcar-vin/rcar-vin.h void rvin_set_alpha(struct rvin_dev *vin, unsigned int alpha);
vin              1430 drivers/media/platform/vivid/vivid-vid-cap.c int vidioc_enumaudio(struct file *file, void *fh, struct v4l2_audio *vin)
vin              1432 drivers/media/platform/vivid/vivid-vid-cap.c 	if (vin->index >= ARRAY_SIZE(vivid_audio_inputs))
vin              1434 drivers/media/platform/vivid/vivid-vid-cap.c 	*vin = vivid_audio_inputs[vin->index];
vin              1438 drivers/media/platform/vivid/vivid-vid-cap.c int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *vin)
vin              1444 drivers/media/platform/vivid/vivid-vid-cap.c 	*vin = vivid_audio_inputs[dev->tv_audio_input];
vin              1448 drivers/media/platform/vivid/vivid-vid-cap.c int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio *vin)
vin              1454 drivers/media/platform/vivid/vivid-vid-cap.c 	if (vin->index >= ARRAY_SIZE(vivid_audio_inputs))
vin              1456 drivers/media/platform/vivid/vivid-vid-cap.c 	dev->tv_audio_input = vin->index;
vin                42 drivers/media/platform/vivid/vivid-vid-cap.h int vidioc_enumaudio(struct file *file, void *fh, struct v4l2_audio *vin);
vin                43 drivers/media/platform/vivid/vivid-vid-cap.h int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *vin);
vin                44 drivers/media/platform/vivid/vivid-vid-cap.h int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio *vin);
vin               247 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c static int pvr2_enumaudio(struct file *file, void *priv, struct v4l2_audio *vin)
vin               264 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 	if (vin->index > 0)
vin               266 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 	strscpy(vin->name, "PVRUSB2 Audio", sizeof(vin->name));
vin               267 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 	vin->capability = V4L2_AUDCAP_STEREO;
vin               271 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c static int pvr2_g_audio(struct file *file, void *priv, struct v4l2_audio *vin)
vin               274 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 	vin->index = 0;
vin               275 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 	strscpy(vin->name, "PVRUSB2 Audio", sizeof(vin->name));
vin               276 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c 	vin->capability = V4L2_AUDCAP_STEREO;
vin               602 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h 	u8 vin;
vin              1789 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h 		unsigned int *rss_size, u8 *vivld, u8 *vin);
vin              5001 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		u8 vivld = 0, vin = 0;
vin              5004 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 				  NULL, NULL, &vivld, &vin);
vin              5014 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			pi->vin = vin;
vin              5018 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 			pi->vin = FW_VIID_VIN_G(pi->viid);
vin               500 drivers/net/ethernet/chelsio/cxgb4/l2t.c 		ntuple |= (u64)(FT_VNID_ID_VF_V(pi->vin) |
vin              7632 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 		unsigned int *rss_size, u8 *vivld, u8 *vin)
vin              7671 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 	if (vin)
vin              7672 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 		*vin = FW_VI_CMD_VIN_G(be32_to_cpu(c.alloc_to_len16));
vin              9603 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 	u8 vivld = 0, vin = 0;
vin              9659 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 			  &vivld, &vin);
vin              9674 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 		pi->vin = vin;
vin              9678 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 		pi->vin =  FW_VIID_VIN_G(pi->viid);