All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] dma: don't set chancnt
@ 2023-03-13 17:02 ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

I'm patching dw-axi-dmac to add more features, but I found a small
clean up point and some drivers in drivers/dma/ have the same issue,
so this series comes.

The dma framework will calculate the dma channels chancnt, setting it
is wrong.

NOTE: I leav drivers/dma/ioat/ as is, because its logic have a
heavy dependency on chancnt usage, however it's still doable.

Jisheng Zhang (5):
  dmaengine: dw-axi-dmac: Don't set chancnt
  dmaengine: axi-dmac: Don't set chancnt
  dmaengine: plx_dma: Don't set chancnt
  dmaengine: hidma: Don't set chancnt
  dmaengine: sprd: Don't set chancnt

 drivers/dma/dma-axi-dmac.c                     | 1 -
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 -
 drivers/dma/plx_dma.c                          | 1 -
 drivers/dma/qcom/hidma.c                       | 1 -
 drivers/dma/sprd-dma.c                         | 1 -
 5 files changed, 5 deletions(-)

-- 
2.39.2


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

* [PATCH 0/5] dma: don't set chancnt
@ 2023-03-13 17:02 ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

I'm patching dw-axi-dmac to add more features, but I found a small
clean up point and some drivers in drivers/dma/ have the same issue,
so this series comes.

The dma framework will calculate the dma channels chancnt, setting it
is wrong.

NOTE: I leav drivers/dma/ioat/ as is, because its logic have a
heavy dependency on chancnt usage, however it's still doable.

Jisheng Zhang (5):
  dmaengine: dw-axi-dmac: Don't set chancnt
  dmaengine: axi-dmac: Don't set chancnt
  dmaengine: plx_dma: Don't set chancnt
  dmaengine: hidma: Don't set chancnt
  dmaengine: sprd: Don't set chancnt

 drivers/dma/dma-axi-dmac.c                     | 1 -
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 -
 drivers/dma/plx_dma.c                          | 1 -
 drivers/dma/qcom/hidma.c                       | 1 -
 drivers/dma/sprd-dma.c                         | 1 -
 5 files changed, 5 deletions(-)

-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/5] dmaengine: dw-axi-dmac: Don't set chancnt
  2023-03-13 17:02 ` Jisheng Zhang
@ 2023-03-13 17:02   ` Jisheng Zhang
  -1 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 4169e1d7d5ca..7f3a60e28e38 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1445,7 +1445,6 @@ static int dw_probe(struct platform_device *pdev)
 	dma_cap_set(DMA_CYCLIC, dw->dma.cap_mask);
 
 	/* DMA capabilities */
-	dw->dma.chancnt = hdata->nr_channels;
 	dw->dma.max_burst = hdata->axi_rw_burst_len;
 	dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS;
 	dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS;
-- 
2.39.2


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

* [PATCH 1/5] dmaengine: dw-axi-dmac: Don't set chancnt
@ 2023-03-13 17:02   ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 4169e1d7d5ca..7f3a60e28e38 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1445,7 +1445,6 @@ static int dw_probe(struct platform_device *pdev)
 	dma_cap_set(DMA_CYCLIC, dw->dma.cap_mask);
 
 	/* DMA capabilities */
-	dw->dma.chancnt = hdata->nr_channels;
 	dw->dma.max_burst = hdata->axi_rw_burst_len;
 	dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS;
 	dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS;
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/5] dmaengine: axi-dmac: Don't set chancnt
  2023-03-13 17:02 ` Jisheng Zhang
@ 2023-03-13 17:02   ` Jisheng Zhang
  -1 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/dma-axi-dmac.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index a812b9b00e6b..fc7cdad37161 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -963,7 +963,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
 	dma_dev->device_terminate_all = axi_dmac_terminate_all;
 	dma_dev->device_synchronize = axi_dmac_synchronize;
 	dma_dev->dev = &pdev->dev;
-	dma_dev->chancnt = 1;
 	dma_dev->src_addr_widths = BIT(dmac->chan.src_width);
 	dma_dev->dst_addr_widths = BIT(dmac->chan.dest_width);
 	dma_dev->directions = BIT(dmac->chan.direction);
-- 
2.39.2


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

* [PATCH 2/5] dmaengine: axi-dmac: Don't set chancnt
@ 2023-03-13 17:02   ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/dma-axi-dmac.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index a812b9b00e6b..fc7cdad37161 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -963,7 +963,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
 	dma_dev->device_terminate_all = axi_dmac_terminate_all;
 	dma_dev->device_synchronize = axi_dmac_synchronize;
 	dma_dev->dev = &pdev->dev;
