Lines Matching refs:sru
27 static inline void vsp1_sru_write(struct vsp1_sru *sru, in vsp1_sru_write() argument
77 struct vsp1_sru *sru = in sru_s_ctrl() local
82 sru->intensity = ctrl->val; in sru_s_ctrl()
125 struct vsp1_sru *sru = to_sru(subdev); in sru_enum_frame_size() local
130 state = vsp1_entity_get_state(&sru->entity, sd_state, fse->which); in sru_enum_frame_size()
136 mutex_lock(&sru->entity.lock); in sru_enum_frame_size()
162 mutex_unlock(&sru->entity.lock); in sru_enum_frame_size()
166 static void sru_try_format(struct vsp1_sru *sru, in sru_try_format() argument
221 struct vsp1_sru *sru = to_sru(subdev); in sru_set_format() local
226 mutex_lock(&sru->entity.lock); in sru_set_format()
228 state = vsp1_entity_get_state(&sru->entity, sd_state, fmt->which); in sru_set_format()
234 sru_try_format(sru, state, fmt->pad, &fmt->format); in sru_set_format()
244 sru_try_format(sru, state, SRU_PAD_SOURCE, format); in sru_set_format()
248 mutex_unlock(&sru->entity.lock); in sru_set_format()
274 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_configure_stream() local
291 param = &vsp1_sru_params[sru->intensity - 1]; in sru_configure_stream()
295 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL0, ctrl0); in sru_configure_stream()
296 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5); in sru_configure_stream()
297 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL2, param->ctrl2); in sru_configure_stream()
342 partition->sru = *window; in sru_partition()
357 struct vsp1_sru *sru; in vsp1_sru_create() local
360 sru = devm_kzalloc(vsp1->dev, sizeof(*sru), GFP_KERNEL); in vsp1_sru_create()
361 if (sru == NULL) in vsp1_sru_create()
364 sru->entity.ops = &sru_entity_ops; in vsp1_sru_create()
365 sru->entity.type = VSP1_ENTITY_SRU; in vsp1_sru_create()
367 ret = vsp1_entity_init(vsp1, &sru->entity, "sru", 2, &sru_ops, in vsp1_sru_create()
373 v4l2_ctrl_handler_init(&sru->ctrls, 1); in vsp1_sru_create()
374 v4l2_ctrl_new_custom(&sru->ctrls, &sru_intensity_control, NULL); in vsp1_sru_create()
376 sru->intensity = 1; in vsp1_sru_create()
378 sru->entity.subdev.ctrl_handler = &sru->ctrls; in vsp1_sru_create()
380 if (sru->ctrls.error) { in vsp1_sru_create()
382 ret = sru->ctrls.error; in vsp1_sru_create()
383 vsp1_entity_destroy(&sru->entity); in vsp1_sru_create()
387 return sru; in vsp1_sru_create()