[media] v4l: vsp1: Remove redundant pipe->dl usage from drm
The pipe->dl is used only inside vsp1_du_atomic_flush(), and can be obtained and stored locally to simplify the code. Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
4461c84b52
commit
f2074708ee
@ -219,9 +219,6 @@ void vsp1_du_atomic_begin(struct device *dev)
|
|||||||
struct vsp1_pipeline *pipe = &vsp1->drm->pipe;
|
struct vsp1_pipeline *pipe = &vsp1->drm->pipe;
|
||||||
|
|
||||||
vsp1->drm->num_inputs = pipe->num_inputs;
|
vsp1->drm->num_inputs = pipe->num_inputs;
|
||||||
|
|
||||||
/* Prepare the display list. */
|
|
||||||
pipe->dl = vsp1_dl_list_get(pipe->output->dlm);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
|
EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
|
||||||
|
|
||||||
@ -425,10 +422,14 @@ void vsp1_du_atomic_flush(struct device *dev)
|
|||||||
struct vsp1_pipeline *pipe = &vsp1->drm->pipe;
|
struct vsp1_pipeline *pipe = &vsp1->drm->pipe;
|
||||||
struct vsp1_rwpf *inputs[VSP1_MAX_RPF] = { NULL, };
|
struct vsp1_rwpf *inputs[VSP1_MAX_RPF] = { NULL, };
|
||||||
struct vsp1_entity *entity;
|
struct vsp1_entity *entity;
|
||||||
|
struct vsp1_dl_list *dl;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* Prepare the display list. */
|
||||||
|
dl = vsp1_dl_list_get(pipe->output->dlm);
|
||||||
|
|
||||||
/* Count the number of enabled inputs and sort them by Z-order. */
|
/* Count the number of enabled inputs and sort them by Z-order. */
|
||||||
pipe->num_inputs = 0;
|
pipe->num_inputs = 0;
|
||||||
|
|
||||||
@ -483,26 +484,25 @@ void vsp1_du_atomic_flush(struct device *dev)
|
|||||||
struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev);
|
struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev);
|
||||||
|
|
||||||
if (!pipe->inputs[rpf->entity.index]) {
|
if (!pipe->inputs[rpf->entity.index]) {
|
||||||
vsp1_dl_list_write(pipe->dl, entity->route->reg,
|
vsp1_dl_list_write(dl, entity->route->reg,
|
||||||
VI6_DPR_NODE_UNUSED);
|
VI6_DPR_NODE_UNUSED);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vsp1_entity_route_setup(entity, pipe->dl);
|
vsp1_entity_route_setup(entity, dl);
|
||||||
|
|
||||||
if (entity->ops->configure) {
|
if (entity->ops->configure) {
|
||||||
entity->ops->configure(entity, pipe, pipe->dl,
|
entity->ops->configure(entity, pipe, dl,
|
||||||
VSP1_ENTITY_PARAMS_INIT);
|
VSP1_ENTITY_PARAMS_INIT);
|
||||||
entity->ops->configure(entity, pipe, pipe->dl,
|
entity->ops->configure(entity, pipe, dl,
|
||||||
VSP1_ENTITY_PARAMS_RUNTIME);
|
VSP1_ENTITY_PARAMS_RUNTIME);
|
||||||
entity->ops->configure(entity, pipe, pipe->dl,
|
entity->ops->configure(entity, pipe, dl,
|
||||||
VSP1_ENTITY_PARAMS_PARTITION);
|
VSP1_ENTITY_PARAMS_PARTITION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vsp1_dl_list_commit(pipe->dl);
|
vsp1_dl_list_commit(dl);
|
||||||
pipe->dl = NULL;
|
|
||||||
|
|
||||||
/* Start or stop the pipeline if needed. */
|
/* Start or stop the pipeline if needed. */
|
||||||
if (!vsp1->drm->num_inputs && pipe->num_inputs) {
|
if (!vsp1->drm->num_inputs && pipe->num_inputs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user