-	dma_dev->chancnt = 1;
 	dma_dev->src_addr_widths = BIT(dmac->chan.src_width);
 	dma_dev->dst_addr_widths = BIT(dmac->chan.dest_width);
 	dma_dev->directions = BIT(dmac->chan.direction);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/5] dmaengine: plx_dma: Don't set chancnt
  2023-03-13 17:02 ` Jisheng Zhang
@ 2023-03-13 17:02   ` Jisheng Zhang
  -1 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/plx_dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
index 12725fa1655f..34b6416c3287 100644
--- a/drivers/dma/plx_dma.c
+++ b/drivers/dma/plx_dma.c
@@ -517,7 +517,6 @@ static int plx_dma_create(struct pci_dev *pdev)
 	plxdev->bar = pcim_iomap_table(pdev)[0];
 
 	dma = &plxdev->dma_dev;
-	dma->chancnt = 1;
 	INIT_LIST_HEAD(&dma->channels);
 	dma_cap_set(DMA_MEMCPY, dma->cap_mask);
 	dma->copy_align = DMAENGINE_ALIGN_1_BYTE;
-- 
2.39.2


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

* [PATCH 3/5] dmaengine: plx_dma: Don't set chancnt
@ 2023-03-13 17:02   ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/plx_dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
index 12725fa1655f..34b6416c3287 100644
--- a/drivers/dma/plx_dma.c
+++ b/drivers/dma/plx_dma.c
@@ -517,7 +517,6 @@ static int plx_dma_create(struct pci_dev *pdev)
 	plxdev->bar = pcim_iomap_table(pdev)[0];
 
 	dma = &plxdev->dma_dev;
-	dma->chancnt = 1;
 	INIT_LIST_HEAD(&dma->channels);
 	dma_cap_set(DMA_MEMCPY, dma->cap_mask);
 	dma->copy_align = DMAENGINE_ALIGN_1_BYTE;
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/5] dmaengine: hidma: Don't set chancnt
  2023-03-13 17:02 ` Jisheng Zhang
@ 2023-03-13 17:02   ` Jisheng Zhang
  -1 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/qcom/hidma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 04d1c33afc12..344525c3a32f 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -214,7 +214,6 @@ static int hidma_chan_init(struct hidma_dev *dmadev, u32 dma_sig)
 
 	spin_lock_init(&mchan->lock);
 	list_add_tail(&mchan->chan.device_node, &ddev->channels);
-	dmadev->ddev.chancnt++;
 	return 0;
 }
 
-- 
2.39.2


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

* [PATCH 4/5] dmaengine: hidma: Don't set chancnt
@ 2023-03-13 17:02   ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/qcom/hidma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 04d1c33afc12..344525c3a32f 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -214,7 +214,6 @@ static int hidma_chan_init(struct hidma_dev *dmadev, u32 dma_sig)
 
 	spin_lock_init(&mchan->lock);
 	list_add_tail(&mchan->chan.device_node, &ddev->channels);
-	dmadev->ddev.chancnt++;
 	return 0;
 }
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 5/5] dmaengine: sprd: Don't set chancnt
  2023-03-13 17:02 ` Jisheng Zhang
@ 2023-03-13 17:02   ` Jisheng Zhang
  -1 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/sprd-dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index 474d3ba8ec9f..2b639adb48ba 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -1169,7 +1169,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
 
 	dma_cap_set(DMA_MEMCPY, sdev->dma_dev.cap_mask);
 	sdev->total_chns = chn_count;
-	sdev->dma_dev.chancnt = chn_count;
 	INIT_LIST_HEAD(&sdev->dma_dev.channels);
 	INIT_LIST_HEAD(&sdev->dma_dev.global_node);
 	sdev->dma_dev.dev = &pdev->dev;
-- 
2.39.2


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

* [PATCH 5/5] dmaengine: sprd: Don't set chancnt
@ 2023-03-13 17:02   ` Jisheng Zhang
  0 siblings, 0 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-03-13 17:02 UTC (permalink / raw)
  To: Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/sprd-dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index 474d3ba8ec9f..2b639adb48ba 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -1169,7 +1169,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
 
 	dma_cap_set(DMA_MEMCPY, sdev->dma_dev.cap_mask);
 	sdev->total_chns = chn_count;
-	sdev->dma_dev.chancnt = chn_count;
 	INIT_LIST_HEAD(&sdev->dma_dev.channels);
 	INIT_LIST_HEAD(&sdev->dma_dev.global_node);
 	sdev->dma_dev.dev = &pdev->dev;
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/5] dmaengine: axi-dmac: Don't set chancnt
  2023-03-13 17:02   ` Jisheng Zhang
