Lines Matching full:lut
28 static inline void vsp1_lut_write(struct vsp1_lut *lut, in vsp1_lut_write() argument
40 static int lut_set_table(struct vsp1_lut *lut, struct v4l2_ctrl *ctrl) in lut_set_table() argument
45 dlb = vsp1_dl_body_get(lut->pool); in lut_set_table()
53 spin_lock_irq(&lut->lock); in lut_set_table()
54 swap(lut->lut, dlb); in lut_set_table()
55 spin_unlock_irq(&lut->lock); in lut_set_table()
63 struct vsp1_lut *lut = in lut_s_ctrl() local
68 lut_set_table(lut, ctrl); in lut_s_ctrl()
154 struct vsp1_lut *lut = to_lut(&entity->subdev); in lut_configure_stream() local
156 vsp1_lut_write(lut, dlb, VI6_LUT_CTRL, VI6_LUT_CTRL_EN); in lut_configure_stream()
164 struct vsp1_lut *lut = to_lut(&entity->subdev); in lut_configure_frame() local
168 spin_lock_irqsave(&lut->lock, flags); in lut_configure_frame()
169 lut_dlb = lut->lut; in lut_configure_frame()
170 lut->lut = NULL; in lut_configure_frame()
171 spin_unlock_irqrestore(&lut->lock, flags); in lut_configure_frame()
183 struct vsp1_lut *lut = to_lut(&entity->subdev); in lut_destroy() local
185 vsp1_dl_body_pool_destroy(lut->pool); in lut_destroy()
200 struct vsp1_lut *lut; in vsp1_lut_create() local
203 lut = devm_kzalloc(vsp1->dev, sizeof(*lut), GFP_KERNEL); in vsp1_lut_create()
204 if (lut == NULL) in vsp1_lut_create()
207 spin_lock_init(&lut->lock); in vsp1_lut_create()
209 lut->entity.ops = &lut_entity_ops; in vsp1_lut_create()
210 lut->entity.type = VSP1_ENTITY_LUT; in vsp1_lut_create()
212 ret = vsp1_entity_init(vsp1, &lut->entity, "lut", 2, &lut_ops, in vsp1_lut_create()
222 lut->pool = vsp1_dl_body_pool_create(vsp1, 3, LUT_SIZE, 0); in vsp1_lut_create()
223 if (!lut->pool) in vsp1_lut_create()
227 v4l2_ctrl_handler_init(&lut->ctrls, 1); in vsp1_lut_create()
228 v4l2_ctrl_new_custom(&lut->ctrls, &lut_table_control, NULL); in vsp1_lut_create()
230 lut->entity.subdev.ctrl_handler = &lut->ctrls; in vsp1_lut_create()
232 if (lut->ctrls.error) { in vsp1_lut_create()
233 dev_err(vsp1->dev, "lut: failed to initialize controls\n"); in vsp1_lut_create()
234 ret = lut->ctrls.error; in vsp1_lut_create()
235 vsp1_entity_destroy(&lut->entity); in vsp1_lut_create()
239 v4l2_ctrl_handler_setup(&lut->ctrls); in vsp1_lut_create()
241 return lut; in vsp1_lut_create()