Ejemplo n.º 1
0
static void lut_configure(struct vsp1_entity *entity,
			  struct vsp1_pipeline *pipe,
			  struct vsp1_dl_list *dl,
			  enum vsp1_entity_params params)
{
	struct vsp1_lut *lut = to_lut(&entity->subdev);
	struct vsp1_dl_body *dlb;
	unsigned long flags;

	switch (params) {
	case VSP1_ENTITY_PARAMS_INIT:
		vsp1_lut_write(lut, dl, VI6_LUT_CTRL, VI6_LUT_CTRL_EN);
		break;

	case VSP1_ENTITY_PARAMS_PARTITION:
		break;

	case VSP1_ENTITY_PARAMS_RUNTIME:
		spin_lock_irqsave(&lut->lock, flags);
		dlb = lut->lut;
		lut->lut = NULL;
		spin_unlock_irqrestore(&lut->lock, flags);

		if (dlb)
			vsp1_dl_list_add_fragment(dl, dlb);
		break;
	}
}
Ejemplo n.º 2
0
static int lut_s_stream(struct v4l2_subdev *subdev, int enable)
{
    struct vsp1_lut *lut = to_lut(subdev);

    if (!enable)
        return 0;

    vsp1_lut_write(lut, VI6_LUT_CTRL, VI6_LUT_CTRL_EN);

    return 0;
}
Ejemplo n.º 3
0
static void lut_configure(struct vsp1_entity *entity,
			  struct vsp1_pipeline *pipe,
			  struct vsp1_dl_list *dl)
{
	struct vsp1_lut *lut = to_lut(&entity->subdev);

	vsp1_lut_write(lut, dl, VI6_LUT_CTRL, VI6_LUT_CTRL_EN);

	mutex_lock(&lut->lock);
	if (lut->lut) {
		vsp1_dl_list_add_fragment(dl, lut->lut);
		lut->lut = NULL;
	}
	mutex_unlock(&lut->lock);
}
Ejemplo n.º 4
0
static void lut_configure(struct vsp1_entity *entity,
			  struct vsp1_pipeline *pipe,
			  struct vsp1_dl_list *dl, bool full)
{
	struct vsp1_lut *lut = to_lut(&entity->subdev);
	struct vsp1_dl_body *dlb;
	unsigned long flags;

	if (full) {
		vsp1_lut_write(lut, dl, VI6_LUT_CTRL, VI6_LUT_CTRL_EN);
		return;
	}

	spin_lock_irqsave(&lut->lock, flags);
	dlb = lut->lut;
	lut->lut = NULL;
	spin_unlock_irqrestore(&lut->lock, flags);

	if (dlb)
		vsp1_dl_list_add_fragment(dl, dlb);
}