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 <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Kieran Bingham 2017-03-04 02:01:17 +00:00
commit d7ade201ae
3 changed files with 35 additions and 0 deletions

View file

@ -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);