From patchwork Mon Jul 22 16:39:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142632 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 8CD9845683; Mon, 22 Jul 2024 18:41:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D824C40E42; Mon, 22 Jul 2024 18:40:13 +0200 (CEST) Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011002.outbound.protection.outlook.com [52.101.70.2]) by mails.dpdk.org (Postfix) with ESMTP id 7AFC240E40 for ; Mon, 22 Jul 2024 18:40:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WQ9vWPtGaObl7VGV/JTxD/hI9d2Hb4xHlre9Ibk/45Vie/CPTXFV9SgevOtCm46rmifoJGqVjS/QENz9qrl60fZacjigZmltT05i4T/02LM1IihO1hpz4r9t5yG5gmgUh54/0PInmldY921FaxEp+x3llgT2tke9Nqf64g2fJiRZwpl2wlQvgiTqP8gUA1auyc7GRX7AItiP4slzH+SWe6FLm51tzoQEWGJwiV21yy4bsgWMgESlB50MrWqLZ2g8uUOFCLa/L27LMID0ZoFpSHzy5OH2oHiHB8imdq1Gy56Dzii0QbpfhS76C/Bh4UbvRAAW5UH9LAhGweRfVD94hQ== 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=HrpzYs+0QWPkkrXg0sWXy1Y25Vz5vd9ZQUjpQh71AOTZbhRu26W3mW+76qKW3NuaV6keELbY3aCv24rVQu7d9Btr8ZisptWI8I2p5WLbqughC4/DjNy4kEnFN2JNRQ65BKNI6lsotF/PLBGvQWY+tKsUOWjIhR1C5hR3bptVrJB7r15Una52LJZykrok6TpeBbiMO3O/FeN1S/2eg2VVNk4mmwacCJaf+byUhhJ8ZdeVWnxuV7gfC8CuHMmlzomNqDddrF5WDJeukdsICO5vvTST34hLs9EMg0gV1P9N0yzfHqwPCc4/5ogDdpbsCJorhYKrUJAwETFeNeyjCm3U+A== 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=jr2PpOJpqesj/xuQxC5kNpcFhA6cUEkIttlN2wslrwFOTt6mCHnv3+x7n0LovXIctJHYZ1qLDqK/ASyOJUKZFy4I9bhHdrBsJ6LRUvJjI6y4L6YuRATu7kxumE7ULkDk+9Y6fjNastMO1K50IT87tHwUj2dYg+l2sHIUWfmeqo0= 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 PA1PR04MB10652.eurprd04.prod.outlook.com (2603:10a6:102:491::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Mon, 22 Jul 2024 16:40:09 +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 16:40:09 +0000 From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena Subject: [v3 13/30] dma/dpaa: support multi channels Date: Mon, 22 Jul 2024 22:09:13 +0530 Message-Id: <20240722163930.2171568-14-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722163930.2171568-1-g.singh@nxp.com> References: <20240722115843.1830105-1-g.singh@nxp.com> <20240722163930.2171568-1-g.singh@nxp.com> X-ClientProxiedBy: SG3P274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::26) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA1PR04MB10652:EE_ X-MS-Office365-Filtering-Correlation-Id: 0785d237-7efb-4440-20de-08dcaa6cf302 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: 3knKvuKk2opuwqPmtOqifxSyKrt1iKJSCO/2KQOW7ixnJNQKn6+FmUYSzdNZ2jJbsLpTIVw8Y6kXBWEx78MTgNm9Ga63WjuoJZ/1TdIGYb9SQ2MdB3ATJPLL+MFz80lXLKIic6u73Xt58fcy1w01fsVDJThHy1v6qkQ74sxxdcAErqkLvCUM3TyKjDpKti644075Q8+SSRz0/Xh8ttCUjtxZitCjz7ATsECESdJZpa6N0JA+9hspUKQ8M563smexCESoCu/uhEDwqbo4d0tOpEhzyPJEvNbV9c6gaLV4EENWab1ZxV3Ni7q9I6XSr4aeXcx0w+CMXl6ZBFUVrmuQnL21tMjoeJFXWp63s1OS9nKRCZ/oMF1zCi/T7lbqOoddJ5IpNeEW5wyY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V:; IPV:NLI; SFV:NSPM; H:AS8SPR01MB0024.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zMJqLSQEyqbxRtvfS+AGfH8BAXJcqgL4wmGs5y5SYRdXBqbY2TT9hJrl2D+9Z4CAwtNjNdw+8n1RIcMipArVUb0y4R6YfvSx2jngAvJWqd3ZxIYyHO3l488KuwQYsW6g6moVhjWxBwaZ4ZaxjL1p8kBkuhXzXbnwZ/MxM0hIEXQYaXkp0hE1Ud2do9/VbzDfzHSJ1krElqwc8B1lj7I1OMTEPoNIslJv7eaht/4Vr22TMDULc65hsSA0wAkL3OZnpaE8h8rn4y3QM6/xi6Eqrj0g8KCxNRIlavpSigvP7KH1hXGqQzUKeo4oJ6B8nT6i7AaWtWIT+OMsNriPBe/j5AeWgLw6Cfqy53lgjm6DG+g0VbjcxB+8akeCamR5GYWmCCFV6SLEgslrHf7UGNuE/E8Ud/vRBodAwq6C93d0mTq/hP6CsBEhKS7ml/e9ygiXpiwtLYPYWe9hGH6bUFWxpSbDwoRZg4pJKEuCq9aa0Oo5FjHjiBk0xbKT0RcX/ZXa/YrUGHt/FkzmD+xHxDdZVadCA9rHNlwciRH9BagoJmIVL4h2cDPJnBTHpKe57VTpPPZ2havy9mVlqVDq1Gkw3OV2OCD+BoFoBYCFkrOgDYnkDe/j9hnwTdlKCyPSjw/QY+V5X0hE1hdl/l4oh+GB7f3z1s4lj9jB0N92l2we/+5YMd9pQR2pmQ/sT5VQ06xe28duxDVdfC2kpD7xgxKNlXJ07cgXZQac6fhBNCZLHICVhI9qbZyE2m9bRWPF7whHQOf8ob7VCXyLxvAbFTaJYDgNcbDZcZ8n0DPdASIewR/EGkx4EmG3bWrTuTHlYNihf7+GvgB+6qT/DEcIgIJyDNZAaqIx/NIQdVxyrdwDSzN600NQpi4FYlY4dZlt+se9SH7GiboSTwOBqjUI72rEUxzItgPuh5joll1L8MGQ0MMAMMFYcF8AyUPVbFGbLvwkcCHP6gstPzsM/NQVbm8SnQPDznISsgmZjo2lrOwsZv01fXJCZ4IJdYQU39bT3buc3T4L2JJnfE1zx36a9cIlJeL6tkI/vm6vBsqFvs491l5gKZy0f1NFkpt77vL5xSXOjIggrMCDK4c1kAmXcCoh4TCGdPaUDUFUKB4EyiD154wNZaiDqGRGewWgTxE1su/qiS20WgZqd+G48+WCzd/f8KoMjKLgsr/lA/kPThG6wLE6cnYw+LY76yaSAK/lSxwsLLkpQ8aq5Yp8A7G6esyq8Xt0qol4fWD3z0uWA+51E2hLLEk6UhEQzAmCypG5aC/4hBLe8gRHr87HEwfx+Sv0Ox1trN1K0dWDyUK/K+O+2l7nVe1XTR4hsH7ehG6HSJxLYiyhKuH/y0hunBEGxiFMGzfkh8CGtUV89E+6px7HJ96xESIrP8hj56wt1k37OEaW2vhgoH4GQL5s9+0ThFtua7wavRT+lZ3B74XlvVBE3ZIrbx/nOqg3fJNx77AJEO/LduNeljMOyNpG8HengWIRhGVlZtpQhkXcOvPj+Lfp2GAVZ6pU0CPf+YynxaklTQMlv97dmZI+HnBLWPMDXY8tK7Uv2RigJcDnWJ2FrWl7kETUJ3oEcLr0RewomApL3CeR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0785d237-7efb-4440-20de-08dcaa6cf302 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 16:40:09.2786 (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: 0xZYC7u2A6bu3mPrpjNjG1Fuda/iSn/KtlyCV9CrkPe3E4BjO4nKl84Le4v1mq1x X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10652 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;