Lines Matching refs:brx

29 static inline void vsp1_brx_write(struct vsp1_brx *brx,  in vsp1_brx_write()  argument
32 vsp1_dl_body_write(dlb, brx->base + reg, data); in vsp1_brx_write()
41 struct vsp1_brx *brx = in brx_s_ctrl() local
46 brx->bgcolor = ctrl->val; in brx_s_ctrl()
99 static struct v4l2_rect *brx_get_compose(struct vsp1_brx *brx, in brx_get_compose() argument
103 return v4l2_subdev_get_try_compose(&brx->entity.subdev, sd_state, pad); in brx_get_compose()
106 static void brx_try_format(struct vsp1_brx *brx, in brx_try_format() argument
122 format = vsp1_entity_get_pad_format(&brx->entity, sd_state, in brx_try_format()
138 struct vsp1_brx *brx = to_brx(subdev); in brx_set_format() local
143 mutex_lock(&brx->entity.lock); in brx_set_format()
145 config = vsp1_entity_get_pad_config(&brx->entity, sd_state, in brx_set_format()
152 brx_try_format(brx, config, fmt->pad, &fmt->format); in brx_set_format()
154 format = vsp1_entity_get_pad_format(&brx->entity, config, fmt->pad); in brx_set_format()
158 if (fmt->pad != brx->entity.source_pad) { in brx_set_format()
161 compose = brx_get_compose(brx, config, fmt->pad); in brx_set_format()
172 for (i = 0; i <= brx->entity.source_pad; ++i) { in brx_set_format()
173 format = vsp1_entity_get_pad_format(&brx->entity, in brx_set_format()
180 mutex_unlock(&brx->entity.lock); in brx_set_format()
188 struct vsp1_brx *brx = to_brx(subdev); in brx_get_selection() local
191 if (sel->pad == brx->entity.source_pad) in brx_get_selection()
203 config = vsp1_entity_get_pad_config(&brx->entity, sd_state, in brx_get_selection()
208 mutex_lock(&brx->entity.lock); in brx_get_selection()
209 sel->r = *brx_get_compose(brx, config, sel->pad); in brx_get_selection()
210 mutex_unlock(&brx->entity.lock); in brx_get_selection()
222 struct vsp1_brx *brx = to_brx(subdev); in brx_set_selection() local
228 if (sel->pad == brx->entity.source_pad) in brx_set_selection()
234 mutex_lock(&brx->entity.lock); in brx_set_selection()
236 config = vsp1_entity_get_pad_config(&brx->entity, sd_state, in brx_set_selection()
247 format = vsp1_entity_get_pad_format(&brx->entity, config, in brx_set_selection()
248 brx->entity.source_pad); in brx_set_selection()
256 format = vsp1_entity_get_pad_format(&brx->entity, config, sel->pad); in brx_set_selection()
260 compose = brx_get_compose(brx, config, sel->pad); in brx_set_selection()
264 mutex_unlock(&brx->entity.lock); in brx_set_selection()
291 struct vsp1_brx *brx = to_brx(&entity->subdev); in brx_configure_stream() local
296 format = vsp1_entity_get_pad_format(&brx->entity, brx->entity.config, in brx_configure_stream()
297 brx->entity.source_pad); in brx_configure_stream()
311 vsp1_brx_write(brx, dlb, VI6_BRU_INCTRL, in brx_configure_stream()
319 vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_SIZE, in brx_configure_stream()
322 vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_LOC, 0); in brx_configure_stream()
324 vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_COL, brx->bgcolor | in brx_configure_stream()
334 vsp1_brx_write(brx, dlb, VI6_BRU_ROP, in brx_configure_stream()
339 for (i = 0; i < brx->entity.source_pad; ++i) { in brx_configure_stream()
349 if (brx->inputs[i].rpf) { in brx_configure_stream()
352 premultiplied = brx->inputs[i].rpf->format.flags in brx_configure_stream()
376 vsp1_brx_write(brx, dlb, VI6_BRU_CTRL(i), ctrl); in brx_configure_stream()
391 vsp1_brx_write(brx, dlb, VI6_BRU_BLD(i), in brx_configure_stream()
412 struct vsp1_brx *brx; in vsp1_brx_create() local
417 brx = devm_kzalloc(vsp1->dev, sizeof(*brx), GFP_KERNEL); in vsp1_brx_create()
418 if (brx == NULL) in vsp1_brx_create()
421 brx->base = type == VSP1_ENTITY_BRU ? VI6_BRU_BASE : VI6_BRS_BASE; in vsp1_brx_create()
422 brx->entity.ops = &brx_entity_ops; in vsp1_brx_create()
423 brx->entity.type = type; in vsp1_brx_create()
433 ret = vsp1_entity_init(vsp1, &brx->entity, name, num_pads, &brx_ops, in vsp1_brx_create()
439 v4l2_ctrl_handler_init(&brx->ctrls, 1); in vsp1_brx_create()
440 v4l2_ctrl_new_std(&brx->ctrls, &brx_ctrl_ops, V4L2_CID_BG_COLOR, in vsp1_brx_create()
443 brx->bgcolor = 0; in vsp1_brx_create()
445 brx->entity.subdev.ctrl_handler = &brx->ctrls; in vsp1_brx_create()
447 if (brx->ctrls.error) { in vsp1_brx_create()
449 ret = brx->ctrls.error; in vsp1_brx_create()
450 vsp1_entity_destroy(&brx->entity); in vsp1_brx_create()
454 return brx; in vsp1_brx_create()