Lines Matching refs:elems

77 		for (i = 0; i < ctrl->elems; i++) {  in v4l2_ctrl_type_op_equal()
87 ctrl->elems * ctrl->elem_size); in v4l2_ctrl_type_op_equal()
184 u32 tot_elems = ctrl->elems; in v4l2_ctrl_type_op_init()
185 u32 elems = tot_elems - from_idx; in v4l2_ctrl_type_op_init() local
204 memset(ptr.p_s64 + from_idx, 0, elems * sizeof(s64)); in v4l2_ctrl_type_op_init()
216 memset(ptr.p_s32 + from_idx, 0, elems * sizeof(s32)); in v4l2_ctrl_type_op_init()
221 memset(ptr.p_s32 + from_idx, 0, elems * sizeof(s32)); in v4l2_ctrl_type_op_init()
224 memset(ptr.p_u8 + from_idx, ctrl->default_value, elems); in v4l2_ctrl_type_op_init()
231 memset(ptr.p_u16 + from_idx, 0, elems * sizeof(u16)); in v4l2_ctrl_type_op_init()
239 memset(ptr.p_u32 + from_idx, 0, elems * sizeof(u32)); in v4l2_ctrl_type_op_init()
1057 unsigned int elems) in ptr_to_ptr() argument
1061 memcpy(to.p, from.p_const, elems * ctrl->elem_size); in ptr_to_ptr()
1076 ctrl->elems = ctrl->new_elems; in new_to_cur()
1077 ptr_to_ptr(ctrl, ctrl->p_new, ctrl->p_cur, ctrl->elems); in new_to_cur()
1109 ctrl->new_elems = ctrl->elems; in cur_to_new()
1113 static bool req_alloc_array(struct v4l2_ctrl_ref *ref, u32 elems) in req_alloc_array() argument
1117 if (elems == ref->p_req_array_alloc_elems) in req_alloc_array()
1120 elems < ref->p_req_array_alloc_elems) in req_alloc_array()
1123 tmp = kvmalloc(elems * ref->ctrl->elem_size, GFP_KERNEL); in req_alloc_array()
1132 ref->p_req_array_alloc_elems = elems; in req_alloc_array()
1162 if (ctrl->is_array && !req_alloc_array(ref, ctrl->elems)) in cur_to_req()
1165 ref->p_req_elems = ctrl->elems; in cur_to_req()
1166 ptr_to_ptr(ctrl, ctrl->p_cur, ref->p_req, ctrl->elems); in cur_to_req()
1186 ctrl->new_elems = ctrl->elems; in req_to_new()
1219 memcpy(tmp, ctrl->p_new.p, ctrl->elems * ctrl->elem_size); in req_to_new()
1220 memcpy(tmp + sz, ctrl->p_cur.p, ctrl->elems * ctrl->elem_size); in req_to_new()
1441 size_extra_req = ctrl->elems * ctrl->elem_size; in handler_new_ref()
1511 unsigned elems = 1; in v4l2_ctrl_new() local
1521 elems *= dims[nr_of_dims]; in v4l2_ctrl_new()
1645 elems = 1; in v4l2_ctrl_new()
1648 tot_ctrl_size = elem_size * elems; in v4l2_ctrl_new()
1688 ctrl->elems = elems; in v4l2_ctrl_new()
1689 ctrl->new_elems = elems; in v4l2_ctrl_new()
1703 ctrl->p_array_alloc_elems = elems; in v4l2_ctrl_new()
1704 ctrl->p_array = kvzalloc(2 * elems * elem_size, GFP_KERNEL); in v4l2_ctrl_new()
2069 if (ctrl->elems != ctrl->new_elems) in cluster_changed()