From d7ade201ae7fa253808e42a4001a7738b9f69772 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Sat, 4 Mar 2017 02:01:17 +0000 Subject: v4l: vsp1: Extend VSP1 module API to allow DRM callbacks To be able to perform page flips in DRM without flicker we need to be able to notify the rcar-du module when the VSP has completed its processing. We must not have bidirectional dependencies on the two components to maintain support for loadable modules, thus we extend the API to allow a callback to be registered within the VSP DRM interface. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab --- include/media/vsp1.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/media/vsp1.h b/include/media/vsp1.h index 38aac554dbba..c135c47b4641 100644 --- a/include/media/vsp1.h +++ b/include/media/vsp1.h @@ -24,10 +24,17 @@ int vsp1_du_init(struct device *dev); * struct vsp1_du_lif_config - VSP LIF configuration * @width: output frame width * @height: output frame height + * @callback: frame completion callback function (optional). When a callback + * is provided, the VSP driver guarantees that it will be called once + * and only once for each vsp1_du_atomic_flush() call. + * @callback_data: data to be passed to the frame completion callback */ struct vsp1_du_lif_config { unsigned int width; unsigned int height; + + void (*callback)(void *); + void *callback_data; }; int vsp1_du_setup_lif(struct device *dev, const struct vsp1_du_lif_config *cfg); -- cgit v1.2.3