Lines Matching full:clu

28 static inline void vsp1_clu_write(struct vsp1_clu *clu,  in vsp1_clu_write()  argument
43 static int clu_set_table(struct vsp1_clu *clu, struct v4l2_ctrl *ctrl) in clu_set_table() argument
48 dlb = vsp1_dl_body_get(clu->pool); in clu_set_table()
56 spin_lock_irq(&clu->lock); in clu_set_table()
57 swap(clu->clu, dlb); in clu_set_table()
58 spin_unlock_irq(&clu->lock); in clu_set_table()
66 struct vsp1_clu *clu = in clu_s_ctrl() local
71 clu_set_table(clu, ctrl); in clu_s_ctrl()
75 clu->mode = ctrl->val; in clu_s_ctrl()
178 struct vsp1_clu *clu = to_clu(&entity->subdev); in clu_configure_stream() local
186 clu->yuv_mode = format->code == MEDIA_BUS_FMT_AYUV8_1X32; in clu_configure_stream()
194 struct vsp1_clu *clu = to_clu(&entity->subdev); in clu_configure_frame() local
200 if (clu->mode == V4L2_CID_VSP1_CLU_MODE_2D && clu->yuv_mode) in clu_configure_frame()
205 vsp1_clu_write(clu, dlb, VI6_CLU_CTRL, ctrl); in clu_configure_frame()
207 spin_lock_irqsave(&clu->lock, flags); in clu_configure_frame()
208 clu_dlb = clu->clu; in clu_configure_frame()
209 clu->clu = NULL; in clu_configure_frame()
210 spin_unlock_irqrestore(&clu->lock, flags); in clu_configure_frame()
222 struct vsp1_clu *clu = to_clu(&entity->subdev); in clu_destroy() local
224 vsp1_dl_body_pool_destroy(clu->pool); in clu_destroy()
239 struct vsp1_clu *clu; in vsp1_clu_create() local
242 clu = devm_kzalloc(vsp1->dev, sizeof(*clu), GFP_KERNEL); in vsp1_clu_create()
243 if (clu == NULL) in vsp1_clu_create()
246 spin_lock_init(&clu->lock); in vsp1_clu_create()
248 clu->entity.ops = &clu_entity_ops; in vsp1_clu_create()
249 clu->entity.type = VSP1_ENTITY_CLU; in vsp1_clu_create()
251 ret = vsp1_entity_init(vsp1, &clu->entity, "clu", 2, &clu_ops, in vsp1_clu_create()
262 clu->pool = vsp1_dl_body_pool_create(clu->entity.vsp1, 3, CLU_SIZE + 1, in vsp1_clu_create()
264 if (!clu->pool) in vsp1_clu_create()
268 v4l2_ctrl_handler_init(&clu->ctrls, 2); in vsp1_clu_create()
269 v4l2_ctrl_new_custom(&clu->ctrls, &clu_table_control, NULL); in vsp1_clu_create()
270 v4l2_ctrl_new_custom(&clu->ctrls, &clu_mode_control, NULL); in vsp1_clu_create()
272 clu->entity.subdev.ctrl_handler = &clu->ctrls; in vsp1_clu_create()
274 if (clu->ctrls.error) { in vsp1_clu_create()
275 dev_err(vsp1->dev, "clu: failed to initialize controls\n"); in vsp1_clu_create()
276 ret = clu->ctrls.error; in vsp1_clu_create()
277 vsp1_entity_destroy(&clu->entity); in vsp1_clu_create()
281 v4l2_ctrl_handler_setup(&clu->ctrls); in vsp1_clu_create()
283 return clu; in vsp1_clu_create()