]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commitdiff
media: ti-vpe: vip: Make sure v4l2_ctrl are passed on to subdev
authorBenoit Parrot <bparrot@ti.com>
Mon, 2 Mar 2015 23:52:05 +0000 (17:52 -0600)
committerJyri Sarha <jsarha@ti.com>
Wed, 4 Mar 2015 07:40:53 +0000 (09:40 +0200)
Make sure subdevice v4l2 controls are properly handled.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/media/platform/ti-vpe/vip.c
drivers/media/platform/ti-vpe/vip.h

index 0d8e3a52735de6a9f654e11dd85d927c67d7c780..0c6157f452c7f15bed7539334ba835ad2c0a9bb7 100644 (file)
@@ -1353,21 +1353,6 @@ static int vip_s_std(struct file *file, void *fh, v4l2_std_id std)
        return 0;
 }
 
-static int vip_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *a)
-{
-       return -EINVAL;
-}
-
-static int vip_g_ctrl(struct file *file, void *fh, struct v4l2_control *a)
-{
-       return 0;
-}
-
-static int vip_s_ctrl(struct file *file, void *fh, struct v4l2_control *a)
-{
-       return 0;
-}
-
 static int vip_enum_fmt_vid_cap(struct file *file, void *priv,
                                struct v4l2_fmtdesc *f)
 {
@@ -1763,10 +1748,6 @@ static const struct v4l2_ioctl_ops vip_ioctl_ops = {
        .vidioc_g_std           = vip_g_std,
        .vidioc_s_std           = vip_s_std,
 
-       .vidioc_queryctrl       = vip_queryctrl,
-       .vidioc_g_ctrl          = vip_g_ctrl,
-       .vidioc_s_ctrl          = vip_s_ctrl,
-
        .vidioc_enum_fmt_vid_cap = vip_enum_fmt_vid_cap,
        .vidioc_g_fmt_vid_cap   = vip_g_fmt_vid_cap,
        .vidioc_try_fmt_vid_cap = vip_try_fmt_vid_cap,
@@ -2698,6 +2679,7 @@ static int vip_probe(struct platform_device *pdev)
        struct pinctrl *pinctrl;
        int ret, slice = VIP_SLICE1;
        u32 tmp, pid;
+       struct v4l2_ctrl_handler *hdl;
 
        pm_runtime_enable(&pdev->dev);
 
@@ -2802,6 +2784,10 @@ static int vip_probe(struct platform_device *pdev)
 
                mutex_init(&dev->mutex);
 
+               hdl = &dev->ctrl_handler;
+               v4l2_ctrl_handler_init(hdl, 11);
+               dev->v4l2_dev.ctrl_handler = hdl;
+
                dev->slice_id = slice;
                dev->pdev = pdev;
                dev->res = shared->res;
index ee610cb7de5421405d5418e96e7021561a9c75ce..6abb864b06fd23f759d1d9487d7b6d38261ddb5d 100644 (file)
@@ -115,6 +115,7 @@ struct vip_dev {
        struct vip_fmt          *active_fmt[VIP_MAX_ACTIVE_FMT];
        int                     num_active_fmt;
        struct v4l2_device      v4l2_dev;
+       struct v4l2_ctrl_handler ctrl_handler;
        struct platform_device *pdev;
        struct vip_shared       *shared;
        struct resource         *res;