Lines Matching refs:vfd
35 #define is_valid_ioctl(vfd, cmd) test_bit(_IOC_NR(cmd), (vfd)->valid_ioctls) argument
925 struct video_device *vfd = video_devdata(file); in check_fmt() local
926 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; in check_fmt()
927 bool is_vid = vfd->vfl_type == VFL_TYPE_VIDEO && in check_fmt()
928 (vfd->device_caps & vid_caps); in check_fmt()
929 bool is_vbi = vfd->vfl_type == VFL_TYPE_VBI; in check_fmt()
930 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in check_fmt()
931 bool is_tch = vfd->vfl_type == VFL_TYPE_TOUCH; in check_fmt()
932 bool is_meta = vfd->vfl_type == VFL_TYPE_VIDEO && in check_fmt()
933 (vfd->device_caps & meta_caps); in check_fmt()
934 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in check_fmt()
935 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in check_fmt()
1089 struct video_device *vfd = video_devdata(file); in v4l_querycap() local
1093 cap->device_caps = vfd->device_caps; in v4l_querycap()
1094 cap->capabilities = vfd->device_caps | V4L2_CAP_DEVICE_CAPS; in v4l_querycap()
1097 vfd->dev_parent); in v4l_querycap()
1105 WARN_ON(cap->device_caps != vfd->device_caps); in v4l_querycap()
1111 (vfd->device_caps | V4L2_CAP_DEVICE_CAPS)) != in v4l_querycap()
1112 (vfd->device_caps | V4L2_CAP_DEVICE_CAPS)); in v4l_querycap()
1122 struct video_device *vfd = video_devdata(file); in v4l_g_input() local
1124 if (vfd->device_caps & V4L2_CAP_IO_MC) { in v4l_g_input()
1135 struct video_device *vfd = video_devdata(file); in v4l_g_output() local
1137 if (vfd->device_caps & V4L2_CAP_IO_MC) { in v4l_g_output()
1148 struct video_device *vfd = video_devdata(file); in v4l_s_input() local
1151 ret = v4l_enable_media_source(vfd); in v4l_s_input()
1155 if (vfd->device_caps & V4L2_CAP_IO_MC) in v4l_s_input()
1164 struct video_device *vfd = video_devdata(file); in v4l_s_output() local
1166 if (vfd->device_caps & V4L2_CAP_IO_MC) in v4l_s_output()
1175 struct video_device *vfd; in v4l_g_priority() local
1178 vfd = video_devdata(file); in v4l_g_priority()
1179 *p = v4l2_prio_max(vfd->prio); in v4l_g_priority()
1186 struct video_device *vfd; in v4l_s_priority() local
1190 vfd = video_devdata(file); in v4l_s_priority()
1191 if (!test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) in v4l_s_priority()
1194 return v4l2_prio_change(vfd->prio, &vfh->prio, *p); in v4l_s_priority()
1200 struct video_device *vfd = video_devdata(file); in v4l_enuminput() local
1209 if (is_valid_ioctl(vfd, VIDIOC_S_STD)) in v4l_enuminput()
1212 if (vfd->device_caps & V4L2_CAP_IO_MC) { in v4l_enuminput()
1215 strscpy(p->name, vfd->name, sizeof(p->name)); in v4l_enuminput()
1226 struct video_device *vfd = video_devdata(file); in v4l_enumoutput() local
1235 if (is_valid_ioctl(vfd, VIDIOC_S_STD)) in v4l_enumoutput()
1238 if (vfd->device_caps & V4L2_CAP_IO_MC) { in v4l_enumoutput()
1241 strscpy(p->name, vfd->name, sizeof(p->name)); in v4l_enumoutput()
1615 struct video_device *vfd = video_devdata(file); in v4l_g_fmt() local
1653 if (vfd->vfl_type == VFL_TYPE_TOUCH) in v4l_g_fmt()
1696 struct video_device *vfd = video_devdata(file); in v4l_s_fmt() local
1703 ret = v4l_enable_media_source(vfd); in v4l_s_fmt()
1716 if (vfd->vfl_type == VFL_TYPE_TOUCH) in v4l_s_fmt()
1801 struct video_device *vfd = video_devdata(file); in v4l_try_fmt() local
1818 if (vfd->vfl_type == VFL_TYPE_TOUCH) in v4l_try_fmt()
1914 struct video_device *vfd = video_devdata(file); in v4l_g_tuner() local
1918 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_g_tuner()
1929 struct video_device *vfd = video_devdata(file); in v4l_s_tuner() local
1933 ret = v4l_enable_media_source(vfd); in v4l_s_tuner()
1936 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_tuner()
1944 struct video_device *vfd = video_devdata(file); in v4l_g_modulator() local
1948 if (vfd->vfl_type == VFL_TYPE_RADIO) in v4l_g_modulator()
1960 struct video_device *vfd = video_devdata(file); in v4l_s_modulator() local
1963 if (vfd->vfl_type == VFL_TYPE_RADIO) in v4l_s_modulator()
1972 struct video_device *vfd = video_devdata(file); in v4l_g_frequency() local
1975 if (vfd->vfl_type == VFL_TYPE_SDR) in v4l_g_frequency()
1978 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_g_frequency()
1986 struct video_device *vfd = video_devdata(file); in v4l_s_frequency() local
1991 ret = v4l_enable_media_source(vfd); in v4l_s_frequency()
1994 if (vfd->vfl_type == VFL_TYPE_SDR) { in v4l_s_frequency()
1998 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_frequency()
2009 struct video_device *vfd = video_devdata(file); in v4l_enumstd() local
2012 return v4l_video_std_enumstd(p, vfd->tvnorms); in v4l_enumstd()
2018 struct video_device *vfd = video_devdata(file); in v4l_s_std() local
2022 ret = v4l_enable_media_source(vfd); in v4l_s_std()
2025 norm = id & vfd->tvnorms; in v4l_s_std()
2026 if (vfd->tvnorms && !norm) /* Check if std is supported */ in v4l_s_std()
2036 struct video_device *vfd = video_devdata(file); in v4l_querystd() local
2040 ret = v4l_enable_media_source(vfd); in v4l_querystd()
2051 *p = vfd->tvnorms; in v4l_querystd()
2058 struct video_device *vfd = video_devdata(file); in v4l_s_hw_freq_seek() local
2063 ret = v4l_enable_media_source(vfd); in v4l_s_hw_freq_seek()
2067 if (vfd->vfl_type == VFL_TYPE_SDR) in v4l_s_hw_freq_seek()
2070 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_hw_freq_seek()
2158 struct video_device *vfd = video_devdata(file); in v4l_g_parm() local
2170 if (vfd->device_caps & V4L2_CAP_READWRITE) in v4l_g_parm()
2205 struct video_device *vfd = video_devdata(file); in v4l_queryctrl() local
2208 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_queryctrl()
2212 if (vfd->ctrl_handler) in v4l_queryctrl()
2213 return v4l2_queryctrl(vfd->ctrl_handler, p); in v4l_queryctrl()
2222 struct video_device *vfd = video_devdata(file); in v4l_query_ext_ctrl() local
2225 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_query_ext_ctrl()
2229 if (vfd->ctrl_handler) in v4l_query_ext_ctrl()
2230 return v4l2_query_ext_ctrl(vfd->ctrl_handler, p); in v4l_query_ext_ctrl()
2239 struct video_device *vfd = video_devdata(file); in v4l_querymenu() local
2242 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_querymenu()
2246 if (vfd->ctrl_handler) in v4l_querymenu()
2247 return v4l2_querymenu(vfd->ctrl_handler, p); in v4l_querymenu()
2256 struct video_device *vfd = video_devdata(file); in v4l_g_ctrl() local
2259 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_g_ctrl()
2265 if (vfd->ctrl_handler) in v4l_g_ctrl()
2266 return v4l2_g_ctrl(vfd->ctrl_handler, p); in v4l_g_ctrl()
2290 struct video_device *vfd = video_devdata(file); in v4l_s_ctrl() local
2293 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_s_ctrl()
2300 if (vfd->ctrl_handler) in v4l_s_ctrl()
2301 return v4l2_s_ctrl(NULL, vfd->ctrl_handler, p); in v4l_s_ctrl()
2322 struct video_device *vfd = video_devdata(file); in v4l_g_ext_ctrls() local
2325 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_g_ext_ctrls()
2330 vfd, vfd->v4l2_dev->mdev, p); in v4l_g_ext_ctrls()
2331 if (vfd->ctrl_handler) in v4l_g_ext_ctrls()
2332 return v4l2_g_ext_ctrls(vfd->ctrl_handler, in v4l_g_ext_ctrls()
2333 vfd, vfd->v4l2_dev->mdev, p); in v4l_g_ext_ctrls()
2343 struct video_device *vfd = video_devdata(file); in v4l_s_ext_ctrls() local
2346 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_s_ext_ctrls()
2351 vfd, vfd->v4l2_dev->mdev, p); in v4l_s_ext_ctrls()
2352 if (vfd->ctrl_handler) in v4l_s_ext_ctrls()
2353 return v4l2_s_ext_ctrls(NULL, vfd->ctrl_handler, in v4l_s_ext_ctrls()
2354 vfd, vfd->v4l2_dev->mdev, p); in v4l_s_ext_ctrls()
2364 struct video_device *vfd = video_devdata(file); in v4l_try_ext_ctrls() local
2367 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_try_ext_ctrls()
2372 vfd, vfd->v4l2_dev->mdev, p); in v4l_try_ext_ctrls()
2373 if (vfd->ctrl_handler) in v4l_try_ext_ctrls()
2374 return v4l2_try_ext_ctrls(vfd->ctrl_handler, in v4l_try_ext_ctrls()
2375 vfd, vfd->v4l2_dev->mdev, p); in v4l_try_ext_ctrls()
2426 struct video_device *vfd = video_devdata(file); in v4l_g_crop() local
2441 if (test_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags)) in v4l_g_crop()
2456 struct video_device *vfd = video_devdata(file); in v4l_s_crop() local
2471 if (test_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags)) in v4l_s_crop()
2481 struct video_device *vfd = video_devdata(file); in v4l_cropcap() local
2521 if (test_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags)) in v4l_cropcap()
2547 struct video_device *vfd = video_devdata(file); in v4l_log_status() local
2550 if (vfd->v4l2_dev) in v4l_log_status()
2552 vfd->v4l2_dev->name); in v4l_log_status()
2554 if (vfd->v4l2_dev) in v4l_log_status()
2556 vfd->v4l2_dev->name); in v4l_log_status()
2565 struct video_device *vfd = video_devdata(file); in v4l_dbg_g_register() local
2572 if (vfd->v4l2_dev == NULL) in v4l_dbg_g_register()
2574 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) in v4l_dbg_g_register()
2593 struct video_device *vfd = video_devdata(file); in v4l_dbg_s_register() local
2600 if (vfd->v4l2_dev == NULL) in v4l_dbg_s_register()
2602 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) in v4l_dbg_s_register()
2620 struct video_device *vfd = video_devdata(file); in v4l_dbg_g_chip_info() local
2631 strscpy(p->name, vfd->v4l2_dev->name, sizeof(p->name)); in v4l_dbg_g_chip_info()
2639 if (vfd->v4l2_dev == NULL) in v4l_dbg_g_chip_info()
2641 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) { in v4l_dbg_g_chip_info()
2695 struct video_device *vfd = video_devdata(file); in v4l_enum_freq_bands() local
2700 if (vfd->vfl_type == VFL_TYPE_SDR) { in v4l_enum_freq_bands()
2705 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_enum_freq_bands()
2715 if (is_valid_ioctl(vfd, VIDIOC_G_TUNER)) { in v4l_enum_freq_bands()
2733 if (is_valid_ioctl(vfd, VIDIOC_G_MODULATOR)) { in v4l_enum_freq_bands()
2972 struct video_device *vfd = video_devdata(file); in __video_do_ioctl() local
2975 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; in __video_do_ioctl()
2981 int dev_debug = vfd->dev_debug; in __video_do_ioctl()
2986 video_device_node_name(vfd)); in __video_do_ioctl()
2990 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) in __video_do_ioctl()
2999 if (v4l2_device_supports_requests(vfd->v4l2_dev) && in __video_do_ioctl()
3001 req_queue_lock = &vfd->v4l2_dev->mdev->req_queue_mutex; in __video_do_ioctl()
3007 lock = v4l2_ioctl_get_lock(vfd, vfh, cmd, arg); in __video_do_ioctl()
3015 if (!video_is_registered(vfd)) { in __video_do_ioctl()
3023 if (!test_bit(_IOC_NR(cmd), vfd->valid_ioctls) && in __video_do_ioctl()
3028 ret = v4l2_prio_check(vfd->prio, vfh->prio); in __video_do_ioctl()
3046 vfh ? v4l2_prio_check(vfd->prio, vfh->prio) >= 0 : 0, in __video_do_ioctl()
3056 v4l_printk_ioctl(video_device_node_name(vfd), cmd); in __video_do_ioctl()