summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1/vsp1_uds.c
diff options
context:
space:
mode:
authorHans Verkuil2015-03-04 10:47:57 +0100
committerMauro Carvalho Chehab2015-03-23 19:46:38 +0100
commit3f1ccf16f3ea015e57c326c2b14010bf119b6184 (patch)
treeb5f46a2102c5e37f23ff78175fae393105e1eef3 /drivers/media/platform/vsp1/vsp1_uds.c
parent[media] v4l2-subdev.c: add 'which' checks for enum ops (diff)
downloadkernel-qcow2-linux-3f1ccf16f3ea015e57c326c2b14010bf119b6184.tar.gz
kernel-qcow2-linux-3f1ccf16f3ea015e57c326c2b14010bf119b6184.tar.xz
kernel-qcow2-linux-3f1ccf16f3ea015e57c326c2b14010bf119b6184.zip
[media] v4l2-subdev: support new 'which' field in enum_mbus_code
Support the new 'which' field in the enum_mbus_code ops. Most drivers do not need to be changed since they always return the same enumeration regardless of the 'which' field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_uds.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_uds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c
index 08d916d5d1ac..ef4d307f80d1 100644
--- a/drivers/media/platform/vsp1/vsp1_uds.c
+++ b/drivers/media/platform/vsp1/vsp1_uds.c
@@ -176,6 +176,7 @@ static int uds_enum_mbus_code(struct v4l2_subdev *subdev,
MEDIA_BUS_FMT_ARGB8888_1X32,
MEDIA_BUS_FMT_AYUV8_1X32,
};
+ struct vsp1_uds *uds = to_uds(subdev);
if (code->pad == UDS_PAD_SINK) {
if (code->index >= ARRAY_SIZE(codes))
@@ -191,7 +192,8 @@ static int uds_enum_mbus_code(struct v4l2_subdev *subdev,
if (code->index)
return -EINVAL;
- format = v4l2_subdev_get_try_format(subdev, cfg, UDS_PAD_SINK);
+ format = vsp1_entity_get_pad_format(&uds->entity, cfg,
+ UDS_PAD_SINK, code->which);
code->code = format->code;
}