linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch 00/35] media: ti-vpe: fixes and enhancements
@ 2016-09-28 21:16 Benoit Parrot
  2016-09-28 21:16 ` [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module Benoit Parrot
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Benoit Parrot @ 2016-09-28 21:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel, Benoit Parrot

This patch series is to publish a number of enhancements
we have been carrying for a while.

A number of bug fixes and feature enhancements have been
included.

We also need to prepare the way for the introduction of
the VIP (Video Input Port) driver (coming soon) which
has internal IP module in common with VPE.

The relevant modules (vpdma, sc and csc) are therefore converted
into individual kernel modules.

Archit Taneja (1):
  media: ti-vpe: Use line average de-interlacing for first 2 frames

Benoit Parrot (16):
  media: ti-vpe: vpdma: Make vpdma library into its own module
  media: ti-vpe: vpdma: Add multi-instance and multi-client support
  media: ti-vpe: vpdma: Add helper to set a background color
  media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor
  media: ti-vpe: vpe: Added MODULE_DEVICE_TABLE hint
  media: ti-vpe: vpdma: Corrected YUV422 data type label.
  media: ti-vpe: vpdma: RGB data type yield inverted data
  media: ti-vpe: vpe: Fix vb2 buffer cleanup
  media: ti-vpe: vpe: Enable DMABUF export
  media: ti-vpe: Make scaler library into its own module
  media: ti-vpe: scaler: Add debug support for multi-instance
  media: ti-vpe: vpe: Make sure frame size dont exceed scaler capacity
  media: ti-vpe: vpdma: Add RAW8 and RAW16 data types
  media: ti-vpe: Make colorspace converter library into its own module
  media: ti-vpe: csc: Add debug support for multi-instance
  media: ti-vpe: vpe: Add proper support single and multi-plane buffer

Harinarayan Bhatta (2):
  media: ti-vpe: Increasing max buffer height and width
  media: ti-vpe: Free vpdma buffers in vpe_release

Nikhil Devshatwar (16):
  media: ti-vpe: vpe: Do not perform job transaction atomically
  media: ti-vpe: Add support for SEQ_TB buffers
  media: ti-vpe: vpe: Return NULL for invalid buffer type
  media: ti-vpe: vpdma: Add support for setting max width height
  media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs
  media: ti-vpe: vpdma: Make list post atomic operation
  media: ti-vpe: vpdma: Clear IRQs for individual lists
  media: ti-vpe: vpe: configure line mode separately
  media: ti-vpe: vpe: Setup srcdst parameters in start_streaming
  media: ti-vpe: vpe: Post next descriptor only for list complete IRQ
  media: ti-vpe: vpe: Add RGB565 and RGB5551 support
  media: ti-vpe: vpdma: allocate and maintain hwlist
  media: ti-vpe: sc: Fix incorrect optimization
  media: ti-vpe: vpdma: Fix race condition for firmware loading
  media: ti-vpe: vpdma: Use bidirectional cached buffers
  media: ti-vpe: vpe: Fix line stride for output motion vector

 drivers/media/platform/Kconfig             |  14 +
 drivers/media/platform/ti-vpe/Makefile     |  10 +-
 drivers/media/platform/ti-vpe/csc.c        |  18 +-
 drivers/media/platform/ti-vpe/csc.h        |   2 +-
 drivers/media/platform/ti-vpe/sc.c         |  28 +-
 drivers/media/platform/ti-vpe/sc.h         |  11 +-
 drivers/media/platform/ti-vpe/vpdma.c      | 349 +++++++++++++++++++---
 drivers/media/platform/ti-vpe/vpdma.h      |  85 +++++-
 drivers/media/platform/ti-vpe/vpdma_priv.h | 130 ++++-----
 drivers/media/platform/ti-vpe/vpe.c        | 450 ++++++++++++++++++++++++-----
 10 files changed, 891 insertions(+), 206 deletions(-)

-- 
2.9.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module
  2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
@ 2016-09-28 21:16 ` Benoit Parrot
  2016-10-17 14:08   ` Hans Verkuil
  2016-09-28 21:16 ` [Patch 02/35] media: ti-vpe: vpdma: Add multi-instance and multi-client support Benoit Parrot
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Benoit Parrot @ 2016-09-28 21:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel, Benoit Parrot

The VPDMA (Video Port DMA) as found in devices such as DRA7xx is
used for both the Video Processing Engine (VPE) and the Video Input
Port (VIP).

In preparation for this we need to turn vpdma into its own
kernel module.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
 drivers/media/platform/Kconfig         |  6 ++++++
 drivers/media/platform/ti-vpe/Makefile |  4 +++-
 drivers/media/platform/ti-vpe/vpdma.c  | 28 +++++++++++++++++++++++++++-
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index f98ed3fd0efd..3c15c5a53bd5 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -334,6 +334,7 @@ config VIDEO_TI_VPE
 	depends on HAS_DMA
 	select VIDEOBUF2_DMA_CONTIG
 	select V4L2_MEM2MEM_DEV
+	select VIDEO_TI_VPDMA
 	default n
 	---help---
 	  Support for the TI VPE(Video Processing Engine) block
@@ -347,6 +348,11 @@ config VIDEO_TI_VPE_DEBUG
 
 endif # V4L_MEM2MEM_DRIVERS
 
+# TI VIDEO PORT Helper Modules
+# These will be selected by VPE and VIP
+config VIDEO_TI_VPDMA
+	tristate
+
 menuconfig V4L_TEST_DRIVERS
 	bool "Media test drivers"
 	depends on MEDIA_CAMERA_SUPPORT
diff --git a/drivers/media/platform/ti-vpe/Makefile b/drivers/media/platform/ti-vpe/Makefile
index e236059a60ad..faca5e115c1d 100644
--- a/drivers/media/platform/ti-vpe/Makefile
+++ b/drivers/media/platform/ti-vpe/Makefile
@@ -1,6 +1,8 @@
 obj-$(CONFIG_VIDEO_TI_VPE) += ti-vpe.o
+obj-$(CONFIG_VIDEO_TI_VPDMA) += ti-vpdma.o
 
-ti-vpe-y := vpe.o sc.o csc.o vpdma.o
+ti-vpe-y := vpe.o sc.o csc.o
+ti-vpdma-y := vpdma.o
 
 ccflags-$(CONFIG_VIDEO_TI_VPE_DEBUG) += -DDEBUG
 
diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
index 3e2e3a33e6ed..e55cb58213bf 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -75,6 +75,7 @@ const struct vpdma_data_format vpdma_yuv_fmts[] = {
 		.depth		= 16,
 	},
 };
