aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-03-04 04:47:58 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-23 14:48:55 -0400
commit5778e749c152567ac15201fcd988bc1604878021 (patch)
tree3d9c769fbe9f342f4b6f2f925635e90e2c51814e /drivers/media/platform/vsp1
parent3f1ccf16f3ea015e57c326c2b14010bf119b6184 (diff)
[media] v4l2-subdev: add support for the new enum_frame_size 'which' field
Support the new 'which' field in the enum_frame_size ops. Most drivers do not need to be changed since they always returns 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> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1')
-rw-r--r--drivers/media/platform/vsp1/vsp1_hsit.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_lif.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_lut.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_rwpf.c3
-rw-r--r--drivers/media/platform/vsp1/vsp1_sru.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_uds.c4
6 files changed, 17 insertions, 6 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c b/drivers/media/platform/vsp1/vsp1_hsit.c
index d226b3ff5e30..8ffb817ae525 100644
--- a/drivers/media/platform/vsp1/vsp1_hsit.c
+++ b/drivers/media/platform/vsp1/vsp1_hsit.c
@@ -76,9 +76,11 @@ static int hsit_enum_frame_size(struct v4l2_subdev *subdev,
76 struct v4l2_subdev_pad_config *cfg, 76 struct v4l2_subdev_pad_config *cfg,
77 struct v4l2_subdev_frame_size_enum *fse) 77 struct v4l2_subdev_frame_size_enum *fse)
78{ 78{
79 struct vsp1_hsit *hsit = to_hsit(subdev);
79 struct v4l2_mbus_framefmt *format; 80 struct v4l2_mbus_framefmt *format;
80 81
81 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad); 82 format = vsp1_entity_get_pad_format(&hsit->entity, cfg, fse->pad,
83 fse->which);
82 84
83 if (fse->index || fse->code != format->code) 85 if (fse->index || fse->code != format->code)
84 return -EINVAL; 86 return -EINVAL;
diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c
index 60f1bd85d48a..39fa5ef20fbb 100644
--- a/drivers/media/platform/vsp1/vsp1_lif.c
+++ b/drivers/media/platform/vsp1/vsp1_lif.c
@@ -109,9 +109,11 @@ static int lif_enum_frame_size(struct v4l2_subdev *subdev,
109 struct v4l2_subdev_pad_config *cfg, 109 struct v4l2_subdev_pad_config *cfg,
110 struct v4l2_subdev_frame_size_enum *fse) 110 struct v4l2_subdev_frame_size_enum *fse)
111{ 111{
112 struct vsp1_lif *lif = to_lif(subdev);
112 struct v4l2_mbus_framefmt *format; 113 struct v4l2_mbus_framefmt *format;
113 114
114 format = v4l2_subdev_get_try_format(subdev, cfg, LIF_PAD_SINK); 115 format = vsp1_entity_get_pad_format(&lif->entity, cfg, LIF_PAD_SINK,
116 fse->which);
115 117
116 if (fse->index || fse->code != format->code) 118 if (fse->index || fse->code != format->code)
117 return -EINVAL; 119 return -EINVAL;
diff --git a/drivers/media/platform/vsp1/vsp1_lut.c b/drivers/media/platform/vsp1/vsp1_lut.c
index 8aa8c111301c..656ec272a414 100644
--- a/drivers/media/platform/vsp1/vsp1_lut.c
+++ b/drivers/media/platform/vsp1/vsp1_lut.c
@@ -117,9 +117,11 @@ static int lut_enum_frame_size(struct v4l2_subdev *subdev,
117 struct v4l2_subdev_pad_config *cfg, 117 struct v4l2_subdev_pad_config *cfg,
118 struct v4l2_subdev_frame_size_enum *fse) 118 struct v4l2_subdev_frame_size_enum *fse)
119{ 119{
120 struct vsp1_lut *lut = to_lut(subdev);
120 struct v4l2_mbus_framefmt *format; 121 struct v4l2_mbus_framefmt *format;
121 122
122 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad); 123 format = vsp1_entity_get_pad_format(&lut->entity, cfg,
124 fse->pad, fse->which);
123 125
124 if (fse->index || fse->code != format->code) 126 if (fse->index || fse->code != format->code)
125 return -EINVAL; 127 return -EINVAL;
diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.c b/drivers/media/platform/vsp1/vsp1_rwpf.c
index a083d85e84b4..fa71f4695e16 100644
--- a/drivers/media/platform/vsp1/vsp1_rwpf.c
+++ b/drivers/media/platform/vsp1/vsp1_rwpf.c
@@ -48,7 +48,8 @@ int vsp1_rwpf_enum_frame_size(struct v4l2_subdev *subdev,
48 struct vsp1_rwpf *rwpf = to_rwpf(subdev); 48 struct vsp1_rwpf *rwpf = to_rwpf(subdev);
49 struct v4l2_mbus_framefmt *format; 49 struct v4l2_mbus_framefmt *format;
50 50
51 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad); 51 format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, fse->pad,
52 fse->which);
52 53
53 if (fse->index || fse->code != format->code) 54 if (fse->index || fse->code != format->code)
54 return -EINVAL; 55 return -EINVAL;
diff --git a/drivers/media/platform/vsp1/vsp1_sru.c b/drivers/media/platform/vsp1/vsp1_sru.c
index 554340d4e2b3..6310acab60e7 100644
--- a/drivers/media/platform/vsp1/vsp1_sru.c
+++ b/drivers/media/platform/vsp1/vsp1_sru.c
@@ -200,9 +200,11 @@ static int sru_enum_frame_size(struct v4l2_subdev *subdev,
200 struct v4l2_subdev_pad_config *cfg, 200 struct v4l2_subdev_pad_config *cfg,
201 struct v4l2_subdev_frame_size_enum *fse) 201 struct v4l2_subdev_frame_size_enum *fse)
202{ 202{
203 struct vsp1_sru *sru = to_sru(subdev);
203 struct v4l2_mbus_framefmt *format; 204 struct v4l2_mbus_framefmt *format;
204 205
205 format = v4l2_subdev_get_try_format(subdev, cfg, SRU_PAD_SINK); 206 format = vsp1_entity_get_pad_format(&sru->entity, cfg,
207 SRU_PAD_SINK, fse->which);
206 208
207 if (fse->index || fse->code != format->code) 209 if (fse->index || fse->code != format->code)
208 return -EINVAL; 210 return -EINVAL;
diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c
index ef4d307f80d1..ccc8243e3493 100644
--- a/drivers/media/platform/vsp1/vsp1_uds.c
+++ b/drivers/media/platform/vsp1/vsp1_uds.c
@@ -204,9 +204,11 @@ static int uds_enum_frame_size(struct v4l2_subdev *subdev,
204 struct v4l2_subdev_pad_config *cfg, 204 struct v4l2_subdev_pad_config *cfg,
205 struct v4l2_subdev_frame_size_enum *fse) 205 struct v4l2_subdev_frame_size_enum *fse)
206{ 206{
207 struct vsp1_uds *uds = to_uds(subdev);
207 struct v4l2_mbus_framefmt *format; 208 struct v4l2_mbus_framefmt *format;
208 209
209 format = v4l2_subdev_get_try_format(subdev, cfg, UDS_PAD_SINK); 210 format = vsp1_entity_get_pad_format(&uds->entity, cfg,
211 UDS_PAD_SINK, fse->which);
210 212
211 if (fse->index || fse->code != format->code) 213 if (fse->index || fse->code != format->code)
212 return -EINVAL; 214 return -EINVAL;