All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Enable VDMA S2MM vertical flip support
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

The AXI VDMA core supports Vertical Flip with S2MM as the path when
Enable Vertical Flip (Advanced tab) is selected. This patch series add
DT property for vertical flip and program its state in VDMA start_transfer.

Radhey Shyam Pandey (2):
  dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
  dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support

 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 +
 drivers/dma/xilinx/xilinx_dma.c                    |   22 ++++++++++++++++++++
 include/linux/dma/xilinx_dma.h                     |    2 +
 3 files changed, 26 insertions(+), 0 deletions(-)


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

* [PATCH 0/2] Enable VDMA S2MM vertical flip support
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

The AXI VDMA core supports Vertical Flip with S2MM as the path when
Enable Vertical Flip (Advanced tab) is selected. This patch series add
DT property for vertical flip and program its state in VDMA start_transfer.

Radhey Shyam Pandey (2):
  dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
  dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support

 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 +
 drivers/dma/xilinx/xilinx_dma.c                    |   22 ++++++++++++++++++++
 include/linux/dma/xilinx_dma.h                     |    2 +
 3 files changed, 26 insertions(+), 0 deletions(-)

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

* [PATCH 0/2] Enable VDMA S2MM vertical flip support
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

The AXI VDMA core supports Vertical Flip with S2MM as the path when
Enable Vertical Flip (Advanced tab) is selected. This patch series add
DT property for vertical flip and program its state in VDMA start_transfer.

Radhey Shyam Pandey (2):
  dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
  dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support

 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 +
 drivers/dma/xilinx/xilinx_dma.c                    |   22 ++++++++++++++++++++
 include/linux/dma/xilinx_dma.h                     |    2 +
 3 files changed, 26 insertions(+), 0 deletions(-)

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

