From f5d0f9d6bf581287cd3ddeff6f11136eb8a2cfda Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 17 May 2017 02:20:06 +0300 Subject: v4l: vsp1: Add API to map and unmap DRM buffers through the VSP The display buffers must be mapped for DMA through the device that performs memory access. Expose an API to map and unmap memory through the VSP device to be used by the DU. As all the buffers allocated by the DU driver are coherent, we can skip cache handling when mapping and unmapping them. This will need to be revisited when support for non-coherent buffers will be added to the DU driver. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham [Kieran: Remove unused header] Signed-off-by: Kieran Bingham Acked-by: Mauro Cavalho Chehab --- include/media/vsp1.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/media') diff --git a/include/media/vsp1.h b/include/media/vsp1.h index c135c47b4641..c837383b2013 100644 --- a/include/media/vsp1.h +++ b/include/media/vsp1.h @@ -13,6 +13,7 @@ #ifndef __MEDIA_VSP1_H__ #define __MEDIA_VSP1_H__ +#include #include #include @@ -53,5 +54,7 @@ void vsp1_du_atomic_begin(struct device *dev); int vsp1_du_atomic_update(struct device *dev, unsigned int rpf, const struct vsp1_du_atomic_config *cfg); void vsp1_du_atomic_flush(struct device *dev); +int vsp1_du_map_sg(struct device *dev, struct sg_table *sgt); +void vsp1_du_unmap_sg(struct device *dev, struct sg_table *sgt); #endif /* __MEDIA_VSP1_H__ */ -- cgit v1.2.3