Lines Matching full:hdl
213 static int prepare_ext_ctrls(struct v4l2_ctrl_handler *hdl, in prepare_ext_ctrls() argument
250 ref = find_ref_lock(hdl, id); in prepare_ext_ctrls()
265 ref = find_ref_lock(hdl, ctrl->cluster[0]->id); in prepare_ext_ctrls()
332 mutex_lock(hdl->lock); in prepare_ext_ctrls()
360 mutex_unlock(hdl->lock); in prepare_ext_ctrls()
369 static int class_check(struct v4l2_ctrl_handler *hdl, u32 which) in class_check() argument
374 return find_ref_lock(hdl, which | 1) ? 0 : -EINVAL; in class_check()
384 int v4l2_g_ext_ctrls_common(struct v4l2_ctrl_handler *hdl, in v4l2_g_ext_ctrls_common() argument
400 if (!hdl) in v4l2_g_ext_ctrls_common()
404 return class_check(hdl, cs->which); in v4l2_g_ext_ctrls_common()
413 ret = prepare_ext_ctrls(hdl, cs, helpers, vdev, true); in v4l2_g_ext_ctrls_common()
485 int v4l2_g_ext_ctrls(struct v4l2_ctrl_handler *hdl, struct video_device *vdev, in v4l2_g_ext_ctrls() argument
489 return v4l2_g_ext_ctrls_request(hdl, vdev, mdev, cs); in v4l2_g_ext_ctrls()
491 return v4l2_g_ext_ctrls_common(hdl, cs, vdev); in v4l2_g_ext_ctrls()
556 struct v4l2_ctrl_handler *hdl, in try_set_ext_ctrls_common() argument
576 if (!hdl) { in try_set_ext_ctrls_common()
583 return class_check(hdl, cs->which); in try_set_ext_ctrls_common()
591 ret = prepare_ext_ctrls(hdl, cs, helpers, vdev, false); in try_set_ext_ctrls_common()
663 !hdl->req_obj.req && set, 0); in try_set_ext_ctrls_common()
664 if (!ret && hdl->req_obj.req && set) { in try_set_ext_ctrls_common()
667 find_ref(hdl, master->cluster[j]->id); in try_set_ext_ctrls_common()
691 struct v4l2_ctrl_handler *hdl, in try_set_ext_ctrls() argument
699 return try_set_ext_ctrls_request(fh, hdl, vdev, mdev, cs, set); in try_set_ext_ctrls()
701 ret = try_set_ext_ctrls_common(fh, hdl, cs, vdev, set); in try_set_ext_ctrls()
710 int v4l2_try_ext_ctrls(struct v4l2_ctrl_handler *hdl, in v4l2_try_ext_ctrls() argument
715 return try_set_ext_ctrls(NULL, hdl, vdev, mdev, cs, false); in v4l2_try_ext_ctrls()
720 struct v4l2_ctrl_handler *hdl, in v4l2_s_ext_ctrls() argument
725 return try_set_ext_ctrls(fh, hdl, vdev, mdev, cs, true); in v4l2_s_ext_ctrls()
764 int v4l2_g_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_control *control) in v4l2_g_ctrl() argument
766 struct v4l2_ctrl *ctrl = v4l2_ctrl_find(hdl, control->id); in v4l2_g_ctrl()
822 int v4l2_s_ctrl(struct v4l2_fh *fh, struct v4l2_ctrl_handler *hdl, in v4l2_s_ctrl() argument
825 struct v4l2_ctrl *ctrl = v4l2_ctrl_find(hdl, control->id); in v4l2_s_ctrl()
1020 int v4l2_query_ext_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_query_ext_ctrl *qc) in v4l2_query_ext_ctrl() argument
1027 if (!hdl) in v4l2_query_ext_ctrl()
1030 mutex_lock(hdl->lock); in v4l2_query_ext_ctrl()
1033 ref = find_ref(hdl, id); in v4l2_query_ext_ctrl()
1035 if ((qc->id & next_flags) && !list_empty(&hdl->ctrl_refs)) { in v4l2_query_ext_ctrl()
1052 if (id >= node2id(hdl->ctrl_refs.prev)) { in v4l2_query_ext_ctrl()
1059 list_for_each_entry_continue(ref, &hdl->ctrl_refs, node) { in v4l2_query_ext_ctrl()
1066 if (&ref->node == &hdl->ctrl_refs) in v4l2_query_ext_ctrl()
1075 list_for_each_entry(ref, &hdl->ctrl_refs, node) { in v4l2_query_ext_ctrl()
1082 if (&ref->node == &hdl->ctrl_refs) in v4l2_query_ext_ctrl()
1086 mutex_unlock(hdl->lock); in v4l2_query_ext_ctrl()
1117 int v4l2_queryctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_queryctrl *qc) in v4l2_queryctrl() argument
1122 rc = v4l2_query_ext_ctrl(hdl, &qec); in v4l2_queryctrl()
1154 int v4l2_querymenu(struct v4l2_ctrl_handler *hdl, struct v4l2_querymenu *qm) in v4l2_querymenu() argument
1159 ctrl = v4l2_ctrl_find(hdl, qm->id); in v4l2_querymenu()