* [1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
  2018-06-13  7:34 ` Radhey Shyam Pandey
  (?)
  (?)
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  -1 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

The AXI VDMA core supports Vertical flip in S2MM path when Enable
Vertical Flip (Advanced tab) is selected. To allow vertical flip
programming define an optional 'xlnx,enable-vert-flip' channel
child node property.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
index a2b8bfa..174af2c 100644
--- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
+++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
@@ -66,6 +66,8 @@ Optional child node properties:
 Optional child node properties for VDMA:
 - xlnx,genlock-mode: Tells Genlock synchronization is
 	enabled/disabled in hardware.
+- xlnx,enable-vert-flip: Tells vertical flip is
+	enabled/disabled in hardware(S2MM path).
 Optional child node properties for AXI DMA:
 -dma-channels: Number of dma channels in child node.
 

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

* [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

The AXI VDMA core supports Vertical flip in S2MM path when Enable
Vertical Flip (Advanced tab) is selected. To allow vertical flip
programming define an optional 'xlnx,enable-vert-flip' channel
child node property.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
index a2b8bfa..174af2c 100644
--- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
+++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
@@ -66,6 +66,8 @@ Optional child node properties:
 Optional child node properties for VDMA:
 - xlnx,genlock-mode: Tells Genlock synchronization is
 	enabled/disabled in hardware.
+- xlnx,enable-vert-flip: Tells vertical flip is
+	enabled/disabled in hardware(S2MM path).
 Optional child node properties for AXI DMA:
 -dma-channels: Number of dma channels in child node.
 
-- 
1.7.1


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

* [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

The AXI VDMA core supports Vertical flip in S2MM path when Enable
Vertical Flip (Advanced tab) is selected. To allow vertical flip
programming define an optional 'xlnx,enable-vert-flip' channel
child node property.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
index a2b8bfa..174af2c 100644
--- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
+++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
@@ -66,6 +66,8 @@ Optional child node properties:
 Optional child node properties for VDMA:
 - xlnx,genlock-mode: Tells Genlock synchronization is
 	enabled/disabled in hardware.
+- xlnx,enable-vert-flip: Tells vertical flip is
+	enabled/disabled in hardware(S2MM path).
 Optional child node properties for AXI DMA:
 -dma-channels: Number of dma channels in child node.
 
-- 
1.7.1

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

* [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

The AXI VDMA core supports Vertical flip in S2MM path when Enable
Vertical Flip (Advanced tab) is selected. To allow vertical flip
programming define an optional 'xlnx,enable-vert-flip' channel
child node property.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
index a2b8bfa..174af2c 100644
--- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
+++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
@@ -66,6 +66,8 @@ Optional child node properties:
 Optional child node properties for VDMA:
 - xlnx,genlock-mode: Tells Genlock synchronization is
 	enabled/disabled in hardware.
+- xlnx,enable-vert-flip: Tells vertical flip is
+	enabled/disabled in hardware(S2MM path).
 Optional child node properties for AXI DMA:
 -dma-channels: Number of dma channels in child node.
 
-- 
1.7.1

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

* [2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
  2018-06-13  7:34 ` Radhey Shyam Pandey
  (?)
  (?)
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  -1 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

Vertical flip state is exported in xilinx_vdma_config and depending
on IP configuration(c_enable_vert_flip) vertical flip state is
programmed in hardware.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
 include/linux/dma/xilinx_dma.h  |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 27b5235..c124423 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -115,6 +115,9 @@
 #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
 #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
 
+#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
+#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
+
 /* HW specific definitions */
 #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
 
@@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
  * @start_transfer: Differentiate b/w DMA IP's transfer
  * @stop_transfer: Differentiate b/w DMA IP's quiesce
  * @tdest: TDEST value for mcdma
+ * @has_vflip: S2MM vertical flip
  */
 struct xilinx_dma_chan {
 	struct xilinx_dma_device *xdev;
@@ -376,6 +380,7 @@ struct xilinx_dma_chan {
 	void (*start_transfer)(struct xilinx_dma_chan *chan);
 	int (*stop_transfer)(struct xilinx_dma_chan *chan);
 	u16 tdest;
+	bool has_vflip;
 };
 
 /**
@@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 				desc->async_tx.phys);
 
 	/* Configure the hardware using info in the config structure */
+	if (chan->has_vflip) {
+		reg = dma_read(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
+		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		reg |= config->vflip_en;
+		dma_write(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
+			  reg);
+	}
+
 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
 
 	if (config->frm_cnt_en)
@@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
 	}
 
 	chan->config.frm_cnt_en = cfg->frm_cnt_en;
+	chan->config.vflip_en = cfg->vflip_en;
+
 	if (cfg->park)
 		chan->config.park_frm = cfg->park_frm;
 	else
@@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
 		chan->direction = DMA_DEV_TO_MEM;
 		chan->id = chan_id;
 		chan->tdest = chan_id - xdev->nr_channels;
+		chan->has_vflip = of_property_read_bool(node,
+					"xlnx,enable-vert-flip");
+		if (chan->has_vflip) {
+			chan->config.vflip_en = dma_read(chan,
+				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP) &
+				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		}
 
 		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
 		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
diff --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
index 34b98f2..5b6e61e 100644
--- a/include/linux/dma/xilinx_dma.h
+++ b/include/linux/dma/xilinx_dma.h
@@ -27,6 +27,7 @@
  * @delay: Delay counter
  * @reset: Reset Channel
  * @ext_fsync: External Frame Sync source
+ * @vflip_en:  Vertical Flip enable
  */
 struct xilinx_vdma_config {
 	int frm_dly;
@@ -39,6 +40,7 @@ struct xilinx_vdma_config {
 	int delay;
 	int reset;
 	int ext_fsync;
+	bool vflip_en;
 };
 
 int xilinx_vdma_channel_set_config(struct dma_chan *dchan,

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

* [PATCH 2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

Vertical flip state is exported in xilinx_vdma_config and depending
on IP configuration(c_enable_vert_flip) vertical flip state is
programmed in hardware.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
 include/linux/dma/xilinx_dma.h  |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 27b5235..c124423 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -115,6 +115,9 @@
 #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
 #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
 
+#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
+#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
+
 /* HW specific definitions */
 #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
 
@@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
  * @start_transfer: Differentiate b/w DMA IP's transfer
  * @stop_transfer: Differentiate b/w DMA IP's quiesce
  * @tdest: TDEST value for mcdma
+ * @has_vflip: S2MM vertical flip
  */
 struct xilinx_dma_chan {
 	struct xilinx_dma_device *xdev;
@@ -376,6 +380,7 @@ struct xilinx_dma_chan {
 	void (*start_transfer)(struct xilinx_dma_chan *chan);
 	int (*stop_transfer)(struct xilinx_dma_chan *chan);
 	u16 tdest;
+	bool has_vflip;
 };
 
 /**
@@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 				desc->async_tx.phys);
 
 	/* Configure the hardware using info in the config structure */
+	if (chan->has_vflip) {
+		reg = dma_read(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
+		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		reg |= config->vflip_en;
+		dma_write(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
+			  reg);
+	}
+
 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
 
 	if (config->frm_cnt_en)
@@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
 	}
 
 	chan->config.frm_cnt_en = cfg->frm_cnt_en;
+	chan->config.vflip_en = cfg->vflip_en;
+
 	if (cfg->park)
 		chan->config.park_frm = cfg->park_frm;
 	else
@@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
 		chan->direction = DMA_DEV_TO_MEM;
 		chan->id = chan_id;
 		chan->tdest = chan_id - xdev->nr_channels;
+		chan->has_vflip = of_property_read_bool(node,
+					"xlnx,enable-vert-flip");
+		if (chan->has_vflip) {
+			chan->config.vflip_en = dma_read(chan,
+				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP) &
+				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		}
 
 		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
 		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
diff --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
index 34b98f2..5b6e61e 100644
--- a/include/linux/dma/xilinx_dma.h
+++ b/include/linux/dma/xilinx_dma.h
@@ -27,6 +27,7 @@
  * @delay: Delay counter
  * @reset: Reset Channel
  * @ext_fsync: External Frame Sync source
+ * @vflip_en:  Vertical Flip enable
  */
 struct xilinx_vdma_config {
 	int frm_dly;
@@ -39,6 +40,7 @@ struct xilinx_vdma_config {
 	int delay;
 	int reset;
 	int ext_fsync;
+	bool vflip_en;
 };
 
 int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
-- 
1.7.1


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

* [PATCH 2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

Vertical flip state is exported in xilinx_vdma_config and depending
on IP configuration(c_enable_vert_flip) vertical flip state is
programmed in hardware.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
 include/linux/dma/xilinx_dma.h  |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 27b5235..c124423 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -115,6 +115,9 @@
 #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
 #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
 
+#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
+#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
+
 /* HW specific definitions */
 #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
 
@@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
  * @start_transfer: Differentiate b/w DMA IP's transfer
  * @stop_transfer: Differentiate b/w DMA IP's quiesce
  * @tdest: TDEST value for mcdma
+ * @has_vflip: S2MM vertical flip
  */
 struct xilinx_dma_chan {
 	struct xilinx_dma_device *xdev;
@@ -376,6 +380,7 @@ struct xilinx_dma_chan {
 	void (*start_transfer)(struct xilinx_dma_chan *chan);
 	int (*stop_transfer)(struct xilinx_dma_chan *chan);
 	u16 tdest;
+	bool has_vflip;
 };
 
 /**
@@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 				desc->async_tx.phys);
 
 	/* Configure the hardware using info in the config structure */
+	if (chan->has_vflip) {
+		reg = dma_read(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
+		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		reg |= config->vflip_en;
+		dma_write(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
+			  reg);
+	}
+
 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
 
 	if (config->frm_cnt_en)
@@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
 	}
 
 	chan->config.frm_cnt_en = cfg->frm_cnt_en;
+	chan->config.vflip_en = cfg->vflip_en;
+
 	if (cfg->park)
 		chan->config.park_frm = cfg->park_frm;
 	else
@@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
 		chan->direction = DMA_DEV_TO_MEM;
 		chan->id = chan_id;
 		chan->tdest = chan_id - xdev->nr_channels;
+		chan->has_vflip = of_property_read_bool(node,
+					"xlnx,enable-vert-flip");
+		if (chan->has_vflip) {
+			chan->config.vflip_en = dma_read(chan,
+				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP) &
+				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		}
 
 		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
 		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
diff --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
index 34b98f2..5b6e61e 100644
--- a/include/linux/dma/xilinx_dma.h
+++ b/include/linux/dma/xilinx_dma.h
@@ -27,6 +27,7 @@
  * @delay: Delay counter
  * @reset: Reset Channel
  * @ext_fsync: External Frame Sync source
+ * @vflip_en:  Vertical Flip enable
  */
 struct xilinx_vdma_config {
 	int frm_dly;
@@ -39,6 +40,7 @@ struct xilinx_vdma_config {
 	int delay;
 	int reset;
 	int ext_fsync;
+	bool vflip_en;
 };
 
 int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
-- 
1.7.1

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

* [PATCH 2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
@ 2018-06-13  7:34 ` Radhey Shyam Pandey
  0 siblings, 0 replies; 24+ messages in thread
From: Radhey Shyam Pandey @ 2018-06-13  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

Vertical flip state is exported in xilinx_vdma_config and depending
on IP configuration(c_enable_vert_flip) vertical flip state is
programmed in hardware.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
 include/linux/dma/xilinx_dma.h  |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 27b5235..c124423 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -115,6 +115,9 @@
 #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
 #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
 
+#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
+#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
+
 /* HW specific definitions */
 #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
 
@@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
  * @start_transfer: Differentiate b/w DMA IP's transfer
  * @stop_transfer: Differentiate b/w DMA IP's quiesce
  * @tdest: TDEST value for mcdma
+ * @has_vflip: S2MM vertical flip
  */
 struct xilinx_dma_chan {
 	struct xilinx_dma_device *xdev;
@@ -376,6 +380,7 @@ struct xilinx_dma_chan {
 	void (*start_transfer)(struct xilinx_dma_chan *chan);
 	int (*stop_transfer)(struct xilinx_dma_chan *chan);
 	u16 tdest;
+	bool has_vflip;
 };
 
 /**
@@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 				desc->async_tx.phys);
 
 	/* Configure the hardware using info in the config structure */
+	if (chan->has_vflip) {
+		reg = dma_read(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
+		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		reg |= config->vflip_en;
+		dma_write(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
+			  reg);
+	}
+
 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
 
 	if (config->frm_cnt_en)
@@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
 	}
 
 	chan->config.frm_cnt_en = cfg->frm_cnt_en;
+	chan->config.vflip_en = cfg->vflip_en;
+
 	if (cfg->park)
 		chan->config.park_frm = cfg->park_frm;
 	else
@@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
 		chan->direction = DMA_DEV_TO_MEM;
 		chan->id = chan_id;
 		chan->tdest = chan_id - xdev->nr_channels;
+		chan->has_vflip = of_property_read_bool(node,
+					"xlnx,enable-vert-flip");
+		if (chan->has_vflip) {
+			chan->config.vflip_en = dma_read(chan,
+				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP) &
+				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
+		}
 
 		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
 		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
diff --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
index 34b98f2..5b6e61e 100644
--- a/include/linux/dma/xilinx_dma.h
+++ b/include/linux/dma/xilinx_dma.h
@@ -27,6 +27,7 @@
  * @delay: Delay counter
  * @reset: Reset Channel
  * @ext_fsync: External Frame Sync source
+ * @vflip_en:  Vertical Flip enable
  */
 struct xilinx_vdma_config {
 	int frm_dly;
@@ -39,6 +40,7 @@ struct xilinx_vdma_config {
 	int delay;
 	int reset;
 	int ext_fsync;
+	bool vflip_en;
 };
 
 int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
-- 
1.7.1

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

* [2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
  2018-06-13  7:34 ` Radhey Shyam Pandey
  (?)
  (?)
@ 2018-06-25  9:05 ` Appana Durga Kedareswara Rao
  -1 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:05 UTC (permalink / raw)
  To: Radhey Shyam Pandey, vkoul, robh+dt, mark.rutland, Michal Simek,
	dan.j.williams, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel

<Snip>
> 
> Vertical flip state is exported in xilinx_vdma_config and depending on IP
> configuration(c_enable_vert_flip) vertical flip state is programmed in
> hardware.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>  

> ---
>  drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
>  include/linux/dma/xilinx_dma.h  |    2 ++
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c
> b/drivers/dma/xilinx/xilinx_dma.c index 27b5235..c124423 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -115,6 +115,9 @@
>  #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
>  #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
> 
> +#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
> +#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
> +
>  /* HW specific definitions */
>  #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
> 
> @@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
>   * @start_transfer: Differentiate b/w DMA IP's transfer
>   * @stop_transfer: Differentiate b/w DMA IP's quiesce
>   * @tdest: TDEST value for mcdma
> + * @has_vflip: S2MM vertical flip
>   */
>  struct xilinx_dma_chan {
>  	struct xilinx_dma_device *xdev;
> @@ -376,6 +380,7 @@ struct xilinx_dma_chan {
>  	void (*start_transfer)(struct xilinx_dma_chan *chan);
>  	int (*stop_transfer)(struct xilinx_dma_chan *chan);
>  	u16 tdest;
> +	bool has_vflip;
>  };
> 
>  /**
> @@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct
> xilinx_dma_chan *chan)
>  				desc->async_tx.phys);
> 
>  	/* Configure the hardware using info in the config structure */
> +	if (chan->has_vflip) {
> +		reg = dma_read(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
> +		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		reg |= config->vflip_en;
> +		dma_write(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
> +			  reg);
> +	}
> +
>  	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
> 
>  	if (config->frm_cnt_en)
> @@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct
> dma_chan *dchan,
>  	}
> 
>  	chan->config.frm_cnt_en = cfg->frm_cnt_en;
> +	chan->config.vflip_en = cfg->vflip_en;
> +
>  	if (cfg->park)
>  		chan->config.park_frm = cfg->park_frm;
>  	else
> @@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct
> xilinx_dma_device *xdev,
>  		chan->direction = DMA_DEV_TO_MEM;
>  		chan->id = chan_id;
>  		chan->tdest = chan_id - xdev->nr_channels;
> +		chan->has_vflip = of_property_read_bool(node,
> +					"xlnx,enable-vert-flip");
> +		if (chan->has_vflip) {
> +			chan->config.vflip_en = dma_read(chan,
> +				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP)
> &
> +				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		}
> 
>  		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
>  		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { diff
> --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
> index 34b98f2..5b6e61e 100644
> --- a/include/linux/dma/xilinx_dma.h
> +++ b/include/linux/dma/xilinx_dma.h
> @@ -27,6 +27,7 @@
>   * @delay: Delay counter
>   * @reset: Reset Channel
>   * @ext_fsync: External Frame Sync source
> + * @vflip_en:  Vertical Flip enable
>   */
>  struct xilinx_vdma_config {
>  	int frm_dly;
> @@ -39,6 +40,7 @@ struct xilinx_vdma_config {
>  	int delay;
>  	int reset;
>  	int ext_fsync;
> +	bool vflip_en;
>  };
> 
>  int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
> --
> 1.7.1
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH 2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
@ 2018-06-25  9:05 ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:05 UTC (permalink / raw)
  To: Radhey Shyam Pandey, vkoul, robh+dt, mark.rutland, Michal Simek,
	dan.j.williams, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey


<Snip>
> 
> Vertical flip state is exported in xilinx_vdma_config and depending on IP
> configuration(c_enable_vert_flip) vertical flip state is programmed in
> hardware.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>  

> ---
>  drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
>  include/linux/dma/xilinx_dma.h  |    2 ++
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c
> b/drivers/dma/xilinx/xilinx_dma.c index 27b5235..c124423 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -115,6 +115,9 @@
>  #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
>  #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
> 
> +#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
> +#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
> +
>  /* HW specific definitions */
>  #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
> 
> @@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
>   * @start_transfer: Differentiate b/w DMA IP's transfer
>   * @stop_transfer: Differentiate b/w DMA IP's quiesce
>   * @tdest: TDEST value for mcdma
> + * @has_vflip: S2MM vertical flip
>   */
>  struct xilinx_dma_chan {
>  	struct xilinx_dma_device *xdev;
> @@ -376,6 +380,7 @@ struct xilinx_dma_chan {
>  	void (*start_transfer)(struct xilinx_dma_chan *chan);
>  	int (*stop_transfer)(struct xilinx_dma_chan *chan);
>  	u16 tdest;
> +	bool has_vflip;
>  };
> 
>  /**
> @@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct
> xilinx_dma_chan *chan)
>  				desc->async_tx.phys);
> 
>  	/* Configure the hardware using info in the config structure */
> +	if (chan->has_vflip) {
> +		reg = dma_read(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
> +		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		reg |= config->vflip_en;
> +		dma_write(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
> +			  reg);
> +	}
> +
>  	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
> 
>  	if (config->frm_cnt_en)
> @@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct
> dma_chan *dchan,
>  	}
> 
>  	chan->config.frm_cnt_en = cfg->frm_cnt_en;
> +	chan->config.vflip_en = cfg->vflip_en;
> +
>  	if (cfg->park)
>  		chan->config.park_frm = cfg->park_frm;
>  	else
> @@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct
> xilinx_dma_device *xdev,
>  		chan->direction = DMA_DEV_TO_MEM;
>  		chan->id = chan_id;
>  		chan->tdest = chan_id - xdev->nr_channels;
> +		chan->has_vflip = of_property_read_bool(node,
> +					"xlnx,enable-vert-flip");
> +		if (chan->has_vflip) {
> +			chan->config.vflip_en = dma_read(chan,
> +				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP)
> &
> +				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		}
> 
>  		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
>  		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { diff
> --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
> index 34b98f2..5b6e61e 100644
> --- a/include/linux/dma/xilinx_dma.h
> +++ b/include/linux/dma/xilinx_dma.h
> @@ -27,6 +27,7 @@
>   * @delay: Delay counter
>   * @reset: Reset Channel
>   * @ext_fsync: External Frame Sync source
> + * @vflip_en:  Vertical Flip enable
>   */
>  struct xilinx_vdma_config {
>  	int frm_dly;
> @@ -39,6 +40,7 @@ struct xilinx_vdma_config {
>  	int delay;
>  	int reset;
>  	int ext_fsync;
> +	bool vflip_en;
>  };
> 
>  int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
> --
> 1.7.1


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

* RE: [PATCH 2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
@ 2018-06-25  9:05 ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:05 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, Michal Simek, dan.j.williams, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey


<Snip>
> 
> Vertical flip state is exported in xilinx_vdma_config and depending on IP
> configuration(c_enable_vert_flip) vertical flip state is programmed in
> hardware.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>  

> ---
>  drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
>  include/linux/dma/xilinx_dma.h  |    2 ++
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c
> b/drivers/dma/xilinx/xilinx_dma.c index 27b5235..c124423 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -115,6 +115,9 @@
>  #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
>  #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
> 
> +#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
> +#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
> +
>  /* HW specific definitions */
>  #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
> 
> @@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
>   * @start_transfer: Differentiate b/w DMA IP's transfer
>   * @stop_transfer: Differentiate b/w DMA IP's quiesce
>   * @tdest: TDEST value for mcdma
> + * @has_vflip: S2MM vertical flip
>   */
>  struct xilinx_dma_chan {
>  	struct xilinx_dma_device *xdev;
> @@ -376,6 +380,7 @@ struct xilinx_dma_chan {
>  	void (*start_transfer)(struct xilinx_dma_chan *chan);
>  	int (*stop_transfer)(struct xilinx_dma_chan *chan);
>  	u16 tdest;
> +	bool has_vflip;
>  };
> 
>  /**
> @@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct
> xilinx_dma_chan *chan)
>  				desc->async_tx.phys);
> 
>  	/* Configure the hardware using info in the config structure */
> +	if (chan->has_vflip) {
> +		reg = dma_read(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
> +		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		reg |= config->vflip_en;
> +		dma_write(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
> +			  reg);
> +	}
> +
>  	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
> 
>  	if (config->frm_cnt_en)
> @@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct
> dma_chan *dchan,
>  	}
> 
>  	chan->config.frm_cnt_en = cfg->frm_cnt_en;
> +	chan->config.vflip_en = cfg->vflip_en;
> +
>  	if (cfg->park)
>  		chan->config.park_frm = cfg->park_frm;
>  	else
> @@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct
> xilinx_dma_device *xdev,
>  		chan->direction = DMA_DEV_TO_MEM;
>  		chan->id = chan_id;
>  		chan->tdest = chan_id - xdev->nr_channels;
> +		chan->has_vflip = of_property_read_bool(node,
> +					"xlnx,enable-vert-flip");
> +		if (chan->has_vflip) {
> +			chan->config.vflip_en = dma_read(chan,
> +				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP)
> &
> +				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		}
> 
>  		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
>  		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { diff
> --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
> index 34b98f2..5b6e61e 100644
> --- a/include/linux/dma/xilinx_dma.h
> +++ b/include/linux/dma/xilinx_dma.h
> @@ -27,6 +27,7 @@
>   * @delay: Delay counter
>   * @reset: Reset Channel
>   * @ext_fsync: External Frame Sync source
> + * @vflip_en:  Vertical Flip enable
>   */
>  struct xilinx_vdma_config {
>  	int frm_dly;
> @@ -39,6 +40,7 @@ struct xilinx_vdma_config {
>  	int delay;
>  	int reset;
>  	int ext_fsync;
> +	bool vflip_en;
>  };
> 
>  int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
> --
> 1.7.1

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

* [PATCH 2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support
@ 2018-06-25  9:05 ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:05 UTC (permalink / raw)
  To: linux-arm-kernel


<Snip>
> 
> Vertical flip state is exported in xilinx_vdma_config and depending on IP
> configuration(c_enable_vert_flip) vertical flip state is programmed in
> hardware.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>  

> ---
>  drivers/dma/xilinx/xilinx_dma.c |   22 ++++++++++++++++++++++
>  include/linux/dma/xilinx_dma.h  |    2 ++
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c
> b/drivers/dma/xilinx/xilinx_dma.c index 27b5235..c124423 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -115,6 +115,9 @@
>  #define XILINX_VDMA_REG_START_ADDRESS(n)	(0x000c + 4 * (n))
>  #define XILINX_VDMA_REG_START_ADDRESS_64(n)	(0x000c + 8 * (n))
> 
> +#define XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP	0x00ec
> +#define XILINX_VDMA_ENABLE_VERTICAL_FLIP	BIT(0)
> +
>  /* HW specific definitions */
>  #define XILINX_DMA_MAX_CHANS_PER_DEVICE	0x20
> 
> @@ -340,6 +343,7 @@ struct xilinx_dma_tx_descriptor {
>   * @start_transfer: Differentiate b/w DMA IP's transfer
>   * @stop_transfer: Differentiate b/w DMA IP's quiesce
>   * @tdest: TDEST value for mcdma
> + * @has_vflip: S2MM vertical flip
>   */
>  struct xilinx_dma_chan {
>  	struct xilinx_dma_device *xdev;
> @@ -376,6 +380,7 @@ struct xilinx_dma_chan {
>  	void (*start_transfer)(struct xilinx_dma_chan *chan);
>  	int (*stop_transfer)(struct xilinx_dma_chan *chan);
>  	u16 tdest;
> +	bool has_vflip;
>  };
> 
>  /**
> @@ -1092,6 +1097,14 @@ static void xilinx_vdma_start_transfer(struct
> xilinx_dma_chan *chan)
>  				desc->async_tx.phys);
> 
>  	/* Configure the hardware using info in the config structure */
> +	if (chan->has_vflip) {
> +		reg = dma_read(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
> +		reg &= ~XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		reg |= config->vflip_en;
> +		dma_write(chan,
> XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
> +			  reg);
> +	}
> +
>  	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
> 
>  	if (config->frm_cnt_en)
> @@ -2105,6 +2118,8 @@ int xilinx_vdma_channel_set_config(struct
> dma_chan *dchan,
>  	}
> 
>  	chan->config.frm_cnt_en = cfg->frm_cnt_en;
> +	chan->config.vflip_en = cfg->vflip_en;
> +
>  	if (cfg->park)
>  		chan->config.park_frm = cfg->park_frm;
>  	else
> @@ -2428,6 +2443,13 @@ static int xilinx_dma_chan_probe(struct
> xilinx_dma_device *xdev,
>  		chan->direction = DMA_DEV_TO_MEM;
>  		chan->id = chan_id;
>  		chan->tdest = chan_id - xdev->nr_channels;
> +		chan->has_vflip = of_property_read_bool(node,
> +					"xlnx,enable-vert-flip");
> +		if (chan->has_vflip) {
> +			chan->config.vflip_en = dma_read(chan,
> +				XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP)
> &
> +				XILINX_VDMA_ENABLE_VERTICAL_FLIP;
> +		}
> 
>  		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
>  		if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { diff
> --git a/include/linux/dma/xilinx_dma.h b/include/linux/dma/xilinx_dma.h
> index 34b98f2..5b6e61e 100644
> --- a/include/linux/dma/xilinx_dma.h
> +++ b/include/linux/dma/xilinx_dma.h
> @@ -27,6 +27,7 @@
>   * @delay: Delay counter
>   * @reset: Reset Channel
>   * @ext_fsync: External Frame Sync source
> + * @vflip_en:  Vertical Flip enable
>   */
>  struct xilinx_vdma_config {
>  	int frm_dly;
> @@ -39,6 +40,7 @@ struct xilinx_vdma_config {
>  	int delay;
>  	int reset;
>  	int ext_fsync;
> +	bool vflip_en;
>  };
> 
>  int xilinx_vdma_channel_set_config(struct dma_chan *dchan,
> --
> 1.7.1

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

* [1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
  2018-06-13  7:34 ` Radhey Shyam Pandey
  (?)
  (?)
@ 2018-06-25  9:06 ` Appana Durga Kedareswara Rao
  -1 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:06 UTC (permalink / raw)
  To: Radhey Shyam Pandey, vkoul, robh+dt, mark.rutland, Michal Simek,
	dan.j.williams, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel

<Snip> 
> 
> The AXI VDMA core supports Vertical flip in S2MM path when Enable Vertical
> Flip (Advanced tab) is selected. To allow vertical flip programming define an
> optional 'xlnx,enable-vert-flip' channel child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>   

Regards,
Kedar.

> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> index a2b8bfa..174af2c 100644
> --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> @@ -66,6 +66,8 @@ Optional child node properties:
>  Optional child node properties for VDMA:
>  - xlnx,genlock-mode: Tells Genlock synchronization is
>  	enabled/disabled in hardware.
> +- xlnx,enable-vert-flip: Tells vertical flip is
> +	enabled/disabled in hardware(S2MM path).
>  Optional child node properties for AXI DMA:
>  -dma-channels: Number of dma channels in child node.
> 
> --
> 1.7.1
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-25  9:06 ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:06 UTC (permalink / raw)
  To: Radhey Shyam Pandey, vkoul, robh+dt, mark.rutland, Michal Simek,
	dan.j.williams, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

<Snip> 
> 
> The AXI VDMA core supports Vertical flip in S2MM path when Enable Vertical
> Flip (Advanced tab) is selected. To allow vertical flip programming define an
> optional 'xlnx,enable-vert-flip' channel child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>   

Regards,
Kedar.

> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> index a2b8bfa..174af2c 100644
> --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> @@ -66,6 +66,8 @@ Optional child node properties:
>  Optional child node properties for VDMA:
>  - xlnx,genlock-mode: Tells Genlock synchronization is
>  	enabled/disabled in hardware.
> +- xlnx,enable-vert-flip: Tells vertical flip is
> +	enabled/disabled in hardware(S2MM path).
>  Optional child node properties for AXI DMA:
>  -dma-channels: Number of dma channels in child node.
> 
> --
> 1.7.1


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

* RE: [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-25  9:06 ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:06 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, Michal Simek, dan.j.williams, lars
  Cc: dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Radhey Shyam Pandey

<Snip> 
> 
> The AXI VDMA core supports Vertical flip in S2MM path when Enable Vertical
> Flip (Advanced tab) is selected. To allow vertical flip programming define an
> optional 'xlnx,enable-vert-flip' channel child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>   

Regards,
Kedar.

> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> index a2b8bfa..174af2c 100644
> --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> @@ -66,6 +66,8 @@ Optional child node properties:
>  Optional child node properties for VDMA:
>  - xlnx,genlock-mode: Tells Genlock synchronization is
>  	enabled/disabled in hardware.
> +- xlnx,enable-vert-flip: Tells vertical flip is
> +	enabled/disabled in hardware(S2MM path).
>  Optional child node properties for AXI DMA:
>  -dma-channels: Number of dma channels in child node.
> 
> --
> 1.7.1

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

* [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-25  9:06 ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 24+ messages in thread
From: Appana Durga Kedareswara Rao @ 2018-06-25  9:06 UTC (permalink / raw)
  To: linux-arm-kernel

<Snip> 
> 
> The AXI VDMA core supports Vertical flip in S2MM path when Enable Vertical
> Flip (Advanced tab) is selected. To allow vertical flip programming define an
> optional 'xlnx,enable-vert-flip' channel child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Kedareswara rao Appana <appanad@xilinx.com>   

Regards,
Kedar.

> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> index a2b8bfa..174af2c 100644
> --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
> @@ -66,6 +66,8 @@ Optional child node properties:
>  Optional child node properties for VDMA:
>  - xlnx,genlock-mode: Tells Genlock synchronization is
>  	enabled/disabled in hardware.
> +- xlnx,enable-vert-flip: Tells vertical flip is
> +	enabled/disabled in hardware(S2MM path).
>  Optional child node properties for AXI DMA:
>  -dma-channels: Number of dma channels in child node.
> 
> --
> 1.7.1

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

* [1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
  2018-06-13  7:34 ` Radhey Shyam Pandey
  (?)
@ 2018-06-26 17:00 ` Rob Herring
  -1 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2018-06-26 17:00 UTC (permalink / raw)
  To: Radhey Shyam Pandey
  Cc: vkoul, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars, dmaengine, devicetree, linux-arm-kernel,
	linux-kernel

On Wed, Jun 13, 2018 at 01:04:47PM +0530, Radhey Shyam Pandey wrote:
> The AXI VDMA core supports Vertical flip in S2MM path when Enable
> Vertical Flip (Advanced tab) is selected. To allow vertical flip
> programming define an optional 'xlnx,enable-vert-flip' channel
> child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-26 17:00 ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2018-06-26 17:00 UTC (permalink / raw)
  To: Radhey Shyam Pandey
  Cc: vkoul, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars, dmaengine, devicetree, linux-arm-kernel,
	linux-kernel

On Wed, Jun 13, 2018 at 01:04:47PM +0530, Radhey Shyam Pandey wrote:
> The AXI VDMA core supports Vertical flip in S2MM path when Enable
> Vertical Flip (Advanced tab) is selected. To allow vertical flip
> programming define an optional 'xlnx,enable-vert-flip' channel
> child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

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

* [PATCH 1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property
@ 2018-06-26 17:00 ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2018-06-26 17:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 13, 2018 at 01:04:47PM +0530, Radhey Shyam Pandey wrote:
> The AXI VDMA core supports Vertical flip in S2MM path when Enable
> Vertical Flip (Advanced tab) is selected. To allow vertical flip
> programming define an optional 'xlnx,enable-vert-flip' channel
> child node property.
> 
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>  .../devicetree/bindings/dma/xilinx/xilinx_dma.txt  |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 0/2] Enable VDMA S2MM vertical flip support
  2018-06-13  7:34 ` Radhey Shyam Pandey
@ 2018-06-29  8:51   ` Vinod
  -1 siblings, 0 replies; 24+ messages in thread
From: Vinod @ 2018-06-29  8:51 UTC (permalink / raw)
  To: Radhey Shyam Pandey
  Cc: robh+dt, mark.rutland, michal.simek, dan.j.williams,
	appana.durga.rao, lars, dmaengine, devicetree, linux-arm-kernel,
	linux-kernel

On 13-06-18, 13:04, Radhey Shyam Pandey wrote:
> The AXI VDMA core supports Vertical Flip with S2MM as the path when
> Enable Vertical Flip (Advanced tab) is selected. This patch series add
> DT property for vertical flip and program its state in VDMA start_transfer.

Applied both, thanks

-- 
~Vinod

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

* [PATCH 0/2] Enable VDMA S2MM vertical flip support
@ 2018-06-29  8:51   ` Vinod
  0 siblings, 0 replies; 24+ messages in thread
From: Vinod @ 2018-06-29  8:51 UTC (permalink / raw)
  To: linux-arm-kernel

On 13-06-18, 13:04, Radhey Shyam Pandey wrote:
> The AXI VDMA core supports Vertical Flip with S2MM as the path when
> Enable Vertical Flip (Advanced tab) is selected. This patch series add
> DT property for vertical flip and program its state in VDMA start_transfer.

Applied both, thanks

-- 
~Vinod

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

end of thread, other threads:[~2018-06-29  8:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25  9:05 [2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support Appana Durga Kedareswara Rao
2018-06-25  9:05 ` [PATCH 2/2] " Appana Durga Kedareswara Rao
2018-06-25  9:05 ` Appana Durga Kedareswara Rao
2018-06-25  9:05 ` Appana Durga Kedareswara Rao
  -- strict thread matches above, loose matches on Subject: below --
2018-06-26 17:00 [1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property Rob Herring
2018-06-26 17:00 ` [PATCH 1/2] " Rob Herring
2018-06-26 17:00 ` Rob Herring
2018-06-25  9:06 [1/2] " Appana Durga Kedareswara Rao
2018-06-25  9:06 ` [PATCH 1/2] " Appana Durga Kedareswara Rao
2018-06-25  9:06 ` Appana Durga Kedareswara Rao
2018-06-25  9:06 ` Appana Durga Kedareswara Rao
2018-06-13  7:34 [2/2] dmaengine: xilinx_dma: Enable VDMA S2MM vertical flip support Radhey Shyam Pandey
2018-06-13  7:34 ` [PATCH 2/2] " Radhey Shyam Pandey
2018-06-13  7:34 ` Radhey Shyam Pandey
2018-06-13  7:34 ` Radhey Shyam Pandey
2018-06-13  7:34 [1/2] dt-bindings: dmaengine: xilinx_dma: Add VDMA vertical flip property Radhey Shyam Pandey
2018-06-13  7:34 ` [PATCH 1/2] " Radhey Shyam Pandey
2018-06-13  7:34 ` Radhey Shyam Pandey
2018-06-13  7:34 ` Radhey Shyam Pandey
2018-06-13  7:34 [PATCH 0/2] Enable VDMA S2MM vertical flip support Radhey Shyam Pandey
2018-06-13  7:34 ` Radhey Shyam Pandey
2018-06-13  7:34 ` Radhey Shyam Pandey
2018-06-29  8:51 ` Vinod
2018-06-29  8:51   ` Vinod

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.