summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/rcar-vin/rcar-core.c
diff options
context:
space:
mode:
authorNiklas Söderlund2016-08-15 17:06:35 +0200
committerMauro Carvalho Chehab2016-08-23 21:23:38 +0200
commitb50b77e6c9a99ddae5266b21cf6757e91d18ffc2 (patch)
tree7bfa61dfbb4623f1ba7d3628c9a803b52968f385 /drivers/media/platform/rcar-vin/rcar-core.c
parent[media] rcar-vin: rework how subdevice is found and bound (diff)
downloadkernel-qcow2-linux-b50b77e6c9a99ddae5266b21cf6757e91d18ffc2.tar.gz
kernel-qcow2-linux-b50b77e6c9a99ddae5266b21cf6757e91d18ffc2.tar.xz
kernel-qcow2-linux-b50b77e6c9a99ddae5266b21cf6757e91d18ffc2.zip
[media] rcar-vin: move media bus information to struct rvin_graph_entity
The primary reason for this change is to prepare for Gen3 support where there will be more then one possible video source. Each source will have its own media bus format and code, so it needs to be moved from the per device structure to a structure used to represent an individual connection to a video source. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/rcar-vin/rcar-core.c')
-rw-r--r--drivers/media/platform/rcar-vin/rcar-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
index 39bf6fc3599d..64999a2fba15 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -31,9 +31,9 @@
#define notifier_to_vin(n) container_of(n, struct rvin_dev, notifier)
-static bool rvin_mbus_supported(struct rvin_dev *vin)
+static bool rvin_mbus_supported(struct rvin_graph_entity *entity)
{
- struct v4l2_subdev *sd = vin->digital.subdev;
+ struct v4l2_subdev *sd = entity->subdev;
struct v4l2_subdev_mbus_code_enum code = {
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
};
@@ -46,7 +46,7 @@ static bool rvin_mbus_supported(struct rvin_dev *vin)
case MEDIA_BUS_FMT_YUYV8_2X8:
case MEDIA_BUS_FMT_YUYV10_2X10:
case MEDIA_BUS_FMT_RGB888_1X24:
- vin->source.code = code.code;
+ entity->code = code.code;
return true;
default:
break;
@@ -62,14 +62,14 @@ static int rvin_digital_notify_complete(struct v4l2_async_notifier *notifier)
int ret;
/* Verify subdevices mbus format */
- if (!rvin_mbus_supported(vin)) {
+ if (!rvin_mbus_supported(&vin->digital)) {
vin_err(vin, "Unsupported media bus format for %s\n",
vin->digital.subdev->name);
return -EINVAL;
}
vin_dbg(vin, "Found media bus format for %s: %d\n",
- vin->digital.subdev->name, vin->source.code);
+ vin->digital.subdev->name, vin->digital.code);
ret = v4l2_device_register_subdev_nodes(&vin->v4l2_dev);
if (ret < 0) {
@@ -170,7 +170,7 @@ static int rvin_digital_graph_parse(struct rvin_dev *vin)
}
of_node_put(np);
- ret = rvin_digitial_parse_v4l2(vin, ep, &vin->mbus_cfg);
+ ret = rvin_digitial_parse_v4l2(vin, ep, &vin->digital.mbus_cfg);
of_node_put(ep);
if (ret)
return ret;