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 config = vsp1_entity_get_pad_config(&sru->entity, cfg, fse->which); in sru_enum_frame_size()
134 format = vsp1_entity_get_pad_format(&sru->entity, config, SRU_PAD_SINK); 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
187 format = vsp1_entity_get_pad_format(&sru->entity, config, in sru_try_format()
222 struct vsp1_sru *sru = to_sru(subdev); in sru_set_format() local
227 mutex_lock(&sru->entity.lock); in sru_set_format()
229 config = vsp1_entity_get_pad_config(&sru->entity, cfg, fmt->which); in sru_set_format()
235 sru_try_format(sru, config, fmt->pad, &fmt->format); in sru_set_format()
237 format = vsp1_entity_get_pad_format(&sru->entity, config, fmt->pad); in sru_set_format()
242 format = vsp1_entity_get_pad_format(&sru->entity, config, in sru_set_format()
246 sru_try_format(sru, config, SRU_PAD_SOURCE, format); in sru_set_format()
250 mutex_unlock(&sru->entity.lock); in sru_set_format()
275 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_configure_stream() local
280 input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_configure_stream()
282 output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_configure_stream()
294 param = &vsp1_sru_params[sru->intensity - 1]; in sru_configure_stream()
298 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL0, ctrl0); in sru_configure_stream()
299 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5); in sru_configure_stream()
300 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL2, param->ctrl2); in sru_configure_stream()
306 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_max_width() local
310 input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_max_width()
312 output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_max_width()
327 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_partition() local
331 input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_partition()
333 output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_partition()
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()