61 lines
1.9 KiB
Diff
61 lines
1.9 KiB
Diff
|
From 93ed5e490850c885f2837bab98344e583696d1b6 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
||
|
Date: Sat, 8 Dec 2018 06:12:47 +0100
|
||
|
Subject: [PATCH 030/389] media: sun6i-csi: Pass on g_parm/s_parm to the subdev
|
||
|
|
||
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||
|
---
|
||
|
.../platform/sunxi/sun6i-csi/sun6i_video.c | 29 +++++++++++++++++++
|
||
|
1 file changed, 29 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
|
||
|
index 1d1755c1e18d..f7f74fa5fbfc 100644
|
||
|
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
|
||
|
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
|
||
|
@@ -469,6 +469,32 @@ static int sun6i_video_s_input(struct file *file, void *private,
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
+static int sun6i_vidioc_g_parm(struct file *file, void *priv,
|
||
|
+ struct v4l2_streamparm *p)
|
||
|
+{
|
||
|
+ struct sun6i_video *video = video_drvdata(file);
|
||
|
+ struct v4l2_subdev *subdev;
|
||
|
+
|
||
|
+ subdev = sun6i_video_remote_subdev(video, NULL);
|
||
|
+ if (!subdev)
|
||
|
+ return -ENXIO;
|
||
|
+
|
||
|
+ return v4l2_g_parm_cap(video_devdata(file), subdev, p);
|
||
|
+}
|
||
|
+
|
||
|
+static int sun6i_vidioc_s_parm(struct file *file, void *priv,
|
||
|
+ struct v4l2_streamparm *p)
|
||
|
+{
|
||
|
+ struct sun6i_video *video = video_drvdata(file);
|
||
|
+ struct v4l2_subdev *subdev;
|
||
|
+
|
||
|
+ subdev = sun6i_video_remote_subdev(video, NULL);
|
||
|
+ if (!subdev)
|
||
|
+ return -ENXIO;
|
||
|
+
|
||
|
+ return v4l2_s_parm_cap(video_devdata(file), subdev, p);
|
||
|
+}
|
||
|
+
|
||
|
static const struct v4l2_ioctl_ops sun6i_video_ioctl_ops = {
|
||
|
.vidioc_querycap = sun6i_video_querycap,
|
||
|
|
||
|
@@ -481,6 +507,9 @@ static const struct v4l2_ioctl_ops sun6i_video_ioctl_ops = {
|
||
|
.vidioc_g_input = sun6i_video_g_input,
|
||
|
.vidioc_s_input = sun6i_video_s_input,
|
||
|
|
||
|
+ .vidioc_g_parm = sun6i_vidioc_g_parm,
|
||
|
+ .vidioc_s_parm = sun6i_vidioc_s_parm,
|
||
|
+
|
||
|
.vidioc_create_bufs = vb2_ioctl_create_bufs,
|
||
|
.vidioc_prepare_buf = vb2_ioctl_prepare_buf,
|
||
|
.vidioc_reqbufs = vb2_ioctl_reqbufs,
|
||
|
--
|
||
|
2.35.3
|
||
|
|