[v3,13/30] dma/dpaa: support multi channels

Message ID 20240722163930.2171568-14-g.singh@nxp.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series NXP DMA driver fixes and Enhancements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Gagandeep Singh July 22, 2024, 4:39 p.m. UTC
This patch add support to use multiple dma channel in the driver.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/dma/dpaa/dpaa_qdma.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index 10e65ef1d7..24ad7ad019 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -1,5 +1,5 @@ 
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2021 NXP
+ * Copyright 2021-2024 NXP
  */
 
 #include <bus_dpaa_driver.h>
@@ -648,8 +648,8 @@  fsl_qdma_alloc_chan_resources(struct fsl_qdma_chan *fsl_chan)
 	}
 
 finally:
-	return fsl_qdma->desc_allocated++;
-
+	fsl_qdma->desc_allocated++;
+	return 0;
 exit:
 	return -ENOMEM;
 }
@@ -670,7 +670,7 @@  dpaa_info_get(const struct rte_dma_dev *dev, struct rte_dma_info *dev_info,
 			     RTE_DMA_CAPA_DEV_TO_MEM |
 			     RTE_DMA_CAPA_SILENT |
 			     RTE_DMA_CAPA_OPS_COPY;
-	dev_info->max_vchans = 1;
+	dev_info->max_vchans = 4;
 	dev_info->max_desc = DPAADMA_MAX_DESC;
 	dev_info->min_desc = DPAADMA_MIN_DESC;