diff options
author | Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> | 2018-05-18 16:42:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-25 19:04:35 -0400 |
commit | 12832dd9dde9241a3fcb38ab6ca40d13780476f4 (patch) | |
tree | 614cb0ac87a75e8dc625c5b932ce5da59f9ab7e1 /drivers/media/platform/vsp1/vsp1_entity.c | |
parent | 46ce3639a579c29dc3166a9a66522f72f11f560c (diff) | |
download | blackbird-op-linux-12832dd9dde9241a3fcb38ab6ca40d13780476f4.tar.gz blackbird-op-linux-12832dd9dde9241a3fcb38ab6ca40d13780476f4.zip |
media: vsp1: Adapt entities to configure into a body
Currently the entities store their configurations into a display list.
Adapt this such that the code can be configured into a body directly,
allowing greater flexibility and control of the content.
All users of vsp1_dl_list_write() are removed in this process, thus it
too is removed.
A helper, vsp1_dl_list_get_body0() is provided to access the internal body0
from the display list.
[laurent.pinchart+renesas@ideasonboard.com: Don't remove blank line unnecessarily]
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_entity.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_entity.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c index 73f6611ec279..da276a85aa95 100644 --- a/drivers/media/platform/vsp1/vsp1_entity.c +++ b/drivers/media/platform/vsp1/vsp1_entity.c @@ -22,7 +22,7 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity, struct vsp1_pipeline *pipe, - struct vsp1_dl_list *dl) + struct vsp1_dl_body *dlb) { struct vsp1_entity *source; u32 route; @@ -38,7 +38,7 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity, smppt = (pipe->output->entity.index << VI6_DPR_SMPPT_TGW_SHIFT) | (source->route->output << VI6_DPR_SMPPT_PT_SHIFT); - vsp1_dl_list_write(dl, VI6_DPR_HGO_SMPPT, smppt); + vsp1_dl_body_write(dlb, VI6_DPR_HGO_SMPPT, smppt); return; } else if (entity->type == VSP1_ENTITY_HGT) { u32 smppt; @@ -51,7 +51,7 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity, smppt = (pipe->output->entity.index << VI6_DPR_SMPPT_TGW_SHIFT) | (source->route->output << VI6_DPR_SMPPT_PT_SHIFT); - vsp1_dl_list_write(dl, VI6_DPR_HGT_SMPPT, smppt); + vsp1_dl_body_write(dlb, VI6_DPR_HGT_SMPPT, smppt); return; } @@ -66,31 +66,33 @@ void vsp1_entity_route_setup(struct vsp1_entity *entity, */ if (source->type == VSP1_ENTITY_BRS) route |= VI6_DPR_ROUTE_BRSSEL; - vsp1_dl_list_write(dl, source->route->reg, route); + vsp1_dl_body_write(dlb, source->route->reg, route); } void vsp1_entity_configure_stream(struct vsp1_entity *entity, struct vsp1_pipeline *pipe, - struct vsp1_dl_list *dl) + struct vsp1_dl_body *dlb) { if (entity->ops->configure_stream) - entity->ops->configure_stream(entity, pipe, dl); + entity->ops->configure_stream(entity, pipe, dlb); } void vsp1_entity_configure_frame(struct vsp1_entity *entity, struct vsp1_pipeline *pipe, - struct vsp1_dl_list *dl) + struct vsp1_dl_list *dl, + struct vsp1_dl_body *dlb) { if (entity->ops->configure_frame) - entity->ops->configure_frame(entity, pipe, dl); + entity->ops->configure_frame(entity, pipe, dl, dlb); } void vsp1_entity_configure_partition(struct vsp1_entity *entity, struct vsp1_pipeline *pipe, - struct vsp1_dl_list *dl) + struct vsp1_dl_list *dl, + struct vsp1_dl_body *dlb) { if (entity->ops->configure_partition) - entity->ops->configure_partition(entity, pipe, dl); + entity->ops->configure_partition(entity, pipe, dl, dlb); } /* ----------------------------------------------------------------------------- |