mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
Fix v4l2-compliance VIDIOC_G/S_PARM failure. Below is the function call sequence starting from ioctl. doioctl(VIDIOC_G_PARM) vidioc_g_parm tegra_channel_g_parm v4l2_g_parm_cap v4l2_subdev_call_state_active v4l2_subdev_call v4l2_subdev_call_wrappers.pad.get_frame_interval call_get_frame_interval check_frame_interval check_state In file: v4l2-subdev.c check_state() function failed at check: (!state || !state->pads) Which caused the function to return -EINVAL=-22. struct v4l2_subdev contain a member active_state which should be initialized to overcome the failure. To fill active_state call v4l2_subdev_init_finalize in tegracam_v4l2subdev_register(). This failure is seen in K6.8 because in earlier kernel, v4l2_subdev_call() was called instead of v4l2_subdev_call_state_active() in v4l2_g_parm_cap(). And v4l2_subdev doesn't contain active_state member in earlier kernel. Bug 4449673 Change-Id: Id0fbcf9476cf6d194b721f85790e95580ff4007d Signed-off-by: Ankur Pawar <ankurp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281759 Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Praveen AC <pac@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>