57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
From 4303878dd8c5e1732d34c9ae0ae8bce3364f337e Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megous@megous.com>
|
|
Date: Sat, 8 Dec 2018 06:12:47 +0100
|
|
Subject: [PATCH 145/478] media: sun6i-csi: Pass on g_parm/s_parm to the subdev
|
|
|
|
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|
---
|
|
.../platform/sunxi/sun6i-csi/sun6i_video.c | 25 +++++++++++++++++++
|
|
1 file changed, 25 insertions(+)
|
|
|
|
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
|
|
index f5feb4286049..ee336f090aa9 100644
|
|
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
|
|
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
|
|
@@ -437,6 +437,28 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int i)
|
|
return 0;
|
|
}
|
|
|
|
+static int 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);
|
|
+
|
|
+ return v4l2_g_parm_cap(video_devdata(file), subdev, p);
|
|
+}
|
|
+
|
|
+static int 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);
|
|
+
|
|
+ return v4l2_s_parm_cap(video_devdata(file), subdev, p);
|
|
+}
|
|
+
|
|
static const struct v4l2_ioctl_ops sun6i_video_ioctl_ops = {
|
|
.vidioc_querycap = vidioc_querycap,
|
|
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
|
@@ -448,6 +470,9 @@ static const struct v4l2_ioctl_ops sun6i_video_ioctl_ops = {
|
|
.vidioc_s_input = vidioc_s_input,
|
|
.vidioc_g_input = vidioc_g_input,
|
|
|
|
+ .vidioc_g_parm = vidioc_g_parm,
|
|
+ .vidioc_s_parm = vidioc_s_parm,
|
|
+
|
|
.vidioc_reqbufs = vb2_ioctl_reqbufs,
|
|
.vidioc_querybuf = vb2_ioctl_querybuf,
|
|
.vidioc_qbuf = vb2_ioctl_qbuf,
|
|
--
|
|
2.35.3
|
|
|