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 void brx_try_format(struct vsp1_brx *brx, in brx_try_format() argument
131 struct vsp1_brx *brx = to_brx(subdev); in brx_set_format() local
136 mutex_lock(&brx->entity.lock); in brx_set_format()
138 state = vsp1_entity_get_state(&brx->entity, sd_state, fmt->which); in brx_set_format()
144 brx_try_format(brx, state, fmt->pad, &fmt->format); in brx_set_format()
150 if (fmt->pad != brx->entity.source_pad) { in brx_set_format()
164 for (i = 0; i <= brx->entity.source_pad; ++i) { in brx_set_format()
171 mutex_unlock(&brx->entity.lock); in brx_set_format()
179 struct vsp1_brx *brx = to_brx(subdev); in brx_get_selection() local
182 if (sel->pad == brx->entity.source_pad) in brx_get_selection()
194 state = vsp1_entity_get_state(&brx->entity, sd_state, in brx_get_selection()
199 mutex_lock(&brx->entity.lock); in brx_get_selection()
201 mutex_unlock(&brx->entity.lock); in brx_get_selection()
213 struct vsp1_brx *brx = to_brx(subdev); in brx_set_selection() local
219 if (sel->pad == brx->entity.source_pad) in brx_set_selection()
225 mutex_lock(&brx->entity.lock); in brx_set_selection()
227 state = vsp1_entity_get_state(&brx->entity, sd_state, sel->which); in brx_set_selection()
237 format = v4l2_subdev_state_get_format(state, brx->entity.source_pad); in brx_set_selection()
253 mutex_unlock(&brx->entity.lock); in brx_set_selection()
280 struct vsp1_brx *brx = to_brx(&entity->subdev); in brx_configure_stream() local
285 format = v4l2_subdev_state_get_format(state, brx->entity.source_pad); in brx_configure_stream()
299 vsp1_brx_write(brx, dlb, VI6_BRU_INCTRL, in brx_configure_stream()
307 vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_SIZE, in brx_configure_stream()
310 vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_LOC, 0); in brx_configure_stream()
312 vsp1_brx_write(brx, dlb, VI6_BRU_VIRRPF_COL, brx->bgcolor | in brx_configure_stream()
322 vsp1_brx_write(brx, dlb, VI6_BRU_ROP, in brx_configure_stream()
327 for (i = 0; i < brx->entity.source_pad; ++i) { in brx_configure_stream()
337 if (brx->inputs[i].rpf) { in brx_configure_stream()
340 premultiplied = brx->inputs[i].rpf->format.flags in brx_configure_stream()
364 vsp1_brx_write(brx, dlb, VI6_BRU_CTRL(i), ctrl); in brx_configure_stream()
379 vsp1_brx_write(brx, dlb, VI6_BRU_BLD(i), in brx_configure_stream()
400 struct vsp1_brx *brx; in vsp1_brx_create() local
405 brx = devm_kzalloc(vsp1->dev, sizeof(*brx), GFP_KERNEL); in vsp1_brx_create()
406 if (brx == NULL) in vsp1_brx_create()
409 brx->base = type == VSP1_ENTITY_BRU ? VI6_BRU_BASE : VI6_BRS_BASE; in vsp1_brx_create()
410 brx->entity.ops = &brx_entity_ops; in vsp1_brx_create()
411 brx->entity.type = type; in vsp1_brx_create()
421 ret = vsp1_entity_init(vsp1, &brx->entity, name, num_pads, &brx_ops, in vsp1_brx_create()
427 v4l2_ctrl_handler_init(&brx->ctrls, 1); in vsp1_brx_create()
428 v4l2_ctrl_new_std(&brx->ctrls, &brx_ctrl_ops, V4L2_CID_BG_COLOR, in vsp1_brx_create()
431 brx->bgcolor = 0; in vsp1_brx_create()
433 brx->entity.subdev.ctrl_handler = &brx->ctrls; in vsp1_brx_create()
435 if (brx->ctrls.error) { in vsp1_brx_create()
437 ret = brx->ctrls.error; in vsp1_brx_create()
438 vsp1_entity_destroy(&brx->entity); in vsp1_brx_create()
442 return brx; in vsp1_brx_create()