Lines Matching full:vfd
35 #define is_valid_ioctl(vfd, cmd) test_bit(_IOC_NR(cmd), (vfd)->valid_ioctls)
932 struct video_device *vfd = video_devdata(file);
933 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
934 bool is_vid = vfd->vfl_type == VFL_TYPE_VIDEO &&
935 (vfd->device_caps & vid_caps);
936 bool is_vbi = vfd->vfl_type == VFL_TYPE_VBI;
937 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
938 bool is_tch = vfd->vfl_type == VFL_TYPE_TOUCH;
939 bool is_meta = vfd->vfl_type == VFL_TYPE_VIDEO &&
940 (vfd->device_caps & meta_caps);
941 bool is_rx = vfd->vfl_dir != VFL_DIR_TX;
942 bool is_tx = vfd->vfl_dir != VFL_DIR_RX;
1096 struct video_device *vfd = video_devdata(file);
1100 cap->device_caps = vfd->device_caps;
1101 cap->capabilities = vfd->device_caps | V4L2_CAP_DEVICE_CAPS;
1104 vfd->dev_parent);
1112 WARN_ON(cap->device_caps != vfd->device_caps);
1115 * vfd->device_caps | V4L2_CAP_DEVICE_CAPS
1118 (vfd->device_caps | V4L2_CAP_DEVICE_CAPS)) !=
1119 (vfd->device_caps | V4L2_CAP_DEVICE_CAPS));
1129 struct video_device *vfd = video_devdata(file);
1131 if (vfd->device_caps & V4L2_CAP_IO_MC) {
1142 struct video_device *vfd = video_devdata(file);
1144 if (vfd->device_caps & V4L2_CAP_IO_MC) {
1155 struct video_device *vfd = video_devdata(file);
1158 ret = v4l_enable_media_source(vfd);
1162 if (vfd->device_caps & V4L2_CAP_IO_MC)
1171 struct video_device *vfd = video_devdata(file);
1173 if (vfd->device_caps & V4L2_CAP_IO_MC)
1182 struct video_device *vfd;
1185 vfd = video_devdata(file);
1186 *p = v4l2_prio_max(vfd->prio);
1193 struct video_device *vfd;
1197 vfd = video_devdata(file);
1198 if (!test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags))
1201 return v4l2_prio_change(vfd->prio, &vfh->prio, *p);
1207 struct video_device *vfd = video_devdata(file);
1216 if (is_valid_ioctl(vfd, VIDIOC_S_STD))
1219 if (vfd->device_caps & V4L2_CAP_IO_MC) {
1222 strscpy(p->name, vfd->name, sizeof(p->name));
1233 struct video_device *vfd = video_devdata(file);
1242 if (is_valid_ioctl(vfd, VIDIOC_S_STD))
1245 if (vfd->device_caps & V4L2_CAP_IO_MC) {
1248 strscpy(p->name, vfd->name, sizeof(p->name));
1687 struct video_device *vfd = video_devdata(file);
1703 if (vfd->vfl_type == VFL_TYPE_TOUCH)
1746 struct video_device *vfd = video_devdata(file);
1753 ret = v4l_enable_media_source(vfd);
1766 if (vfd->vfl_type == VFL_TYPE_TOUCH)
1857 struct video_device *vfd = video_devdata(file);
1874 if (vfd->vfl_type == VFL_TYPE_TOUCH)
1976 struct video_device *vfd = video_devdata(file);
1980 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
1991 struct video_device *vfd = video_devdata(file);
1995 ret = v4l_enable_media_source(vfd);
1998 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
2006 struct video_device *vfd = video_devdata(file);
2010 if (vfd->vfl_type == VFL_TYPE_RADIO)
2022 struct video_device *vfd = video_devdata(file);
2025 if (vfd->vfl_type == VFL_TYPE_RADIO)
2034 struct video_device *vfd = video_devdata(file);
2037 if (vfd->vfl_type == VFL_TYPE_SDR)
2040 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
2048 struct video_device *vfd = video_devdata(file);
2053 ret = v4l_enable_media_source(vfd);
2056 if (vfd->vfl_type == VFL_TYPE_SDR) {
2060 type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
2071 struct video_device *vfd = video_devdata(file);
2074 return v4l_video_std_enumstd(p, vfd->tvnorms);
2080 struct video_device *vfd = video_devdata(file);
2084 ret = v4l_enable_media_source(vfd);
2087 norm = id & vfd->tvnorms;
2088 if (vfd->tvnorms && !norm) /* Check if std is supported */
2098 struct video_device *vfd = video_devdata(file);
2102 ret = v4l_enable_media_source(vfd);
2113 *p = vfd->tvnorms;
2120 struct video_device *vfd = video_devdata(file);
2125 ret = v4l_enable_media_source(vfd);
2129 if (vfd->vfl_type == VFL_TYPE_SDR)
2132 type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
2157 struct video_device *vfd = video_devdata(file);
2167 if (is_valid_ioctl(vfd, VIDIOC_REMOVE_BUFS))
2203 struct video_device *vfd = video_devdata(file);
2215 if (is_valid_ioctl(vfd, VIDIOC_REMOVE_BUFS))
2250 struct video_device *vfd = video_devdata(file);
2262 if (vfd->device_caps & V4L2_CAP_READWRITE)
2297 struct video_device *vfd = video_devdata(file);
2301 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2306 if (vfd->ctrl_handler)
2307 return v4l2_queryctrl(vfd->ctrl_handler, p);
2323 struct video_device *vfd = video_devdata(file);
2326 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2330 if (vfd->ctrl_handler)
2331 return v4l2_query_ext_ctrl(vfd->ctrl_handler, p);
2340 struct video_device *vfd = video_devdata(file);
2343 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2347 if (vfd->ctrl_handler)
2348 return v4l2_querymenu(vfd->ctrl_handler, p);
2357 struct video_device *vfd = video_devdata(file);
2360 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2366 if (vfd->ctrl_handler)
2367 return v4l2_g_ctrl(vfd->ctrl_handler, p);
2389 struct video_device *vfd = video_devdata(file);
2392 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2399 if (vfd->ctrl_handler)
2400 return v4l2_s_ctrl(NULL, vfd->ctrl_handler, p);
2419 struct video_device *vfd = video_devdata(file);
2422 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2427 vfd, vfd->v4l2_dev->mdev, p);
2428 if (vfd->ctrl_handler)
2429 return v4l2_g_ext_ctrls(vfd->ctrl_handler,
2430 vfd, vfd->v4l2_dev->mdev, p);
2440 struct video_device *vfd = video_devdata(file);
2443 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2448 vfd, vfd->v4l2_dev->mdev, p);
2449 if (vfd->ctrl_handler)
2450 return v4l2_s_ext_ctrls(NULL, vfd->ctrl_handler,
2451 vfd, vfd->v4l2_dev->mdev, p);
2461 struct video_device *vfd = video_devdata(file);
2464 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL;
2469 vfd, vfd->v4l2_dev->mdev, p);
2470 if (vfd->ctrl_handler)
2471 return v4l2_try_ext_ctrls(vfd->ctrl_handler,
2472 vfd, vfd->v4l2_dev->mdev, p);
2523 struct video_device *vfd = video_devdata(file);
2538 if (test_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags))
2553 struct video_device *vfd = video_devdata(file);
2568 if (test_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags))
2578 struct video_device *vfd = video_devdata(file);
2618 if (test_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags))
2644 struct video_device *vfd = video_devdata(file);
2647 if (vfd->v4l2_dev)
2649 vfd->v4l2_dev->name);
2651 if (vfd->v4l2_dev)
2653 vfd->v4l2_dev->name);
2662 struct video_device *vfd = video_devdata(file);
2669 if (vfd->v4l2_dev == NULL)
2671 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev)
2690 struct video_device *vfd = video_devdata(file);
2697 if (vfd->v4l2_dev == NULL)
2699 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev)
2717 struct video_device *vfd = video_devdata(file);
2728 strscpy(p->name, vfd->v4l2_dev->name, sizeof(p->name));
2736 if (vfd->v4l2_dev == NULL)
2738 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) {
2792 struct video_device *vfd = video_devdata(file);
2797 if (vfd->vfl_type == VFL_TYPE_SDR) {
2802 type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
2812 if (is_valid_ioctl(vfd, VIDIOC_G_TUNER)) {
2830 if (is_valid_ioctl(vfd, VIDIOC_G_MODULATOR)) {
3068 struct video_device *vfd = video_devdata(file);
3071 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
3077 int dev_debug = vfd->dev_debug;
3082 video_device_node_name(vfd));
3086 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags))
3095 if (v4l2_device_supports_requests(vfd->v4l2_dev) &&
3097 req_queue_lock = &vfd->v4l2_dev->mdev->req_queue_mutex;
3103 lock = v4l2_ioctl_get_lock(vfd, vfh, cmd, arg);
3111 if (!video_is_registered(vfd)) {
3119 if (!is_valid_ioctl(vfd, cmd) &&
3124 ret = v4l2_prio_check(vfd->prio, vfh->prio);
3142 vfh ? v4l2_prio_check(vfd->prio, vfh->prio) >= 0 : 0,
3152 v4l_printk_ioctl(video_device_node_name(vfd), cmd);