+EXPORT_SYMBOL(vpdma_yuv_fmts);
 
 const struct vpdma_data_format vpdma_rgb_fmts[] = {
 	[VPDMA_DATA_FMT_RGB565] = {
@@ -178,6 +179,7 @@ const struct vpdma_data_format vpdma_rgb_fmts[] = {
 		.depth		= 32,
 	},
 };
+EXPORT_SYMBOL(vpdma_rgb_fmts);
 
 const struct vpdma_data_format vpdma_misc_fmts[] = {
 	[VPDMA_DATA_FMT_MV] = {
@@ -186,6 +188,7 @@ const struct vpdma_data_format vpdma_misc_fmts[] = {
 		.depth		= 4,
 	},
 };
+EXPORT_SYMBOL(vpdma_misc_fmts);
 
 struct vpdma_channel_info {
 	int num;		/* VPDMA channel number */
@@ -317,6 +320,7 @@ void vpdma_dump_regs(struct vpdma_data *vpdma)
 	DUMPREG(VIP_UP_UV_CSTAT);
 	DUMPREG(VPI_CTL_CSTAT);
 }
+EXPORT_SYMBOL(vpdma_dump_regs);
 
 /*
  * Allocate a DMA buffer
@@ -333,6 +337,7 @@ int vpdma_alloc_desc_buf(struct vpdma_buf *buf, size_t size)
 
 	return 0;
 }
+EXPORT_SYMBOL(vpdma_alloc_desc_buf);
 
 void vpdma_free_desc_buf(struct vpdma_buf *buf)
 {
@@ -341,6 +346,7 @@ void vpdma_free_desc_buf(struct vpdma_buf *buf)
 	buf->addr = NULL;
 	buf->size = 0;
 }
+EXPORT_SYMBOL(vpdma_free_desc_buf);
 
 /*
  * map descriptor/payload DMA buffer, enabling DMA access
@@ -361,6 +367,7 @@ int vpdma_map_desc_buf(struct vpdma_data *vpdma, struct vpdma_buf *buf)
 
 	return 0;
 }
+EXPORT_SYMBOL(vpdma_map_desc_buf);
 
 /*
  * unmap descriptor/payload DMA buffer, disabling DMA access and
@@ -375,6 +382,7 @@ void vpdma_unmap_desc_buf(struct vpdma_data *vpdma, struct vpdma_buf *buf)
 
 	buf->mapped = false;
 }
+EXPORT_SYMBOL(vpdma_unmap_desc_buf);
 
 /*
  * create a descriptor list, the user of this list will append configuration,
@@ -396,6 +404,7 @@ int vpdma_create_desc_list(struct vpdma_desc_list *list, size_t size, int type)
 
 	return 0;
 }
+EXPORT_SYMBOL(vpdma_create_desc_list);
 
 /*
  * once a descriptor list is parsed by VPDMA, we reset the list by emptying it,
@@ -405,6 +414,7 @@ void vpdma_reset_desc_list(struct vpdma_desc_list *list)
 {
 	list->next = list->buf.addr;
 }
+EXPORT_SYMBOL(vpdma_reset_desc_list);
 
 /*
  * free the buffer allocated fot the VPDMA descriptor list, this should be
@@ -416,11 +426,13 @@ void vpdma_free_desc_list(struct vpdma_desc_list *list)
 
 	list->next = NULL;
 }
+EXPORT_SYMBOL(vpdma_free_desc_list);
 
-static bool vpdma_list_busy(struct vpdma_data *vpdma, int list_num)
+bool vpdma_list_busy(struct vpdma_data *vpdma, int list_num)
 {
 	return read_reg(vpdma, VPDMA_LIST_STAT_SYNC) & BIT(list_num + 16);
 }
+EXPORT_SYMBOL(vpdma_list_busy);
 
 /*
  * submit a list of DMA descriptors to the VPE VPDMA, do not wait for completion
@@ -446,6 +458,7 @@ int vpdma_submit_descs(struct vpdma_data *vpdma, struct vpdma_desc_list *list)
 
 	return 0;
 }
+EXPORT_SYMBOL(vpdma_submit_descs);
 
 static void dump_cfd(struct vpdma_cfd *cfd)
 {
@@ -498,6 +511,7 @@ void vpdma_add_cfd_block(struct vpdma_desc_list *list, int client,
 
 	dump_cfd(cfd);
 }
+EXPORT_SYMBOL(vpdma_add_cfd_block);
 
 /*
  * append a configuration descriptor to the given descriptor list, where the
@@ -526,6 +540,7 @@ void vpdma_add_cfd_adb(struct vpdma_desc_list *list, int client,
 
 	dump_cfd(cfd);
 };
+EXPORT_SYMBOL(vpdma_add_cfd_adb);
 
 /*
  * control descriptor format change based on what type of control descriptor it
@@ -563,6 +578,7 @@ void vpdma_add_sync_on_channel_ctd(struct vpdma_desc_list *list,
 
 	dump_ctd(ctd);
 }
+EXPORT_SYMBOL(vpdma_add_sync_on_channel_ctd);
 
 static void dump_dtd(struct vpdma_dtd *dtd)
 {
@@ -674,6 +690,7 @@ void vpdma_add_out_dtd(struct vpdma_desc_list *list, int width,
 
 	dump_dtd(dtd);
 }
+EXPORT_SYMBOL(vpdma_add_out_dtd);
 
 /*
  * append an inbound data transfer descriptor to the given descriptor list,
@@ -747,6 +764,7 @@ void vpdma_add_in_dtd(struct vpdma_desc_list *list, int width,
 
 	dump_dtd(dtd);
 }
+EXPORT_SYMBOL(vpdma_add_in_dtd);
 
 /* set or clear the mask for list complete interrupt */
 void vpdma_enable_list_complete_irq(struct vpdma_data *vpdma, int list_num,
@@ -761,6 +779,7 @@ void vpdma_enable_list_complete_irq(struct vpdma_data *vpdma, int list_num,
 		val &= ~(1 << (list_num * 2));
 	write_reg(vpdma, VPDMA_INT_LIST0_MASK, val);
 }
+EXPORT_SYMBOL(vpdma_enable_list_complete_irq);
 
 /* clear previosuly occured list intterupts in the LIST_STAT register */
 void vpdma_clear_list_stat(struct vpdma_data *vpdma)
@@ -768,6 +787,7 @@ void vpdma_clear_list_stat(struct vpdma_data *vpdma)
 	write_reg(vpdma, VPDMA_INT_LIST0_STAT,
 		read_reg(vpdma, VPDMA_INT_LIST0_STAT));
 }
+EXPORT_SYMBOL(vpdma_clear_list_stat);
 
 /*
  * configures the output mode of the line buffer for the given client, the
@@ -782,6 +802,7 @@ void vpdma_set_line_mode(struct vpdma_data *vpdma, int line_mode,
 	write_field_reg(vpdma, client_cstat, line_mode,
 		VPDMA_CSTAT_LINE_MODE_MASK, VPDMA_CSTAT_LINE_MODE_SHIFT);
 }
+EXPORT_SYMBOL(vpdma_set_line_mode);
 
 /*
  * configures the event which should trigger VPDMA transfer for the given
@@ -796,6 +817,7 @@ void vpdma_set_frame_start_event(struct vpdma_data *vpdma,
 	write_field_reg(vpdma, client_cstat, fs_event,
 		VPDMA_CSTAT_FRAME_START_MASK, VPDMA_CSTAT_FRAME_START_SHIFT);
 }
+EXPORT_SYMBOL(vpdma_set_frame_start_event);
 
 static void vpdma_firmware_cb(const struct firmware *f, void *context)
 {
@@ -909,4 +931,8 @@ struct vpdma_data *vpdma_create(struct platform_device *pdev,
 
 	return vpdma;
 }
+EXPORT_SYMBOL(vpdma_create);
+
+MODULE_AUTHOR("Texas Instruments Inc.");
 MODULE_FIRMWARE(VPDMA_FIRMWARE);
+MODULE_LICENSE("GPL v2");
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Patch 02/35] media: ti-vpe: vpdma: Add multi-instance and multi-client support
  2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
  2016-09-28 21:16 ` [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module Benoit Parrot
@ 2016-09-28 21:16 ` Benoit Parrot
  2016-09-28 21:16 ` [Patch 03/35] media: ti-vpe: vpdma: Add helper to set a background color Benoit Parrot
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2016-09-28 21:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel, Benoit Parrot

The VPDMA (Video Port DMA) as found in devices such as DRA7xx is
used for both the Video Processing Engine (VPE) and the Video Input
Port (VIP). Some devices may have multiple VIP instances each with
its own VPDMA engine. Within VIP two slices can use a single VPDMA
engine simultaneously. So support for multi instances and multiple
clients has been added to VPDMA. Needed modification to the existing
helper functions were then reflected to VPE.

Multi-clients registers offset have also been added in preparation.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
 drivers/media/platform/ti-vpe/vpdma.c      | 104 +++++++++++++++++++++++++----
 drivers/media/platform/ti-vpe/vpdma.h      |  25 +++++--
 drivers/media/platform/ti-vpe/vpdma_priv.h |  15 ++++-
 drivers/media/platform/ti-vpe/vpe.c        |   8 +--
 4 files changed, 128 insertions(+), 24 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
index e55cb58213bf..8dfabff216c1 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -437,10 +437,9 @@ EXPORT_SYMBOL(vpdma_list_busy);
 /*
  * submit a list of DMA descriptors to the VPE VPDMA, do not wait for completion
  */
-int vpdma_submit_descs(struct vpdma_data *vpdma, struct vpdma_desc_list *list)
+int vpdma_submit_descs(struct vpdma_data *vpdma,
+			struct vpdma_desc_list *list, int list_num)
 {
-	/* we always use the first list */
-	int list_num = 0;
 	int list_size;
 
 	if (vpdma_list_busy(vpdma, list_num))
@@ -460,6 +459,40 @@ int vpdma_submit_descs(struct vpdma_data *vpdma, struct vpdma_desc_list *list)
 }
 EXPORT_SYMBOL(vpdma_submit_descs);
 
+static void dump_dtd(struct vpdma_dtd *dtd);
+
+void vpdma_update_dma_addr(struct vpdma_data *vpdma,
+	struct vpdma_desc_list *list, dma_addr_t dma_addr,
+	void *write_dtd, int drop, int idx)
+{
+	struct vpdma_dtd *dtd = list->buf.addr;
+	dma_addr_t write_desc_addr;
+	int offset;
+
+	dtd += idx;
+	vpdma_unmap_desc_buf(vpdma, &list->buf);
+
+	dtd->start_addr = dma_addr;
+
+	/* Calculate write address from the offset of write_dtd from start
+	 * of the list->buf
+	 */
+	offset = (void *)write_dtd - list->buf.addr;
+	write_desc_addr = list->buf.dma_addr + offset;
+
+	if (drop)
+		dtd->desc_write_addr = dtd_desc_write_addr(write_desc_addr,
+							   1, 1, 0);
+	else
+		dtd->desc_write_addr = dtd_desc_write_addr(write_desc_addr,
+							   1, 0, 0);
+
+	vpdma_map_desc_buf(vpdma, &list->buf);
+
+	dump_dtd(dtd);
+}
+EXPORT_SYMBOL(vpdma_update_dma_addr);
+
 static void dump_cfd(struct vpdma_cfd *cfd)
 {
 	int class;
@@ -644,6 +677,16 @@ void vpdma_add_out_dtd(struct vpdma_desc_list *list, int width,
 		const struct vpdma_data_format *fmt, dma_addr_t dma_addr,
 		enum vpdma_channel chan, u32 flags)
 {
+	vpdma_rawchan_add_out_dtd(list, width, c_rect, fmt, dma_addr,
+				  chan_info[chan].num, flags);
+}
+EXPORT_SYMBOL(vpdma_add_out_dtd);
+
+void vpdma_rawchan_add_out_dtd(struct vpdma_desc_list *list, int width,
+		const struct v4l2_rect *c_rect,
+		const struct vpdma_data_format *fmt, dma_addr_t dma_addr,
+		int raw_vpdma_chan, u32 flags)
+{
 	int priority = 0;
 	int field = 0;
 	int notify = 1;
@@ -653,7 +696,7 @@ void vpdma_add_out_dtd(struct vpdma_desc_list *list, int width,
 	int stride;
 	struct vpdma_dtd *dtd;
 
-	channel = next_chan = chan_info[chan].num;
+	channel = next_chan = raw_vpdma_chan;
 
 	if (fmt->type == VPDMA_DATA_FMT_TYPE_YUV &&
 			fmt->data_type == DATA_TYPE_C420) {
@@ -690,7 +733,7 @@ void vpdma_add_out_dtd(struct vpdma_desc_list *list, int width,
 
 	dump_dtd(dtd);
 }
-EXPORT_SYMBOL(vpdma_add_out_dtd);
+EXPORT_SYMBOL(vpdma_rawchan_add_out_dtd);
 
 /*
  * append an inbound data transfer descriptor to the given descriptor list,
@@ -767,25 +810,62 @@ void vpdma_add_in_dtd(struct vpdma_desc_list *list, int width,
 EXPORT_SYMBOL(vpdma_add_in_dtd);
 
 /* set or clear the mask for list complete interrupt */
-void vpdma_enable_list_complete_irq(struct vpdma_data *vpdma, int list_num,
-		bool enable)
+void vpdma_enable_list_complete_irq(struct vpdma_data *vpdma, int irq_num,
+		int list_num, bool enable)
 {
+	u32 reg_addr = VPDMA_INT_LIST0_MASK + VPDMA_INTX_OFFSET * irq_num;
 	u32 val;
 
-	val = read_reg(vpdma, VPDMA_INT_LIST0_MASK);
+	val = read_reg(vpdma, reg_addr);
 	if (enable)
 		val |= (1 << (list_num * 2));
 	else
 		val &= ~(1 << (list_num * 2));
-	write_reg(vpdma, VPDMA_INT_LIST0_MASK, val);
+	write_reg(vpdma, reg_addr, val);
 }
 EXPORT_SYMBOL(vpdma_enable_list_complete_irq);
 
+/* set or clear the mask for list complete interrupt */
+void vpdma_enable_list_notify_irq(struct vpdma_data *vpdma, int irq_num,
+		int list_num, bool enable)
+{
+	u32 reg_addr = VPDMA_INT_LIST0_MASK + VPDMA_INTX_OFFSET * irq_num;
+	u32 val;
+
+	val = read_reg(vpdma, reg_addr);
+	if (enable)
+		val |= (1 << ((list_num * 2) + 1));
+	else
+		val &= ~(1 << ((list_num * 2) + 1));
+	write_reg(vpdma, reg_addr, val);
+}
+EXPORT_SYMBOL(vpdma_enable_list_notify_irq);
+
+/* get the LIST_STAT register */
+unsigned int vpdma_get_list_stat(struct vpdma_data *vpdma, int irq_num)
+{
+	u32 reg_addr = VPDMA_INT_LIST0_STAT + VPDMA_INTX_OFFSET * irq_num;
+
+	return read_reg(vpdma, reg_addr);
+}
+EXPORT_SYMBOL(vpdma_get_list_stat);
+
+/* get the LIST_MASK register */
+unsigned int vpdma_get_list_mask(struct vpdma_data *vpdma, int irq_num)
+{
+	u32 reg_addr = VPDMA_INT_LIST0_MASK + VPDMA_INTX_OFFSET * irq_num;
+
+	return read_reg(vpdma, reg_addr);
+}
+EXPORT_SYMBOL(vpdma_get_list_mask);
+
 /* clear previosuly occured list intterupts in the LIST_STAT register */
-void vpdma_clear_list_stat(struct vpdma_data *vpdma)
+void vpdma_clear_list_stat(struct vpdma_data *vpdma, int irq_num)
 {
-	write_reg(vpdma, VPDMA_INT_LIST0_STAT,
-		read_reg(vpdma, VPDMA_INT_LIST0_STAT));
+	u32 reg_addr = VPDMA_INT_LIST0_STAT + VPDMA_INTX_OFFSET * irq_num;
+
+	write_reg(vpdma, reg_addr,
+		read_reg(vpdma, reg_addr));
 }
 EXPORT_SYMBOL(vpdma_clear_list_stat);
 
diff --git a/drivers/media/platform/ti-vpe/vpdma.h b/drivers/media/platform/ti-vpe/vpdma.h
index 2bd8fb050381..83325d887546 100644
--- a/drivers/media/platform/ti-vpe/vpdma.h
+++ b/drivers/media/platform/ti-vpe/vpdma.h
@@ -134,6 +134,11 @@ enum vpdma_channel {
 	VPE_CHAN_RGB_OUT,
 };
 
+#define VIP_CHAN_VIP2_OFFSET		70
+#define VIP_CHAN_MULT_PORTB_OFFSET	16
+#define VIP_CHAN_YUV_PORTB_OFFSET	2
+#define VIP_CHAN_RGB_PORTB_OFFSET	1
+
 /* flags for VPDMA data descriptors */
 #define VPDMA_DATA_ODD_LINE_SKIP	(1 << 0)
 #define VPDMA_DATA_EVEN_LINE_SKIP	(1 << 1)
@@ -177,8 +182,12 @@ void vpdma_unmap_desc_buf(struct vpdma_data *vpdma, struct vpdma_buf *buf);
 int vpdma_create_desc_list(struct vpdma_desc_list *list, size_t size, int type);
 void vpdma_reset_desc_list(struct vpdma_desc_list *list);
 void vpdma_free_desc_list(struct vpdma_desc_list *list);
-int vpdma_submit_descs(struct vpdma_data *vpdma, struct vpdma_desc_list *list);
-
+int vpdma_submit_descs(struct vpdma_data *vpdma, struct vpdma_desc_list *list,
+		       int list_num);
+bool vpdma_list_busy(struct vpdma_data *vpdma, int list_num);
+void vpdma_update_dma_addr(struct vpdma_data *vpdma,
+	struct vpdma_desc_list *list, dma_addr_t dma_addr,
+	void *write_dtd, int drop, int idx);
 /* helpers for creating vpdma descriptors */
 void vpdma_add_cfd_block(struct vpdma_desc_list *list, int client,
 		struct vpdma_buf *blk, u32 dest_offset);
@@ -190,6 +199,10 @@ void vpdma_add_out_dtd(struct vpdma_desc_list *list, int width,
 		const struct v4l2_rect *c_rect,
 		const struct vpdma_data_format *fmt, dma_addr_t dma_addr,
 		enum vpdma_channel chan, u32 flags);
+void vpdma_rawchan_add_out_dtd(struct vpdma_desc_list *list, int width,
+		const struct v4l2_rect *c_rect,
+		const struct vpdma_data_format *fmt, dma_addr_t dma_addr,
+		int raw_vpdma_chan, u32 flags);
 void vpdma_add_in_dtd(struct vpdma_desc_list *list, int width,
 		const struct v4l2_rect *c_rect,
 		const struct vpdma_data_format *fmt, dma_addr_t dma_addr,
@@ -197,9 +210,11 @@ void vpdma_add_in_dtd(struct vpdma_desc_list *list, int width,
 		int frame_height, int start_h, int start_v);
 
 /* vpdma list interrupt management */
-void vpdma_enable_list_complete_irq(struct vpdma_data *vpdma, int list_num,
-		bool enable);
-void vpdma_clear_list_stat(struct vpdma_data *vpdma);
+void vpdma_enable_list_complete_irq(struct vpdma_data *vpdma, int irq_num,
+		int list_num, bool enable);
+void vpdma_clear_list_stat(struct vpdma_data *vpdma, int irq_num);
+unsigned int vpdma_get_list_stat(struct vpdma_data *vpdma, int irq_num);
+unsigned int vpdma_get_list_mask(struct vpdma_data *vpdma, int irq_num);
 
 /* vpdma client configuration */
 void vpdma_set_line_mode(struct vpdma_data *vpdma, int line_mode,
diff --git a/drivers/media/platform/ti-vpe/vpdma_priv.h b/drivers/media/platform/ti-vpe/vpdma_priv.h
index c1a6ce1884f3..65f0c067bed1 100644
--- a/drivers/media/platform/ti-vpe/vpdma_priv.h
+++ b/drivers/media/platform/ti-vpe/vpdma_priv.h
@@ -39,9 +39,11 @@
 #define VPDMA_INT_LIST0_STAT		0x88
 #define VPDMA_INT_LIST0_MASK		0x8c
 
+#define VPDMA_INTX_OFFSET		0x50
+
 #define VPDMA_PERFMON(i)		(0x200 + i * 4)
 
-/* VPE specific client registers */
+/* VIP/VPE client registers */
 #define VPDMA_DEI_CHROMA1_CSTAT		0x0300
 #define VPDMA_DEI_LUMA1_CSTAT		0x0304
 #define VPDMA_DEI_LUMA2_CSTAT		0x0308
@@ -50,6 +52,8 @@
 #define VPDMA_DEI_CHROMA3_CSTAT		0x0314
 #define VPDMA_DEI_MV_IN_CSTAT		0x0330
 #define VPDMA_DEI_MV_OUT_CSTAT		0x033c
+#define VPDMA_VIP_LO_Y_CSTAT		0x0388
+#define VPDMA_VIP_LO_UV_CSTAT		0x038c
 #define VPDMA_VIP_UP_Y_CSTAT		0x0390
 #define VPDMA_VIP_UP_UV_CSTAT		0x0394
 #define VPDMA_VPI_CTL_CSTAT		0x03d0
@@ -103,7 +107,7 @@
 
 #define DATA_TYPE_MV				0x3
 
-/* VPDMA channel numbers(only VPE channels for now) */
+/* VPDMA channel numbers, some are common between VIP/VPE and appear twice */
 #define	VPE_CHAN_NUM_LUMA1_IN		0
 #define	VPE_CHAN_NUM_CHROMA1_IN		1
 #define	VPE_CHAN_NUM_LUMA2_IN		2
@@ -112,10 +116,15 @@
 #define	VPE_CHAN_NUM_CHROMA3_IN		5
 #define	VPE_CHAN_NUM_MV_IN		12
 #define	VPE_CHAN_NUM_MV_OUT		15
+#define VIP1_CHAN_NUM_MULT_PORT_A_SRC0	38
+#define VIP1_CHAN_NUM_MULT_ANC_A_SRC0	70
 #define	VPE_CHAN_NUM_LUMA_OUT		102
 #define	VPE_CHAN_NUM_CHROMA_OUT		103
+#define VIP1_CHAN_NUM_PORT_A_LUMA	102
+#define VIP1_CHAN_NUM_PORT_A_CHROMA	103
 #define	VPE_CHAN_NUM_RGB_OUT		106
-
+#define VIP1_CHAN_NUM_PORT_A_RGB	106
+#define VIP1_CHAN_NUM_PORT_B_RGB	107
 /*
  * a VPDMA address data block payload for a configuration descriptor needs to
  * have each sub block length as a multiple of 16 bytes. Therefore, the overall
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
index 0189f7f7cb03..3921fd8cdf1d 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -1077,7 +1077,7 @@ static void enable_irqs(struct vpe_ctx *ctx)
 	write_reg(ctx->dev, VPE_INT0_ENABLE1_SET, VPE_DEI_ERROR_INT |
 				VPE_DS1_UV_ERROR_INT);
 
-	vpdma_enable_list_complete_irq(ctx->dev->vpdma, 0, true);
+	vpdma_enable_list_complete_irq(ctx->dev->vpdma, 0, 0, true);
 }
 
 static void disable_irqs(struct vpe_ctx *ctx)
@@ -1085,7 +1085,7 @@ static void disable_irqs(struct vpe_ctx *ctx)
 	write_reg(ctx->dev, VPE_INT0_ENABLE0_CLR, 0xffffffff);
 	write_reg(ctx->dev, VPE_INT0_ENABLE1_CLR, 0xffffffff);
 
-	vpdma_enable_list_complete_irq(ctx->dev->vpdma, 0, false);
+	vpdma_enable_list_complete_irq(ctx->dev->vpdma, 0, 0, false);
 }
 
 /* device_run() - prepares and starts the device
@@ -1202,7 +1202,7 @@ static void device_run(void *priv)
 	enable_irqs(ctx);
 
 	vpdma_map_desc_buf(ctx->dev->vpdma, &ctx->desc_list.buf);
-	vpdma_submit_descs(ctx->dev->vpdma, &ctx->desc_list);
+	vpdma_submit_descs(ctx->dev->vpdma, &ctx->desc_list, 0);
 }
 
 static void dei_error(struct vpe_ctx *ctx)
@@ -1257,7 +1257,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data)
 
 	if (irqst0) {
 		if (irqst0 & VPE_INT0_LIST0_COMPLETE)
-			vpdma_clear_list_stat(ctx->dev->vpdma);
+			vpdma_clear_list_stat(ctx->dev->vpdma, 0);
 
 		irqst0 &= ~(VPE_INT0_LIST0_COMPLETE);
 	}
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Patch 03/35] media: ti-vpe: vpdma: Add helper to set a background color
  2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
  2016-09-28 21:16 ` [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module Benoit Parrot
  2016-09-28 21:16 ` [Patch 02/35] media: ti-vpe: vpdma: Add multi-instance and multi-client support Benoit Parrot
@ 2016-09-28 21:16 ` Benoit Parrot
  2016-09-28 21:16 ` [Patch 04/35] media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor Benoit Parrot
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2016-09-28 21:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel, Benoit Parrot

Add a helper to set the background color during vpdma transfer.
This is needed when VPDMA is generating 32 bits RGB format
to have the Alpha channel set to an appropriate value.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
 drivers/media/platform/ti-vpe/vpdma.c | 10 ++++++++++
 drivers/media/platform/ti-vpe/vpdma.h |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
index 8dfabff216c1..af8e8f083727 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -869,6 +869,16 @@ void vpdma_clear_list_stat(struct vpdma_data *vpdma, int irq_num)
 }
 EXPORT_SYMBOL(vpdma_clear_list_stat);
 
+void vpdma_set_bg_color(struct vpdma_data *vpdma,
+		struct vpdma_data_format *fmt, u32 color)
+{
+	if (fmt->type == VPDMA_DATA_FMT_TYPE_RGB)
+		write_reg(vpdma, VPDMA_BG_RGB, color);
+	else if (fmt->type == VPDMA_DATA_FMT_TYPE_YUV)
+		write_reg(vpdma, VPDMA_BG_YUV, color);
+}
+EXPORT_SYMBOL(vpdma_set_bg_color);
+
 /*
  * configures the output mode of the line buffer for the given client, the
  * line buffer content can either be mirrored(each line repeated twice) or
diff --git a/drivers/media/platform/ti-vpe/vpdma.h b/drivers/media/platform/ti-vpe/vpdma.h
index 83325d887546..220dc7e793f6 100644
--- a/drivers/media/platform/ti-vpe/vpdma.h
+++ b/drivers/media/platform/ti-vpe/vpdma.h
@@ -221,7 +221,8 @@ void vpdma_set_line_mode(struct vpdma_data *vpdma, int line_mode,
 		enum vpdma_channel chan);
 void vpdma_set_frame_start_event(struct vpdma_data *vpdma,
 		enum vpdma_frame_start_event fs_event, enum vpdma_channel chan);
-
+void vpdma_set_bg_color(struct vpdma_data *vpdma,
+			struct vpdma_data_format *fmt, u32 color);
 void vpdma_dump_regs(struct vpdma_data *vpdma);
 
 /* initialize vpdma, passed with VPE's platform device pointer */
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Patch 04/35] media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor
  2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
                   ` (2 preceding siblings ...)
  2016-09-28 21:16 ` [Patch 03/35] media: ti-vpe: vpdma: Add helper to set a background color Benoit Parrot
@ 2016-09-28 21:16 ` Benoit Parrot
  2016-10-10 17:30 ` [Patch 00/35] media: ti-vpe: fixes and enhancements Parrot, Benoit
  2016-10-17 14:35 ` Hans Verkuil
  5 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2016-09-28 21:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel, Benoit Parrot

On DRA7 since l3_noc event are being reported it was found that
when the write descriptor was being written it was consistently
causing bus error events.

The write address was improperly programmed.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
 drivers/media/platform/ti-vpe/vpdma_priv.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/vpdma_priv.h b/drivers/media/platform/ti-vpe/vpdma_priv.h
index 65f0c067bed1..aeade5edc8ac 100644
--- a/drivers/media/platform/ti-vpe/vpdma_priv.h
+++ b/drivers/media/platform/ti-vpe/vpdma_priv.h
@@ -212,6 +212,7 @@ struct vpdma_dtd {
 #define DTD_V_START_MASK	0xffff
 #define DTD_V_START_SHFT	0
 
+#define DTD_DESC_START_MASK	0xffffffe0
 #define DTD_DESC_START_SHIFT	5
 #define DTD_WRITE_DESC_MASK	0x01
 #define DTD_WRITE_DESC_SHIFT	2
@@ -294,7 +295,7 @@ static inline u32 dtd_frame_width_height(int width, int height)
 static inline u32 dtd_desc_write_addr(unsigned int addr, bool write_desc,
 			bool drop_data, bool use_desc)
 {
-	return (addr << DTD_DESC_START_SHIFT) |
+	return (addr & DTD_DESC_START_MASK) |
 		(write_desc << DTD_WRITE_DESC_SHIFT) |
 		(drop_data << DTD_DROP_DATA_SHIFT) |
 		use_desc;
@@ -399,7 +400,7 @@ static inline int dtd_get_frame_height(struct vpdma_dtd *dtd)
 
 static inline int dtd_get_desc_write_addr(struct vpdma_dtd *dtd)
 {
-	return dtd->desc_write_addr >> DTD_DESC_START_SHIFT;
+	return dtd->desc_write_addr & DTD_DESC_START_MASK;
 }
 
 static inline bool dtd_get_write_desc(struct vpdma_dtd *dtd)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [Patch 00/35] media: ti-vpe: fixes and enhancements
  2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
                   ` (3 preceding siblings ...)
  2016-09-28 21:16 ` [Patch 04/35] media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor Benoit Parrot
@ 2016-10-10 17:30 ` Parrot, Benoit
  2016-10-17 14:35 ` Hans Verkuil
  5 siblings, 0 replies; 10+ messages in thread
From: Parrot, Benoit @ 2016-10-10 17:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel

Hans, Mauro,

Ping.

Benoit

-----Original Message-----
From: Parrot, Benoit 
Sent: Wednesday, September 28, 2016 4:16 PM
To: Hans Verkuil
Cc: linux-media@vger.kernel.org; linux-kernel@vger.kernel.org; Parrot, Benoit
Subject: [Patch 00/35] media: ti-vpe: fixes and enhancements

This patch series is to publish a number of enhancements we have been carrying for a while.

A number of bug fixes and feature enhancements have been included.

We also need to prepare the way for the introduction of the VIP (Video Input Port) driver (coming soon) which has internal IP module in common with VPE.

The relevant modules (vpdma, sc and csc) are therefore converted into individual kernel modules.

Archit Taneja (1):
  media: ti-vpe: Use line average de-interlacing for first 2 frames

Benoit Parrot (16):
  media: ti-vpe: vpdma: Make vpdma library into its own module
  media: ti-vpe: vpdma: Add multi-instance and multi-client support
  media: ti-vpe: vpdma: Add helper to set a background color
  media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor
  media: ti-vpe: vpe: Added MODULE_DEVICE_TABLE hint
  media: ti-vpe: vpdma: Corrected YUV422 data type label.
  media: ti-vpe: vpdma: RGB data type yield inverted data
  media: ti-vpe: vpe: Fix vb2 buffer cleanup
  media: ti-vpe: vpe: Enable DMABUF export
  media: ti-vpe: Make scaler library into its own module
  media: ti-vpe: scaler: Add debug support for multi-instance
  media: ti-vpe: vpe: Make sure frame size dont exceed scaler capacity
  media: ti-vpe: vpdma: Add RAW8 and RAW16 data types
  media: ti-vpe: Make colorspace converter library into its own module
  media: ti-vpe: csc: Add debug support for multi-instance
  media: ti-vpe: vpe: Add proper support single and multi-plane buffer

Harinarayan Bhatta (2):
  media: ti-vpe: Increasing max buffer height and width
  media: ti-vpe: Free vpdma buffers in vpe_release

Nikhil Devshatwar (16):
  media: ti-vpe: vpe: Do not perform job transaction atomically
  media: ti-vpe: Add support for SEQ_TB buffers
  media: ti-vpe: vpe: Return NULL for invalid buffer type
  media: ti-vpe: vpdma: Add support for setting max width height
  media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs
  media: ti-vpe: vpdma: Make list post atomic operation
  media: ti-vpe: vpdma: Clear IRQs for individual lists
  media: ti-vpe: vpe: configure line mode separately
  media: ti-vpe: vpe: Setup srcdst parameters in start_streaming
  media: ti-vpe: vpe: Post next descriptor only for list complete IRQ
  media: ti-vpe: vpe: Add RGB565 and RGB5551 support
  media: ti-vpe: vpdma: allocate and maintain hwlist
  media: ti-vpe: sc: Fix incorrect optimization
  media: ti-vpe: vpdma: Fix race condition for firmware loading
  media: ti-vpe: vpdma: Use bidirectional cached buffers
  media: ti-vpe: vpe: Fix line stride for output motion vector

 drivers/media/platform/Kconfig             |  14 +
 drivers/media/platform/ti-vpe/Makefile     |  10 +-
 drivers/media/platform/ti-vpe/csc.c        |  18 +-
 drivers/media/platform/ti-vpe/csc.h        |   2 +-
 drivers/media/platform/ti-vpe/sc.c         |  28 +-
 drivers/media/platform/ti-vpe/sc.h         |  11 +-
 drivers/media/platform/ti-vpe/vpdma.c      | 349 +++++++++++++++++++---
 drivers/media/platform/ti-vpe/vpdma.h      |  85 +++++-
 drivers/media/platform/ti-vpe/vpdma_priv.h | 130 ++++-----
 drivers/media/platform/ti-vpe/vpe.c        | 450 ++++++++++++++++++++++++-----
 10 files changed, 891 insertions(+), 206 deletions(-)

--
2.9.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module
  2016-09-28 21:16 ` [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module Benoit Parrot
@ 2016-10-17 14:08   ` Hans Verkuil
  2016-10-24 16:39     ` Benoit Parrot
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Verkuil @ 2016-10-17 14:08 UTC (permalink / raw)
  To: Benoit Parrot; +Cc: linux-media, linux-kernel

On 09/28/2016 11:16 PM, Benoit Parrot wrote:
> The VPDMA (Video Port DMA) as found in devices such as DRA7xx is
> used for both the Video Processing Engine (VPE) and the Video Input
> Port (VIP).
> 
> In preparation for this we need to turn vpdma into its own
> kernel module.
> 
> Signed-off-by: Benoit Parrot <bparrot@ti.com>
> ---
>  drivers/media/platform/Kconfig         |  6 ++++++
>  drivers/media/platform/ti-vpe/Makefile |  4 +++-
>  drivers/media/platform/ti-vpe/vpdma.c  | 28 +++++++++++++++++++++++++++-
>  3 files changed, 36 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index f98ed3fd0efd..3c15c5a53bd5 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -334,6 +334,7 @@ config VIDEO_TI_VPE
>  	depends on HAS_DMA
>  	select VIDEOBUF2_DMA_CONTIG
>  	select V4L2_MEM2MEM_DEV
> +	select VIDEO_TI_VPDMA
>  	default n
>  	---help---
>  	  Support for the TI VPE(Video Processing Engine) block
> @@ -347,6 +348,11 @@ config VIDEO_TI_VPE_DEBUG
>  
>  endif # V4L_MEM2MEM_DRIVERS
>  
> +# TI VIDEO PORT Helper Modules
> +# These will be selected by VPE and VIP
> +config VIDEO_TI_VPDMA
> +	tristate
> +
>  menuconfig V4L_TEST_DRIVERS
>  	bool "Media test drivers"
>  	depends on MEDIA_CAMERA_SUPPORT
> diff --git a/drivers/media/platform/ti-vpe/Makefile b/drivers/media/platform/ti-vpe/Makefile
> index e236059a60ad..faca5e115c1d 100644
> --- a/drivers/media/platform/ti-vpe/Makefile
> +++ b/drivers/media/platform/ti-vpe/Makefile
> @@ -1,6 +1,8 @@
>  obj-$(CONFIG_VIDEO_TI_VPE) += ti-vpe.o
> +obj-$(CONFIG_VIDEO_TI_VPDMA) += ti-vpdma.o
>  
> -ti-vpe-y := vpe.o sc.o csc.o vpdma.o
> +ti-vpe-y := vpe.o sc.o csc.o
> +ti-vpdma-y := vpdma.o
>  
>  ccflags-$(CONFIG_VIDEO_TI_VPE_DEBUG) += -DDEBUG
>  
> diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
> index 3e2e3a33e6ed..e55cb58213bf 100644
> --- a/drivers/media/platform/ti-vpe/vpdma.c
> +++ b/drivers/media/platform/ti-vpe/vpdma.c
> @@ -75,6 +75,7 @@ const struct vpdma_data_format vpdma_yuv_fmts[] = {
>  		.depth		= 16,
>  	},
>  };
> +EXPORT_SYMBOL(vpdma_yuv_fmts);

EXPORT_SYMBOL_GPL?

(Up to you).

Regards,

	Hans

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Patch 00/35] media: ti-vpe: fixes and enhancements
  2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
                   ` (4 preceding siblings ...)
  2016-10-10 17:30 ` [Patch 00/35] media: ti-vpe: fixes and enhancements Parrot, Benoit
@ 2016-10-17 14:35 ` Hans Verkuil
  2016-10-24 17:00   ` Benoit Parrot
  5 siblings, 1 reply; 10+ messages in thread
From: Hans Verkuil @ 2016-10-17 14:35 UTC (permalink / raw)
  To: Benoit Parrot; +Cc: linux-media, linux-kernel

On 09/28/2016 11:16 PM, Benoit Parrot wrote:
> This patch series is to publish a number of enhancements
> we have been carrying for a while.
> 
> A number of bug fixes and feature enhancements have been
> included.
> 
> We also need to prepare the way for the introduction of
> the VIP (Video Input Port) driver (coming soon) which
> has internal IP module in common with VPE.
> 
> The relevant modules (vpdma, sc and csc) are therefore converted
> into individual kernel modules.

Other than the few comments I made this patch series looks OK.

You can add my

	Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

to those patches where I didn't make any comments.

Regards,

	Hans

> 
> Archit Taneja (1):
>   media: ti-vpe: Use line average de-interlacing for first 2 frames
> 
> Benoit Parrot (16):
>   media: ti-vpe: vpdma: Make vpdma library into its own module
>   media: ti-vpe: vpdma: Add multi-instance and multi-client support
>   media: ti-vpe: vpdma: Add helper to set a background color
>   media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor
>   media: ti-vpe: vpe: Added MODULE_DEVICE_TABLE hint
>   media: ti-vpe: vpdma: Corrected YUV422 data type label.
>   media: ti-vpe: vpdma: RGB data type yield inverted data
>   media: ti-vpe: vpe: Fix vb2 buffer cleanup
>   media: ti-vpe: vpe: Enable DMABUF export
>   media: ti-vpe: Make scaler library into its own module
>   media: ti-vpe: scaler: Add debug support for multi-instance
>   media: ti-vpe: vpe: Make sure frame size dont exceed scaler capacity
>   media: ti-vpe: vpdma: Add RAW8 and RAW16 data types
>   media: ti-vpe: Make colorspace converter library into its own module
>   media: ti-vpe: csc: Add debug support for multi-instance
>   media: ti-vpe: vpe: Add proper support single and multi-plane buffer
> 
> Harinarayan Bhatta (2):
>   media: ti-vpe: Increasing max buffer height and width
>   media: ti-vpe: Free vpdma buffers in vpe_release
> 
> Nikhil Devshatwar (16):
>   media: ti-vpe: vpe: Do not perform job transaction atomically
>   media: ti-vpe: Add support for SEQ_TB buffers
>   media: ti-vpe: vpe: Return NULL for invalid buffer type
>   media: ti-vpe: vpdma: Add support for setting max width height
>   media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs
>   media: ti-vpe: vpdma: Make list post atomic operation
>   media: ti-vpe: vpdma: Clear IRQs for individual lists
>   media: ti-vpe: vpe: configure line mode separately
>   media: ti-vpe: vpe: Setup srcdst parameters in start_streaming
>   media: ti-vpe: vpe: Post next descriptor only for list complete IRQ
>   media: ti-vpe: vpe: Add RGB565 and RGB5551 support
>   media: ti-vpe: vpdma: allocate and maintain hwlist
>   media: ti-vpe: sc: Fix incorrect optimization
>   media: ti-vpe: vpdma: Fix race condition for firmware loading
>   media: ti-vpe: vpdma: Use bidirectional cached buffers
>   media: ti-vpe: vpe: Fix line stride for output motion vector
> 
>  drivers/media/platform/Kconfig             |  14 +
>  drivers/media/platform/ti-vpe/Makefile     |  10 +-
>  drivers/media/platform/ti-vpe/csc.c        |  18 +-
>  drivers/media/platform/ti-vpe/csc.h        |   2 +-
>  drivers/media/platform/ti-vpe/sc.c         |  28 +-
>  drivers/media/platform/ti-vpe/sc.h         |  11 +-
>  drivers/media/platform/ti-vpe/vpdma.c      | 349 +++++++++++++++++++---
>  drivers/media/platform/ti-vpe/vpdma.h      |  85 +++++-
>  drivers/media/platform/ti-vpe/vpdma_priv.h | 130 ++++-----
>  drivers/media/platform/ti-vpe/vpe.c        | 450 ++++++++++++++++++++++++-----
>  10 files changed, 891 insertions(+), 206 deletions(-)
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module
  2016-10-17 14:08   ` Hans Verkuil
@ 2016-10-24 16:39     ` Benoit Parrot
  0 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2016-10-24 16:39 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel

Hans,

Thanks for the review.


Hans Verkuil <hverkuil@xs4all.nl> wrote on Mon [2016-Oct-17 16:08:55 +0200]:
> On 09/28/2016 11:16 PM, Benoit Parrot wrote:
> > The VPDMA (Video Port DMA) as found in devices such as DRA7xx is
> > used for both the Video Processing Engine (VPE) and the Video Input
> > Port (VIP).
> > 
> > In preparation for this we need to turn vpdma into its own
> > kernel module.
> > 
> > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> > ---
> >  drivers/media/platform/Kconfig         |  6 ++++++
> >  drivers/media/platform/ti-vpe/Makefile |  4 +++-
> >  drivers/media/platform/ti-vpe/vpdma.c  | 28 +++++++++++++++++++++++++++-
> >  3 files changed, 36 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> > index f98ed3fd0efd..3c15c5a53bd5 100644
> > --- a/drivers/media/platform/Kconfig
> > +++ b/drivers/media/platform/Kconfig
> > @@ -334,6 +334,7 @@ config VIDEO_TI_VPE
> >  	depends on HAS_DMA
> >  	select VIDEOBUF2_DMA_CONTIG
> >  	select V4L2_MEM2MEM_DEV
> > +	select VIDEO_TI_VPDMA
> >  	default n
> >  	---help---
> >  	  Support for the TI VPE(Video Processing Engine) block
> > @@ -347,6 +348,11 @@ config VIDEO_TI_VPE_DEBUG
> >  
> >  endif # V4L_MEM2MEM_DRIVERS
> >  
> > +# TI VIDEO PORT Helper Modules
> > +# These will be selected by VPE and VIP
> > +config VIDEO_TI_VPDMA
> > +	tristate
> > +
> >  menuconfig V4L_TEST_DRIVERS
> >  	bool "Media test drivers"
> >  	depends on MEDIA_CAMERA_SUPPORT
> > diff --git a/drivers/media/platform/ti-vpe/Makefile b/drivers/media/platform/ti-vpe/Makefile
> > index e236059a60ad..faca5e115c1d 100644
> > --- a/drivers/media/platform/ti-vpe/Makefile
> > +++ b/drivers/media/platform/ti-vpe/Makefile
> > @@ -1,6 +1,8 @@
> >  obj-$(CONFIG_VIDEO_TI_VPE) += ti-vpe.o
> > +obj-$(CONFIG_VIDEO_TI_VPDMA) += ti-vpdma.o
> >  
> > -ti-vpe-y := vpe.o sc.o csc.o vpdma.o
> > +ti-vpe-y := vpe.o sc.o csc.o
> > +ti-vpdma-y := vpdma.o
> >  
> >  ccflags-$(CONFIG_VIDEO_TI_VPE_DEBUG) += -DDEBUG
> >  
> > diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c
> > index 3e2e3a33e6ed..e55cb58213bf 100644
> > --- a/drivers/media/platform/ti-vpe/vpdma.c
> > +++ b/drivers/media/platform/ti-vpe/vpdma.c
> > @@ -75,6 +75,7 @@ const struct vpdma_data_format vpdma_yuv_fmts[] = {
> >  		.depth		= 16,
> >  	},
> >  };
> > +EXPORT_SYMBOL(vpdma_yuv_fmts);
> 
> EXPORT_SYMBOL_GPL?

I think for now I would rather go for consistency.
So I'll leave it as is.

Regards,
Benoit

> 
> (Up to you).
> 
> Regards,
> 
> 	Hans

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Patch 00/35] media: ti-vpe: fixes and enhancements
  2016-10-17 14:35 ` Hans Verkuil
@ 2016-10-24 17:00   ` Benoit Parrot
  0 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2016-10-24 17:00 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, linux-kernel

Hans,

Thank you for taking the time to review my patches.
I'll update the patch set relating to your comments
and submit a v2 shortly.

Regards
Benoit

Hans Verkuil <hverkuil@xs4all.nl> wrote on Mon [2016-Oct-17 16:35:01 +0200]:
> On 09/28/2016 11:16 PM, Benoit Parrot wrote:
> > This patch series is to publish a number of enhancements
> > we have been carrying for a while.
> > 
> > A number of bug fixes and feature enhancements have been
> > included.
> > 
> > We also need to prepare the way for the introduction of
> > the VIP (Video Input Port) driver (coming soon) which
> > has internal IP module in common with VPE.
> > 
> > The relevant modules (vpdma, sc and csc) are therefore converted
> > into individual kernel modules.
> 
> Other than the few comments I made this patch series looks OK.
> 
> You can add my
> 
> 	Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
> 
> to those patches where I didn't make any comments.
> 
> Regards,
> 
> 	Hans
> 
> > 
> > Archit Taneja (1):
> >   media: ti-vpe: Use line average de-interlacing for first 2 frames
> > 
> > Benoit Parrot (16):
> >   media: ti-vpe: vpdma: Make vpdma library into its own module
> >   media: ti-vpe: vpdma: Add multi-instance and multi-client support
> >   media: ti-vpe: vpdma: Add helper to set a background color
> >   media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor
> >   media: ti-vpe: vpe: Added MODULE_DEVICE_TABLE hint
> >   media: ti-vpe: vpdma: Corrected YUV422 data type label.
> >   media: ti-vpe: vpdma: RGB data type yield inverted data
> >   media: ti-vpe: vpe: Fix vb2 buffer cleanup
> >   media: ti-vpe: vpe: Enable DMABUF export
> >   media: ti-vpe: Make scaler library into its own module
> >   media: ti-vpe: scaler: Add debug support for multi-instance
> >   media: ti-vpe: vpe: Make sure frame size dont exceed scaler capacity
> >   media: ti-vpe: vpdma: Add RAW8 and RAW16 data types
> >   media: ti-vpe: Make colorspace converter library into its own module
> >   media: ti-vpe: csc: Add debug support for multi-instance
> >   media: ti-vpe: vpe: Add proper support single and multi-plane buffer
> > 
> > Harinarayan Bhatta (2):
> >   media: ti-vpe: Increasing max buffer height and width
> >   media: ti-vpe: Free vpdma buffers in vpe_release
> > 
> > Nikhil Devshatwar (16):
> >   media: ti-vpe: vpe: Do not perform job transaction atomically
> >   media: ti-vpe: Add support for SEQ_TB buffers
> >   media: ti-vpe: vpe: Return NULL for invalid buffer type
> >   media: ti-vpe: vpdma: Add support for setting max width height
> >   media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs
> >   media: ti-vpe: vpdma: Make list post atomic operation
> >   media: ti-vpe: vpdma: Clear IRQs for individual lists
> >   media: ti-vpe: vpe: configure line mode separately
> >   media: ti-vpe: vpe: Setup srcdst parameters in start_streaming
> >   media: ti-vpe: vpe: Post next descriptor only for list complete IRQ
> >   media: ti-vpe: vpe: Add RGB565 and RGB5551 support
> >   media: ti-vpe: vpdma: allocate and maintain hwlist
> >   media: ti-vpe: sc: Fix incorrect optimization
> >   media: ti-vpe: vpdma: Fix race condition for firmware loading
> >   media: ti-vpe: vpdma: Use bidirectional cached buffers
> >   media: ti-vpe: vpe: Fix line stride for output motion vector
> > 
> >  drivers/media/platform/Kconfig             |  14 +
> >  drivers/media/platform/ti-vpe/Makefile     |  10 +-
> >  drivers/media/platform/ti-vpe/csc.c        |  18 +-
> >  drivers/media/platform/ti-vpe/csc.h        |   2 +-
> >  drivers/media/platform/ti-vpe/sc.c         |  28 +-
> >  drivers/media/platform/ti-vpe/sc.h         |  11 +-
> >  drivers/media/platform/ti-vpe/vpdma.c      | 349 +++++++++++++++++++---
> >  drivers/media/platform/ti-vpe/vpdma.h      |  85 +++++-
> >  drivers/media/platform/ti-vpe/vpdma_priv.h | 130 ++++-----
> >  drivers/media/platform/ti-vpe/vpe.c        | 450 ++++++++++++++++++++++++-----
> >  10 files changed, 891 insertions(+), 206 deletions(-)
> > 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-10-24 17:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 21:16 [Patch 00/35] media: ti-vpe: fixes and enhancements Benoit Parrot
2016-09-28 21:16 ` [Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module Benoit Parrot
2016-10-17 14:08   ` Hans Verkuil
2016-10-24 16:39     ` Benoit Parrot
2016-09-28 21:16 ` [Patch 02/35] media: ti-vpe: vpdma: Add multi-instance and multi-client support Benoit Parrot
2016-09-28 21:16 ` [Patch 03/35] media: ti-vpe: vpdma: Add helper to set a background color Benoit Parrot
2016-09-28 21:16 ` [Patch 04/35] media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor Benoit Parrot
2016-10-10 17:30 ` [Patch 00/35] media: ti-vpe: fixes and enhancements Parrot, Benoit
2016-10-17 14:35 ` Hans Verkuil
2016-10-24 17:00   ` Benoit Parrot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).