summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1/vsp1_drm.h
diff options
context:
space:
mode:
authorKieran Bingham2017-03-04 03:01:17 +0100
committerKieran Bingham2017-05-22 17:15:34 +0200
commitd7ade201ae7fa253808e42a4001a7738b9f69772 (patch)
treeef3acd04254623960bbff736cf2cbdfbdaf180a5 /drivers/media/platform/vsp1/vsp1_drm.h
parentv4l: vsp1: Postpone frame end handling in event of display list race (diff)
downloadkernel-qcow2-linux-d7ade201ae7fa253808e42a4001a7738b9f69772.tar.gz
kernel-qcow2-linux-d7ade201ae7fa253808e42a4001a7738b9f69772.tar.xz
kernel-qcow2-linux-d7ade201ae7fa253808e42a4001a7738b9f69772.zip
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 <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_drm.h')
-rw-r--r--drivers/media/platform/vsp1/vsp1_drm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drm.h b/drivers/media/platform/vsp1/vsp1_drm.h
index c8d2f88fc483..e9f80727ff92 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.h
+++ b/drivers/media/platform/vsp1/vsp1_drm.h
@@ -23,6 +23,8 @@
* @num_inputs: number of active pipeline inputs at the beginning of an update
* @inputs: source crop rectangle, destination compose rectangle and z-order
* position for every input
+ * @du_complete: frame completion callback for the DU driver (optional)
+ * @du_private: data to be passed to the du_complete callback
*/
struct vsp1_drm {
struct vsp1_pipeline pipe;
@@ -33,8 +35,17 @@ struct vsp1_drm {
struct v4l2_rect compose;
unsigned int zpos;
} inputs[VSP1_MAX_RPF];
+
+ /* Frame synchronisation */
+ void (*du_complete)(void *);
+ void *du_private;
};
+static inline struct vsp1_drm *to_vsp1_drm(struct vsp1_pipeline *pipe)
+{
+ return container_of(pipe, struct vsp1_drm, pipe);
+}
+
int vsp1_drm_init(struct vsp1_device *vsp1);
void vsp1_drm_cleanup(struct vsp1_device *vsp1);
int vsp1_drm_create_links(struct vsp1_device *vsp1);