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, sd_state, in sru_enum_frame_size()
135 format = vsp1_entity_get_pad_format(&sru->entity, config, SRU_PAD_SINK); in sru_enum_frame_size()
137 mutex_lock(&sru->entity.lock); in sru_enum_frame_size()
163 mutex_unlock(&sru->entity.lock); in sru_enum_frame_size()
167 static void sru_try_format(struct vsp1_sru *sru, in sru_try_format() argument
188 format = vsp1_entity_get_pad_format(&sru->entity, sd_state, in sru_try_format()
223 struct vsp1_sru *sru = to_sru(subdev); in sru_set_format() local
228 mutex_lock(&sru->entity.lock); in sru_set_format()
230 config = vsp1_entity_get_pad_config(&sru->entity, sd_state, in sru_set_format()
237 sru_try_format(sru, config, fmt->pad, &fmt->format); in sru_set_format()
239 format = vsp1_entity_get_pad_format(&sru->entity, config, fmt->pad); in sru_set_format()
244 format = vsp1_entity_get_pad_format(&sru->entity, config, in sru_set_format()
248 sru_try_format(sru, config, SRU_PAD_SOURCE, format); in sru_set_format()
252 mutex_unlock(&sru->entity.lock); in sru_set_format()
278 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_configure_stream() local
283 input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_configure_stream()
285 output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_configure_stream()
297 param = &vsp1_sru_params[sru->intensity - 1]; in sru_configure_stream()
301 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL0, ctrl0); in sru_configure_stream()
302 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5); in sru_configure_stream()
303 vsp1_sru_write(sru, dlb, VI6_SRU_CTRL2, param->ctrl2); in sru_configure_stream()
309 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_max_width() local
313 input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_max_width()
315 output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_max_width()
335 struct vsp1_sru *sru = to_sru(&entity->subdev); in sru_partition() local
339 input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_partition()
341 output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config, in sru_partition()
350 partition->sru = *window; in sru_partition()
365 struct vsp1_sru *sru; in vsp1_sru_create() local
368 sru = devm_kzalloc(vsp1->dev, sizeof(*sru), GFP_KERNEL); in vsp1_sru_create()
369 if (sru == NULL) in vsp1_sru_create()
372 sru->entity.ops = &sru_entity_ops; in vsp1_sru_create()
373 sru->entity.type = VSP1_ENTITY_SRU; in vsp1_sru_create()
375 ret = vsp1_entity_init(vsp1, &sru->entity, "sru", 2, &sru_ops, in vsp1_sru_create()
381 v4l2_ctrl_handler_init(&sru->ctrls, 1); in vsp1_sru_create()
382 v4l2_ctrl_new_custom(&sru->ctrls, &sru_intensity_control, NULL); in vsp1_sru_create()
384 sru->intensity = 1; in vsp1_sru_create()
386 sru->entity.subdev.ctrl_handler = &sru->ctrls; in vsp1_sru_create()
388 if (sru->ctrls.error) { in vsp1_sru_create()
390 ret = sru->ctrls.error; in vsp1_sru_create()
391 vsp1_entity_destroy(&sru->entity); in vsp1_sru_create()
395 return sru; in vsp1_sru_create()