From 09e513e390eab1f2db4d4242ef209cbe0c39c444 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 21 Feb 2019 03:38:06 +0200 Subject: media: vsp1: drm: Extend frame completion API to the DU driver The VSP1 driver will need to pass extra flags to the DU through the frame completion API. Replace the completed bool flag by a bitmask to support this. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Mauro Carvalho Chehab --- include/media/vsp1.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/media') diff --git a/include/media/vsp1.h b/include/media/vsp1.h index 1cf868360701..877496936487 100644 --- a/include/media/vsp1.h +++ b/include/media/vsp1.h @@ -17,6 +17,8 @@ struct device; int vsp1_du_init(struct device *dev); +#define VSP1_DU_STATUS_COMPLETE BIT(0) + /** * struct vsp1_du_lif_config - VSP LIF configuration * @width: output frame width @@ -32,7 +34,7 @@ struct vsp1_du_lif_config { unsigned int height; bool interlaced; - void (*callback)(void *data, bool completed, u32 crc); + void (*callback)(void *data, unsigned int status, u32 crc); void *callback_data; }; -- cgit From a63722aeb76c65f39c98c66a1e730a2f3da123ab Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 21 Feb 2019 03:46:42 +0200 Subject: media: vsp1: drm: Implement writeback support Extend the vsp1_du_atomic_flush() API with writeback support by adding format, pitch and memory addresses of the writeback framebuffer. Writeback completion is reported through the existing frame completion callback with a new VSP1_DU_STATUS_WRITEBACK status flag. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Mauro Carvalho Chehab --- include/media/vsp1.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/media') diff --git a/include/media/vsp1.h b/include/media/vsp1.h index 877496936487..cc1b0d42ce95 100644 --- a/include/media/vsp1.h +++ b/include/media/vsp1.h @@ -18,6 +18,7 @@ struct device; int vsp1_du_init(struct device *dev); #define VSP1_DU_STATUS_COMPLETE BIT(0) +#define VSP1_DU_STATUS_WRITEBACK BIT(1) /** * struct vsp1_du_lif_config - VSP LIF configuration @@ -83,12 +84,26 @@ struct vsp1_du_crc_config { unsigned int index; }; +/** + * struct vsp1_du_writeback_config - VSP writeback configuration parameters + * @pixelformat: plane pixel format (V4L2 4CC) + * @pitch: line pitch in bytes for the first plane + * @mem: DMA memory address for each plane of the frame buffer + */ +struct vsp1_du_writeback_config { + u32 pixelformat; + unsigned int pitch; + dma_addr_t mem[3]; +}; + /** * struct vsp1_du_atomic_pipe_config - VSP atomic pipe configuration parameters * @crc: CRC computation configuration + * @writeback: writeback configuration */ struct vsp1_du_atomic_pipe_config { struct vsp1_du_crc_config crc; + struct vsp1_du_writeback_config writeback; }; void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index); -- cgit