summaryrefslogtreecommitdiff
path: root/drivers/media/platform/stm32
diff options
context:
space:
mode:
authorHugues Fruchet <hugues.fruchet@st.com>2018-02-08 06:00:45 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-26 10:30:44 -0500
commitaebd90aa3244e3539001919dcfbf00027d5ab63c (patch)
treebc326cbac715580b5b5f1f6e95e97cb071e164cc /drivers/media/platform/stm32
parente0019f71011dff4228175d1e30c1ba7fd6da41de (diff)
media: stm32-dcmi: add g/s_parm framerate support
Add g/s_parm framerate support by calling subdev g/s_frame_interval ops. This allows user to control sensor framerate by calling ioctl G/S_PARM. Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> 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/stm32')
-rw-r--r--drivers/media/platform/stm32/stm32-dcmi.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index 6baea432e382..cc104a0805e2 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -1164,6 +1164,22 @@ static int dcmi_enum_framesizes(struct file *file, void *fh,
return 0;
}
+static int dcmi_g_parm(struct file *file, void *priv,
+ struct v4l2_streamparm *p)
+{
+ struct stm32_dcmi *dcmi = video_drvdata(file);
+
+ return v4l2_g_parm_cap(video_devdata(file), dcmi->entity.subdev, p);
+}
+
+static int dcmi_s_parm(struct file *file, void *priv,
+ struct v4l2_streamparm *p)
+{
+ struct stm32_dcmi *dcmi = video_drvdata(file);
+
+ return v4l2_s_parm_cap(video_devdata(file), dcmi->entity.subdev, p);
+}
+
static int dcmi_enum_frameintervals(struct file *file, void *fh,
struct v4l2_frmivalenum *fival)
{
@@ -1266,6 +1282,9 @@ static const struct v4l2_ioctl_ops dcmi_ioctl_ops = {
.vidioc_g_input = dcmi_g_input,
.vidioc_s_input = dcmi_s_input,
+ .vidioc_g_parm = dcmi_g_parm,
+ .vidioc_s_parm = dcmi_s_parm,
+
.vidioc_enum_framesizes = dcmi_enum_framesizes,
.vidioc_enum_frameintervals = dcmi_enum_frameintervals,