@ 2023-03-13 17:36     ` Lars-Peter Clausen
  -1 siblings, 0 replies; 18+ messages in thread
From: Lars-Peter Clausen @ 2023-03-13 17:36 UTC (permalink / raw)
  To: Jisheng Zhang, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

On 3/13/23 10:02, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it
> outself is wrong.

s/outself/ourself/

Looks good otherwise, thanks.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/dma/dma-axi-dmac.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
> index a812b9b00e6b..fc7cdad37161 100644
> --- a/drivers/dma/dma-axi-dmac.c
> +++ b/drivers/dma/dma-axi-dmac.c
> @@ -963,7 +963,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
>   	dma_dev->device_terminate_all = axi_dmac_terminate_all;
>   	dma_dev->device_synchronize = axi_dmac_synchronize;
>   	dma_dev->dev = &pdev->dev;
> -	dma_dev->chancnt = 1;
>   	dma_dev->src_addr_widths = BIT(dmac->chan.src_width);
>   	dma_dev->dst_addr_widths = BIT(dmac->chan.dest_width);
>   	dma_dev->directions = BIT(dmac->chan.direction);



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/5] dmaengine: axi-dmac: Don't set chancnt
@ 2023-03-13 17:36     ` Lars-Peter Clausen
  0 siblings, 0 replies; 18+ messages in thread
From: Lars-Peter Clausen @ 2023-03-13 17:36 UTC (permalink / raw)
  To: Jisheng Zhang, Vinod Koul, Eugeniy Paltsev, Logan Gunthorpe,
	Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Orson Zhai, Baolin Wang, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm

On 3/13/23 10:02, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it
> outself is wrong.

s/outself/ourself/

Looks good otherwise, thanks.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>   drivers/dma/dma-axi-dmac.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
> index a812b9b00e6b..fc7cdad37161 100644
> --- a/drivers/dma/dma-axi-dmac.c
> +++ b/drivers/dma/dma-axi-dmac.c
> @@ -963,7 +963,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
>   	dma_dev->device_terminate_all = axi_dmac_terminate_all;
>   	dma_dev->device_synchronize = axi_dmac_synchronize;
>   	dma_dev->dev = &pdev->dev;
> -	dma_dev->chancnt = 1;
>   	dma_dev->src_addr_widths = BIT(dmac->chan.src_width);
>   	dma_dev->dst_addr_widths = BIT(dmac->chan.dest_width);
>   	dma_dev->directions = BIT(dmac->chan.direction);



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

* Re: [PATCH 5/5] dmaengine: sprd: Don't set chancnt
  2023-03-13 17:02   ` Jisheng Zhang
@ 2023-03-14  3:51     ` Baolin Wang
  -1 siblings, 0 replies; 18+ messages in thread
From: Baolin Wang @ 2023-03-14  3:51 UTC (permalink / raw)
  To: Jisheng Zhang, Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev,
	Logan Gunthorpe, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Orson Zhai, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm



On 3/14/2023 1:02 AM, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it
> outself is wrong.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   drivers/dma/sprd-dma.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 474d3ba8ec9f..2b639adb48ba 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1169,7 +1169,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
>   
>   	dma_cap_set(DMA_MEMCPY, sdev->dma_dev.cap_mask);
>   	sdev->total_chns = chn_count;
> -	sdev->dma_dev.chancnt = chn_count;
>   	INIT_LIST_HEAD(&sdev->dma_dev.channels);
>   	INIT_LIST_HEAD(&sdev->dma_dev.global_node);
>   	sdev->dma_dev.dev = &pdev->dev;

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

