diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-17 17:23:23 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 23:52:36 +0300 |
commit | 5243453472e7bce74764ddf9f206450dcc8769c5 (patch) | |
tree | f23eb718b6c6e5df792bce7c7b87b9c19d4af606 /drivers/media/platform/vsp1/vsp1_entity.h | |
parent | 823329dfee7224712569cc4899720bc470a2fe56 (diff) | |
download | linux-5243453472e7bce74764ddf9f206450dcc8769c5.tar.xz |
[media] v4l: vsp1: Consolidate entity ops in a struct vsp1_entity_operations
Entities have two operations, a destroy operation stored directly in
vsp1_entity and a set_memory operation stored in a vsp1_rwpf_operations
structure. Move the two to a more generic vsp1_entity_operations
structure that will serve to implement additional operations.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_entity.h')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_entity.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h index d76090059ced..0fdda82a8d9a 100644 --- a/drivers/media/platform/vsp1/vsp1_entity.h +++ b/drivers/media/platform/vsp1/vsp1_entity.h @@ -53,10 +53,22 @@ struct vsp1_route { unsigned int inputs[VSP1_ENTITY_MAX_INPUTS]; }; +/** + * struct vsp1_entity_operations - Entity operations + * @destroy: Destroy the entity. + * @set_memory: Setup memory buffer access. This operation applies the settings + * stored in the rwpf mem field to the hardware. Valid for RPF and + * WPF only. + */ +struct vsp1_entity_operations { + void (*destroy)(struct vsp1_entity *); + void (*set_memory)(struct vsp1_entity *); +}; + struct vsp1_entity { struct vsp1_device *vsp1; - void (*destroy)(struct vsp1_entity *); + const struct vsp1_entity_operations *ops; enum vsp1_entity_type type; unsigned int index; |