media: ti-vpe: cal: add g/s_parm for legacy API

v4l2-compliance complains about g/s_parm when using the non-MC API. Fix
it by adding the functions and just call v4l2_s/g_parm_cap for the
phy subdev.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Tomi Valkeinen 2021-06-14 13:23:11 +02:00 committed by Mauro Carvalho Chehab
parent afaff559ae
commit 4e11f02f6f

View File

@ -388,6 +388,20 @@ static int cal_enum_frameintervals(struct file *file, void *priv,
return 0;
}
static int cal_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{
struct cal_ctx *ctx = video_drvdata(file);
return v4l2_g_parm_cap(video_devdata(file), ctx->phy->sensor, a);
}
static int cal_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{
struct cal_ctx *ctx = video_drvdata(file);
return v4l2_s_parm_cap(video_devdata(file), ctx->phy->sensor, a);
}
static const struct v4l2_ioctl_ops cal_ioctl_video_ops = {
.vidioc_querycap = cal_querycap,
.vidioc_enum_fmt_vid_cap = cal_enum_fmt_vid_cap,
@ -411,6 +425,8 @@ static const struct v4l2_ioctl_ops cal_ioctl_video_ops = {
.vidioc_log_status = v4l2_ctrl_log_status,
.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
.vidioc_g_parm = cal_g_parm,
.vidioc_s_parm = cal_s_parm,
};
/* ------------------------------------------------------------------