Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1624342lqg; Sun, 3 Mar 2024 20:34:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWByGXbMeg21xiPFjV/RR78sT/j0DIypZ83HI8DLPkzQekZjqxxhvU6w4n2yqWCprevM7QMHFqIMNfI7X9+NmGILZeqmRm484NxW058wg== X-Google-Smtp-Source: AGHT+IGYXeggWlTD5EIcL5mxtTTDTOTeGtLXxkolt2rNSpu+CCpKzDdMwgZBINyH3EgBV0PSXpvY X-Received: by 2002:a05:6358:524e:b0:17c:1bb1:5758 with SMTP id c14-20020a056358524e00b0017c1bb15758mr555970rwa.16.1709526860304; Sun, 03 Mar 2024 20:34:20 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o7-20020a63e347000000b005e45abbc54asi7779050pgj.186.2024.03.03.20.34.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 20:34:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90041-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=TQmLu4Mr; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-90041-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90041-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EE691281172 for ; Mon, 4 Mar 2024 04:34:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8681BBE68; Mon, 4 Mar 2024 04:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="TQmLu4Mr" Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2086.outbound.protection.outlook.com [40.107.241.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F5E68F59; Mon, 4 Mar 2024 04:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.86 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709526822; cv=fail; b=SCABUjKy6TJ24FaGSyHYi5VekJZH/S40nRgpCsFNSR2FC+yvzAEj6P54SyXGLSxxvIhzNdu4uVcklxF2Wy1VGriXikUrT4VQ7VF63xQo1VlRLrO+HmRsDnJlWICH0cQibTvtjYrvFosh9qfg2hMWLhLfs8vaYMD5guKtVgB+fuw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709526822; c=relaxed/simple; bh=06wTnnbrBAdqoSBatT/mjGZX0zrv5vZOioAvhfrT+54=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=oN1SEwj6vL7nI92jTyWCFQpvnVi71F9fRdjufNXiMWSjxOprX9xjyuPhqZlGiMunQtBpeYWlHAmsehlHQCMD5M8bvUs1XRj6wn4Mn7GspDDEKsOgjwD60+8bgtRedYi800+Q1VyZ2WWW5VzDYTWGjf3YV6j6k3GYd0BowP61Eeg= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=TQmLu4Mr; arc=fail smtp.client-ip=40.107.241.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZG3DJPagjbH3O46TBTHovEo/LztYWAPiMyfOB3q6K1xTH6+5j1Tq7v6VdUhMue1gefsoilfG2pRSW9UUYDJL224ANK1wvtuevIB0diokZLDhAMJTHhQEh3DWJU5xlhTjXycvXb7ohu4QbtXRfCoXgIKmaueXBnPWGycLa7KW4fOG/YMt6Gf5iV1ZoUr1yLwclzhoXId0J5+/QobJV3ONWeyewjw0Vzsmb11y0Li2Wg96xLa0PSUr8/P8NhNeX48yPOkhViScRUjuC7yc2uJwYyhA7wlxWrHE9ITTZ3YO431CN7/ah+DGoyRGvxAcJRbQyRsJpgopP0THW5YRKFnBUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=pz8SCtfXI5+U71jF6sH78bb7ODttSNhkG/ike5YIX6k=; b=SZRu2o6hk/lU73BLP6vDvPXqgrOWy2GhS24IQ+1UC0idnJ8sPW0oBFivToDRzxqkaIT34AQMmBSNy4NLZny/xVHFbFfqP1H3ZoAIGucKXlFEdRDwWmp02b0PZIzTMNNAgwWwfKuASI8imumwqumcCWZzlNv9aAUVNE+O/Wb7vcGaBwZbsjWDRADf2cGAfcWX0Jv/rv5uRqJOR6rUapFhtAi9TgkvzCfMhDrYWXc0PTYaFbGQqfnIfcB82E9xxfSHU8Ay4czFNNmJI9g69iJsNybHcyG3BPN+OQd+qImaV+Vm3zwTSNu9CqbQseAB8KWCGXso/324QlPJPaXiXsKpbg== 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=pz8SCtfXI5+U71jF6sH78bb7ODttSNhkG/ike5YIX6k=; b=TQmLu4Mr2q5e1+swVFJdnlhJyNtp6cQol8cqU4S8op0B4dssJbmGvx/EzQBkieVpDpzq3jtpMuBo4rzoiIxpJ7MTWJrEmlUuAmwNvxvhikpVh5uSBCqSjpKQFwvMBKIYYWe4njFKPohlJ4IwJw+M/CV22S67dmsrCUpPth0iU4Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DB9PR04MB8234.eurprd04.prod.outlook.com (2603:10a6:10:25d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.37; Mon, 4 Mar 2024 04:33:39 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::3168:91:27c6:edf6]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::3168:91:27c6:edf6%3]) with mapi id 15.20.7339.033; Mon, 4 Mar 2024 04:33:39 +0000 From: Frank Li Date: Sun, 03 Mar 2024 23:32:55 -0500 Subject: [PATCH 3/4] dmaengine: imx-sdma: Add multi fifo for DEV_TO_DEV Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240303-sdma_upstream-v1-3-869cd0165b09@nxp.com> References: <20240303-sdma_upstream-v1-0-869cd0165b09@nxp.com> In-Reply-To: <20240303-sdma_upstream-v1-0-869cd0165b09@nxp.com> To: Vinod Koul , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Frank Li , Joy Zou X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709526805; l=1222; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=YaaXAuvCaaK84kiwIUendNjFizt0HTaM7GccMsgIaa8=; b=6m6kj0LyEPt9m7OLRxncLNPHNOpexDqFPyXm36x9kyYUnOmcJbg6uTDWiJb79/lAZCf75ItqC dtOH6WaSRDJBFGX2YxZzXdHwtRgAbXiwf618AZSdpysRyIQuQjOZclw X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR01CA0040.prod.exchangelabs.com (2603:10b6:a03:94::17) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DB9PR04MB8234:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cb47818-e67a-4b89-e5d2-08dc3c0443b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aQLO9bGskBqnmN83tAaMQV5IHMPWpl01XF6HWBvAv0PnpyfDNfg1xMDYkydniR+YdCH04QU2O5klpoCHl77XXQ03Sl3PdPB1+J27mdaapPfNdyBybjeZjy5aLLuN+oeR6HxigLzzat5z+1TL3OeCArowiHAe4TVkK29m16ZqvB4e+MEZMByI2qwpLHYkPldT/Z7BFVbba+NjN9Ps/QBxGFrA7FF5MBYlz7pAVyTvQnYLQjg30x60NiSiyUGxSzk5wdiSqaVUrL+RXKHr9DfLuMXij+2rSOV7zhbwpXFi6Aa7igmqSGVfXJqBZS61lmajkveukS4aXAKg9VF9q1vhoCC54xlL9PxgQUvOJD+fljhRZC/honRpMRfdDZNvzuzljxCBgh2UFTE04jn55J00PQJykTlE02NlKRzoHP7kE2NIgs2esiuz1XcFx3/AR4gMJpxozjWbOFg78Sb49sY0y1pP49tIU+qVgdYHzR7jFVIP2l6EUwziPf8S3OVNKvW5R5puo9MRyZHbSvt2DrgsAKuTyzNzcAWvgHvqwekyZwwNbwowTnd0L4YrwepSbhpDDSmwBo/P8MwrIb707lcymDq9yhSepe3r3gRQVQFyuAxhrVhsqBCLEPXZvv74bCMKr7+Ay/IdYqcdjJv0HEFpJ6uiK3dQLzEoKbdifWiLcme/cim6p+6RiBSMJcZLdZHQf9hV3HXHAKAiZgdoSrK9qQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V1JOcTRKZEJjTUYxL2Yya1B2a1ZWRVkrSVVlSGgvSmpzSFBmdEdRNU9zM1JV?= =?utf-8?B?ejdmWnluZE0yUnZFT3Q4TklCK3VPS0xMKzhtVWFaSk5yNDVyV29pZUc2ejIr?= =?utf-8?B?a0lpR3hBRlAwVnQrbFYwNVFoMmRFdkFVZnUzZDFGeTIzVEpqdTlzUlNwNEdZ?= =?utf-8?B?ZjMyTG1sTTBGK1dJK3lwQU9hcnE5eXc4UG5uRUFkSDMwNUUvY0R2c25TQTh3?= =?utf-8?B?NnRUc1Q2VDJoem0yMTZRS3daZnMycnNUMnkvSVRBbjhxS0htWnlaMVRC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dJQlhMNGhiOGtzejVCMGNKZVptTWYyd0pP?= =?utf-8?Q?eRB/txFuQTHJUEfoEuRhRFrlW?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cb47818-e67a-4b89-e5d2-08dc3c0443b1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 04:33:39.3712 (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: MxG9+nZkdaV8zpVwY89OO5L+jeQOwuporYRG/ENbKcv/1CcG8X6rPyXzMH5mKo82RGw6VRLs9ydn9aKfVXrZHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8234 From: Joy Zou Support multi fifo for DEV_TO_DEV. Signed-off-by: Joy Zou Signed-off-by: Frank Li --- drivers/dma/imx-sdma.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index ef45420485dac..9b133990afa39 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -169,6 +169,8 @@ #define SDMA_WATERMARK_LEVEL_SPDIF BIT(10) #define SDMA_WATERMARK_LEVEL_SP BIT(11) #define SDMA_WATERMARK_LEVEL_DP BIT(12) +#define SDMA_WATERMARK_LEVEL_SD BIT(13) +#define SDMA_WATERMARK_LEVEL_DD BIT(14) #define SDMA_WATERMARK_LEVEL_HWML (0xFF << 16) #define SDMA_WATERMARK_LEVEL_LWE BIT(28) #define SDMA_WATERMARK_LEVEL_HWE BIT(29) @@ -1259,6 +1261,11 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac) sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP; sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT; + + if (sdmac->n_fifos_src > 1) + sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_SD; + if (sdmac->n_fifos_dst > 1) + sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DD; } static void sdma_set_watermarklevel_for_sais(struct sdma_channel *sdmac) -- 2.34.1