From patchwork Mon Jul 22 11:58:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142591 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69ED645681; Mon, 22 Jul 2024 14:00:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27EE4402F2; Mon, 22 Jul 2024 13:59:35 +0200 (CEST) Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012009.outbound.protection.outlook.com [52.101.66.9]) by mails.dpdk.org (Postfix) with ESMTP id B84C7402DA for ; Mon, 22 Jul 2024 13:59:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QqHfNAggUG5VX7yJJ/N2wxmE//FOkeYOzIPxZNgt/2cTilll1OuLz7iZQTybXAOt8oJ27A93OOcf/L+ibxcFb4KrCrB10Z87ZMMhB5NyaV9SFnThEpuyPvGIQ2TSZXqwyzIeaxyJnvRjZ1/hqM5GIIbF+kOotqnBWD6HoGIOIqCVrpa6xUgSXrBjvLhsXgQmXAjfAslxt78CItLAAuuiSRX6QFJiCuID759MXRBOVUryADCecPOLhCF1B8KLwxHoGPJUP1EwxWS/Khk+9DgYe4hPTHuv2ZAchPGuxGcPLjc+mEGzCOzaX6C93GsljOV+DfpiqTxa0/C7Z743lTYsGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tWaV/ZlS74ufRVks7friUM9+wmCLCoIeAhgO7QRM3C8=; b=ilSri5Qz36EQWlSNLYqCwQlrNX8+WC0ntzbCIcIgzJ5VRD4G2mrTQMgMNmiOuLWfvuus2wLoITL0KBXTxAud/HCoqDCLilGo3Cr+Ib1zt04YfXT565X/ZkslLESAOdJB6nipgJpnSsYgQnBdWfisMgQeWmq7iZz3Ex/mZEUCPBkIxEtvsspb1DjkpO59MFRNm/c85aeRiBre6bs1dF6hbHyWDEBxq//9umklDiCgWqaiSrHQOJnPNqwdXVJQfvfu9ZFLswLfZ3NrwXmHLZSlm+UThmfAcyZxzAxeS/V7Jz6j6ujBIW2l7VS4jQfnYGKuRkoOBBFFQY5mcEoNjv3Mkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tWaV/ZlS74ufRVks7friUM9+wmCLCoIeAhgO7QRM3C8=; b=eSx1VeDO8e4BNq1GqY6M/9jE7YgdfzJZ5xf4MphEH61VrThKQdsyUm3YqM5/urwPa86s4bKhQkKB97Zq0p+u7IW60HfbparxvExHtmmmhVNI9l56Jz/0XFrci2sIz2NA4AI+B7YyDiB2IwMsYDh97FUc1khqqAKbs0HGpi8nZbM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) by AM8PR04MB7970.eurprd04.prod.outlook.com (2603:10a6:20b:24f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Mon, 22 Jul 2024 11:59:25 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%7]) with mapi id 15.20.7784.017; Mon, 22 Jul 2024 11:59:25 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Subject: [v2 13/30] dma/dpaa: support multi channels Date: Mon, 22 Jul 2024 17:28:26 +0530 Message-Id: <20240722115843.1830105-14-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722115843.1830105-1-g.singh@nxp.com> References: <20240719100126.1150373-1-g.singh@nxp.com> <20240722115843.1830105-1-g.singh@nxp.com> X-ClientProxiedBy: SI2PR02CA0025.apcprd02.prod.outlook.com (2603:1096:4:195::21) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|AM8PR04MB7970:EE_ X-MS-Office365-Filtering-Correlation-Id: ddb8b8c1-27a0-48a5-d2b9-08dcaa45bb7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: rSCAz0pxwUHcbwc+BKWWps+oqyD8fOhJFDeY0JsKSqOurwAU0gHXHxWHB8V6UCbb+uOl9gV/ZHnwV+D40Yyz3RryyrbeeDW2eSLalhqhDHsoRLF8fU3XtNWng1MNEFaXIzIHwYte2R8gurxApqG3MOb+FkGxze2rG6KlcqvXj02c5XG7GDfKCAtESaM/Di1TGh8hvIzm97Y+hEstU53+10NVbQOnVGNt5TBW6thUPq/YHr09yiVsBe1vOOVm2F3wASYPD8jcen3J31qAK+nUXBnY9QXHuwaBVL7c2T/MejYz34vyjdsjXKbfPJBwnyhxgDabvbl78E3rURy+lkTUksjE+ZfmTvJEF5xnZzD9UZtcCUy34vyUWTlbbhuk6G36oX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TRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8SPR01MB0024.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(52116014)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BpVuxCwX2nwFePfJJgp73wLxJjW/WVdB+UBogU9G/9GIwgKvGaGkwKQbGotwW475ucWJjjOKVLLDQAMam7kkkZeZOHFEH6BDhKKzv+m9bEr7i6+lRfc9S8C6ABdwlJwCQcvqUux580h2E0IlA0cGR8mEp6gVy/0S1LE2ia48XiPBOiFmMRemjO2NiZkMtHLH2NvP32Hjy6GOZszVTS97QZXKaFh4I96AbsLhVmu1zOwhWFEJYyhEdM9nI3/kwkBb8Bh0bwxMLT79vUWZNsWy77fR1IXV4jtSW1ym69AkMY1ooI0DvtYwEclu/xwA7EL/YNbJ+DBLxkqi32byyhN7wJId06hZk9p3wwqxZIrJ1NkH91052CT+iuV9mKH9kGM2yPgAXlFE0UXlkEdfs/ZeCME7wMThxp3OmgZ8haFc6RHL1uEDMzuSpz7mEUS2HmXtjd4YuUru6w1bwGQQ+jQg1QJfjIf6Ah3DRX2/59J3tLJUu7AMBmheM7o0bpTgR7lX1JMAdqds5Gef3BkD7oxZ3RiHwJVpZGALVLDgVRZKTBIf+Tb1fF0BAy2MWTHIpB+NlaW6NpHJmWfTSHINpwhCHnp/6jn6RANQuVMT/UVzZyqUmCCMJKchjp53QkmIOO4YYuuWTPP3nasoDDis8ITg76MuHBJ1clcfPgnDSmTWG2/sCosO2yjpVxLa35Zf5qd4orjcm4KzX9svVol2Vnaic/r0mnKDfBCpdDrey5PQkK5mcKTZKOuLAJ0nxUh9KDGzHNht58DqexAf/eiDRbMwC28bfH/BNvZgDUpnqSbeThAjmG/3gmhwJxfyh0OFPt5NMg70ZW2M9nG/4OKXqNbLQwYTg7FroD3zcp3TUijXfUG81QI5vHJ2//o4ZP8OUiCXH+7cave0hETbRuNL0LlFMuXiV2MlBKRH3Z5unOZL1SoT75Vj7hhmtG3j6lW7leZ8g/Wuob40qWzmv5GypLUbvk0DHRk8FYkRx2xhzFLw0V9oItDygnAu6geVjYC+OFBypB3196JwTr3xIKs6gdQOMcRzidQrYIvxgyPVIQ3/tdLWTN+SO88NfK5Pb2xwflitVotJQkdyggJfTcAGugfUrhwpGn47dFMQsYvWE4wWKTdwGcZdhrZZbBS2OlP8zXmPa5iNrHaok2fx3uOUyeLTjK5/jRklGJkq2Y1Q/tjx0cFxfDhnaxA4/XRkq/iG41OO0YqjZAp9qjMhxdW/zRecQmSKa3j0j2TbDoJj6upOSLcgWurNZyK5LXjTERXS67a0ViJlmXLXDG11dPmPnd9DMplQRkgONE/+L+wMwJlkHe7e5oRv2fDN3Q29Ui4SxVvWGDd0AqI92oluRGLMLBA6igObtMD8SkNjQeuLGEJo+JYB/HhzrGs7alPyu4dykPW01ysYlvWikoUSvx4t/1J5Do0V2hULiKcWJG66LCd5peDPkn2ckl1VON0ckqVW70TJzAeyvCtXxXA7Vzf/YJ22pe7rt9yhdv2vSLeJ85W3HOpRVY7H5t8BNAsjJGbvI/IsdJbdPBHqS4JDjOpFfa2DRi25tBvGsA1u7c4Opv0E6cIgSwyJ96q2S3Mc/GLGiJbF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddb8b8c1-27a0-48a5-d2b9-08dcaa45bb7b X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 11:59:25.7666 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pXaIdMzwG+R/9PC53t/A0fGWHSDrXJ2uuVgLy5RFu8RAVVHdhejqXcE/LgNnwl1V X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7970 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch add support to use multiple dma channel in the driver. Signed-off-by: Gagandeep Singh --- drivers/dma/dpaa/dpaa_qdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 @@ -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;