* Re: [PATCH 5/5] dmaengine: sprd: Don't set chancnt
@ 2023-03-14  3:51     ` Baolin Wang
  0 siblings, 0 replies; 18+ messages in thread
From: Baolin Wang @ 2023-03-14  3:51 UTC (permalink / raw)
  To: Jisheng Zhang, Lars-Peter Clausen, Vinod Koul, Eugeniy Paltsev,
	Logan Gunthorpe, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Orson Zhai, Chunyan Zhang
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm



On 3/14/2023 1:02 AM, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it
> outself is wrong.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   drivers/dma/sprd-dma.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 474d3ba8ec9f..2b639adb48ba 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1169,7 +1169,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
>   
>   	dma_cap_set(DMA_MEMCPY, sdev->dma_dev.cap_mask);
>   	sdev->total_chns = chn_count;
> -	sdev->dma_dev.chancnt = chn_count;
>   	INIT_LIST_HEAD(&sdev->dma_dev.channels);
>   	INIT_LIST_HEAD(&sdev->dma_dev.global_node);
>   	sdev->dma_dev.dev = &pdev->dev;

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/5] dmaengine: dw-axi-dmac: Don't set chancnt
  2023-03-13 17:02   ` Jisheng Zhang
@ 2023-03-17 17:39     ` Vinod Koul
  -1 siblings, 0 replies; 18+ messages in thread
From: Vinod Koul @ 2023-03-17 17:39 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Lars-Peter Clausen, Eugeniy Paltsev, Logan Gunthorpe, Sinan Kaya,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Orson Zhai,
	Baolin Wang, Chunyan Zhang, dmaengine, linux-kernel,
	linux-arm-kernel, linux-arm-msm

On 14-03-23, 01:02, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it

The dmaengine framework...

> outself is wrong.

s/outself/ourself

Looks this this is needed for all the patches

> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>  drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 4169e1d7d5ca..7f3a60e28e38 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1445,7 +1445,6 @@ static int dw_probe(struct platform_device *pdev)
>  	dma_cap_set(DMA_CYCLIC, dw->dma.cap_mask);
>  
>  	/* DMA capabilities */
> -	dw->dma.chancnt = hdata->nr_channels;
>  	dw->dma.max_burst = hdata->axi_rw_burst_len;
>  	dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS;
>  	dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS;
> -- 
> 2.39.2

-- 
~Vinod

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

* Re: [PATCH 1/5] dmaengine: dw-axi-dmac: Don't set chancnt
@ 2023-03-17 17:39     ` Vinod Koul
  0 siblings, 0 replies; 18+ messages in thread
From: Vinod Koul @ 2023-03-17 17:39 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Lars-Peter Clausen, Eugeniy Paltsev, Logan Gunthorpe, Sinan Kaya,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Orson Zhai,
	Baolin Wang, Chunyan Zhang, dmaengine, linux-kernel,
	linux-arm-kernel, linux-arm-msm

On 14-03-23, 01:02, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it

The dmaengine framework...

> outself is wrong.

s/outself/ourself

Looks this this is needed for all the patches

> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>  drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 4169e1d7d5ca..7f3a60e28e38 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1445,7 +1445,6 @@ static int dw_probe(struct platform_device *pdev)
>  	dma_cap_set(DMA_CYCLIC, dw->dma.cap_mask);
>  
>  	/* DMA capabilities */
> -	dw->dma.chancnt = hdata->nr_channels;
>  	dw->dma.max_burst = hdata->axi_rw_burst_len;
>  	dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS;
>  	dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS;
> -- 
> 2.39.2

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-03-17 17:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 17:02 [PATCH 0/5] dma: don't set chancnt Jisheng Zhang
2023-03-13 17:02 ` Jisheng Zhang
2023-03-13 17:02 ` [PATCH 1/5] dmaengine: dw-axi-dmac: Don't " Jisheng Zhang
2023-03-13 17:02   ` Jisheng Zhang
2023-03-17 17:39   ` Vinod Koul
2023-03-17 17:39     ` Vinod Koul
2023-03-13 17:02 ` [PATCH 2/5] dmaengine: axi-dmac: " Jisheng Zhang
2023-03-13 17:02   ` Jisheng Zhang
2023-03-13 17:36   ` Lars-Peter Clausen
2023-03-13 17:36     ` Lars-Peter Clausen
2023-03-13 17:02 ` [PATCH 3/5] dmaengine: plx_dma: " Jisheng Zhang
2023-03-13 17:02   ` Jisheng Zhang
2023-03-13 17:02 ` [PATCH 4/5] dmaengine: hidma: " Jisheng Zhang
2023-03-13 17:02   ` Jisheng Zhang
2023-03-13 17:02 ` [PATCH 5/5] dmaengine: sprd: " Jisheng Zhang
2023-03-13 17:02   ` Jisheng Zhang
2023-03-14  3:51   ` Baolin Wang
2023-03-14  3:51     ` Baolin Wang

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.