Lines Matching defs:clu

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