From patchwork Thu Nov 24 10:27:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarath Babu Naidu Gaddam X-Patchwork-Id: 13054794 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D0C0C433FE for ; Thu, 24 Nov 2022 10:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbiKXK2m (ORCPT ); Thu, 24 Nov 2022 05:28:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbiKXK2d (ORCPT ); Thu, 24 Nov 2022 05:28:33 -0500 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2072.outbound.protection.outlook.com [40.107.95.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 216D4C6899; Thu, 24 Nov 2022 02:28:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kl7SgcibHX3qr1DePwblNb0IxHZmnBH9p/mUYIh4FfYK6R40AyUU4ZqwNj03KHq9VP4tvw0/PoVqyQiOGXHTVMd/EK4ZlAvMz8UBxXiCfUg3TNkKeGMmzv/izn1WU4CwrVl2kio3RTykxLQJvLJ1bm43Bqbp234Q4eHQnWUoFACdTGTpkHUpgtYI15Jr/NmX8KhmWhfHnqBziMkYLT/GfR+wzH/169C4UOqeeG3BiFjlx/4Nltb/rlD38Em3H2RMCgyta+CKHKH2BjmF6SsHRXl0qhljxez2CIlKshTHaawRJ8kPTeRxB60ezQblNCFt+BUhODagiWZLjAg6Jg0FmA== 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=0he5SYKDwNrcgnKlPGqkas8E2vgFwGCDnciSWTb2lZ8=; b=OXG/J6Fzt3U/eeaO0wMPQH0shLTtDA1+xIJZRQ2BeDiJX9lGwPIKzdtuFd2DLVQgkSMoBuvnVNagwwUZX/dqyCSfXF+dIwIWxG1DMr7snlnI3d3gHTKjZQLzZEvEy7TLJ1GXLKN+VVYsbuAI4fwYnFN7ihQ/jaaxBm17LiQwO/Mkrs+zyvVukanZZc6QscO16XLOvwmUzlfTYXdoXo490PTnbzG/py3CWpbRsG+WOQeLMJk8qkB06XSNyJpCvH8cU+jhKz8ETlU9uvdTed7JULnD+jau83EJQdfR3kSSpllXiBYNMwuMA9owYYyg1gK18JlvjGyp+O98k4ukzklaCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0he5SYKDwNrcgnKlPGqkas8E2vgFwGCDnciSWTb2lZ8=; b=Vp//KV8Ka7gYLmh0zQIbMa1zGtPMkuM9Yx5zE5nhaxMKObpXaAdSuU6OPF2F6I8BhWmSS+STdi7VZiDXG0lKYY5cWED2GagYe+JRLJy6nvGEjsdFLgo+D3A8Xh4wtY4yYrChiw4PKdfFHbTrxDQjXE29r/+Txt6lNuuWUn6/Iic= Received: from BN9PR03CA0319.namprd03.prod.outlook.com (2603:10b6:408:112::24) by DS0PR12MB6605.namprd12.prod.outlook.com (2603:10b6:8:d3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.17; Thu, 24 Nov 2022 10:28:31 +0000 Received: from BN8NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:408:112:cafe::ba) by BN9PR03CA0319.outlook.office365.com (2603:10b6:408:112::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19 via Frontend Transport; Thu, 24 Nov 2022 10:28:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT068.mail.protection.outlook.com (10.13.177.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5834.8 via Frontend Transport; Thu, 24 Nov 2022 10:28:06 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:28:02 -0600 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 24 Nov 2022 04:27:58 -0600 From: Sarath Babu Naidu Gaddam To: , , , , CC: , , , , , , , , , Subject: [PATCH V2 1/6] dt-bindings: dmaengine: xilinx_dma:Add xlnx,axistream-connected property Date: Thu, 24 Nov 2022 15:57:40 +0530 Message-ID: <20221124102745.2620370-2-sarath.babu.naidu.gaddam@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> References: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT068:EE_|DS0PR12MB6605:EE_ X-MS-Office365-Filtering-Correlation-Id: a901829d-1aaf-494a-24ad-08dace06a21c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6vVixQgDV8Nfe0PBksta/USHA1lMDMe7WWjgGO8+ZPc2telhSe4rOONJqiGixOLGGRruiRTYz6Q/fkGyYnCgF5IGyy50HNvbLt2KSrIJTSGZGCL58HuDMv4OCRchnKE4623ylhCuWKeXJ/96wrHXPsr9noSJdyBDmsB7rB7JlPJktowN3tvDGu3CCpULB8YtlMF8u6alCdKb+mKZbJcQTsWpD7yEeVBnEvOu/Pe8o5UDqHsCKGVWazYyFBRTmmQ1s9/nEIce/W/8/ohFzWtvhmfvvh2nR41B33w+nXOkA/PgtJVHYvJIBA8bVYLXsBSp4mfhA+juno1l4LjfjdRnpcc+jYnR2XyDjrniEnrhk6YlWb+KssDhu4sGbfTZIQ7lwM3B1S3Q7taYolYhzGYw7tNz+P6HP99dT1FO4xJ/j2yOxskUFE502f5O3C7arAzfbdrj6MAbikSOhyRzVb0jovJM2V5KKccFK5ocawJaG+zTFRC0w9JpYqL3lXufOPmiNAuD3+BtulSI6anqBTJQefm3O+EwS7HroklA1iV21+lppS01AlGj1+9m+M84QcI+PANFpV2VwqpZ0RWUmpysmTY1m8Nkn5Gw99iGl0wYMhqMUaSgUzEPwN0AcfYownP78GUq/0FPr2VEqntsGiyuTwgfq89617TyUk/4JcmVuUV/CY3KTPFQc2QPmozx1Qp5WA4/4BbHOty/LRepUhBPRlTDNYDjSCp6qvb51KYMPgA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(376002)(136003)(346002)(451199015)(36840700001)(40470700004)(46966006)(54906003)(103116003)(8676002)(110136005)(70206006)(26005)(70586007)(82310400005)(4326008)(86362001)(316002)(2616005)(336012)(47076005)(1076003)(426003)(356005)(81166007)(6666004)(40480700001)(36860700001)(478600001)(82740400003)(186003)(2906002)(5660300002)(8936002)(36756003)(40460700003)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:28:06.7175 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a901829d-1aaf-494a-24ad-08dace06a21c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6605 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Radhey Shyam Pandey Add an optional AXI DMA property 'xlnx,axistream-connected'. This can be specified to indicate that DMA is connected to a streaming IP in the hardware design and dma driver needs to do some additional handling i.e pass metadata and perform streaming IP specific configuration. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Sarath Babu Naidu Gaddam Acked-by: Rob Herring --- Changes in V2: 1) Moved xlnx,axistream-connected optional property to under AXI DMA. 2) Removed Acked-by: Rob Herring. --- Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt index d1700a5c36bf..fea5b09a439d 100644 --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt @@ -49,6 +49,10 @@ Optional properties for AXI DMA and MCDMA: register as configured in h/w. Takes values {8...26}. If the property is missing or invalid then the default value 23 is used. This is the maximum value that is supported by all IP versions. + +Optional properties for AXI DMA: +- xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP. + Optional properties for VDMA: - xlnx,flush-fsync: Tells which channel to Flush on Frame sync. It takes following values: From patchwork Thu Nov 24 10:27:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarath Babu Naidu Gaddam X-Patchwork-Id: 13054795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB92AC433FE for ; Thu, 24 Nov 2022 10:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbiKXK3E (ORCPT ); Thu, 24 Nov 2022 05:29:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbiKXK3B (ORCPT ); Thu, 24 Nov 2022 05:29:01 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2043.outbound.protection.outlook.com [40.107.220.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E9FB97082; Thu, 24 Nov 2022 02:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jlg8zLogXv+rN4CpUIlAqwaDcBKoTnRb2vl5po09WfiSF307eBCn6FQzjFj1Xgck9RDdF83DxDZOLnqIDXJciz6bua0m2rIDN7AkuQMWSwTA0uqtBXv747pxSGxVyLRaqE0SX4f9ZRHI2AywpDhQGbiv1fgsUiChdWN92V/Jq03RHDlMfKVVSLSruM/FEt7mZzAna5Yn2aIa4kckRG/0TF6NtKoMbdCHgNoiWxlpsKzwipIBuYfuXDGg9Yq+ceRSch1g1ZFJIBafvPD0jEdCqwiv5d9LhBhhewsYknaVPacRXDnaClG/w8KYnxlYEkYuEuZZPCkQAx/LOfnOaRt4fw== 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=Q0+RWuwJl62d76Dx8SBHoM93qKN3RwXm5y3DThCMKpw=; b=PPcJPXMdPhvzNuUCwEtCfFJsKbsHowmhcdUM0hYLbgm2C6PTQhg4eLO8/VZ1LAN5G9eaDoLN1VGjhdg4H7tsKGoZC49dYrcOJ1kVWOTQeuzTvA3Mgh44wpgQV39Txt+03hwQ3bfLlTETEbaw7im0sCmLQhiOdvJQWgI5qscVoG1jshMhto9cfKsB7PywL5m52r/6kFAfYB3yUTKmHTNxFYptgsF1NgwCgleJGB5bbz2CdHjeRHj4D510VX+djQ1gkRW7LeUf9Pyb0sq8d7DRi13cL0tp3KSrdMr0NKHLyz90sibTsACgOZ0Foctx8gVF59XK1hVepocOFJnVSijqSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q0+RWuwJl62d76Dx8SBHoM93qKN3RwXm5y3DThCMKpw=; b=Z2qaWZgKkSA0ZgxlitnYbOIGtr2ep79/P31soW3QqousFvHAEK1acJezu8NXM6XpqGeF1sUmCCMU8H0bj1D28sQvkZ/NPY8FsFi1O3wmhA1xqDd0bgLv8QoHrx7edLSjtOMVfjwkFZ3hLbgJY0vHRFWKUVnl58+91PZTXsLlzoQ= Received: from BN9PR03CA0916.namprd03.prod.outlook.com (2603:10b6:408:107::21) by PH7PR12MB5976.namprd12.prod.outlook.com (2603:10b6:510:1db::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Thu, 24 Nov 2022 10:28:57 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:107:cafe::aa) by BN9PR03CA0916.outlook.office365.com (2603:10b6:408:107::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19 via Frontend Transport; Thu, 24 Nov 2022 10:28:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 24 Nov 2022 10:28:57 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:28:32 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 02:28:06 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 24 Nov 2022 04:28:02 -0600 From: Sarath Babu Naidu Gaddam To: , , , , CC: , , , , , , , , , Subject: [PATCH V2 2/6] dt-bindings: dmaengine: xilinx_dma: Add xlnx,irq-delay property Date: Thu, 24 Nov 2022 15:57:41 +0530 Message-ID: <20221124102745.2620370-3-sarath.babu.naidu.gaddam@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> References: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT025:EE_|PH7PR12MB5976:EE_ X-MS-Office365-Filtering-Correlation-Id: b56ea23d-a5ba-4e6e-c412-08dace06b1d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6l11WpwIgTnXK3G6FmtZzhTjwKHBXgnn53rauxgIbw1fLdpIGAOd5tPsicypmPTPxyp3v4YVYIweLDciuB5J1Iq5P60Qr5B85N5cC6Va7tgddo/ZxWVZH2gBAWlyvssQpzt5rVX5HWsL4YP8UaYKSr9LA3kFZDJJJQQg/lOhThTCIXYa27Op+3EMFdcUAuLsFpP+kk1aDN81yr/4YwcTlDGktCH07aZbfAXCoc3A8YokLM0KWTAr420xwcfoT7KP/4dzxTGVsNQBN4FY8Z5sysbjWGaIhKouyfBKLiEF1BetywqlgeHjAeYlsBflVJRWnkHcbVuVWuW9pIXXugl19arSnXtc+EqteOfsnNfJgx81+xXaF/xSJKreMaHrhcP7EieFwX03XQc0MiVGw4jybAi06Cc3EALBDZEaUvchoZulEhLkf51wAZy3PGtyM+kSrrFBWED//9huT1hmayg1hMAEnOCCggcJJYshiJK8xkvwEfY8svq1hGsnQmboHe1v+qCxCjEij/dFreUGkdOnYUibWJOX+ayULPmq5PZVwdzSS1gro8zrBZaw9CHkEM0Bm1O8/tJIDpezxgnzTSo5cWB2ZMpDHQUTBGrOArt4dkMuTrWuPRV692a5RRqcTldvx+uxt8vYs35K7ScAFex6T5arHc8j/9XZf+JxeBOpfOOTANxKKTDkPkGlG46jdCwuEhedzr0IaUNoFd4oZ9EgnlvxwsD5exkBQ4GCT/+E/sI= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(40470700004)(36840700001)(46966006)(478600001)(26005)(6666004)(8936002)(36860700001)(47076005)(70206006)(82740400003)(86362001)(103116003)(1076003)(426003)(186003)(2616005)(110136005)(336012)(54906003)(316002)(83380400001)(40480700001)(36756003)(82310400005)(5660300002)(41300700001)(356005)(40460700003)(81166007)(2906002)(4326008)(70586007)(8676002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:28:57.4842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b56ea23d-a5ba-4e6e-c412-08dace06b1d9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5976 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Radhey Shyam Pandey Add an optional AXI DMA property 'xlnx,irq-delay'. It specifies interrupt timeout value and causes the DMA engine to generate an interrupt after the delay time period has expired. Timer begins counting at the end of a packet and resets with receipt of a new packet or a timeout event occurs. This property is useful when AXI DMA is connected to the streaming IP i.e axiethernet where inter packet latency is critical while still taking the benefit of interrupt coalescing. Signed-off-by: Radhey Shyam Pandey Acked-by: Rob Herring Signed-off-by: Sarath Babu Naidu Gaddam --- Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt index fea5b09a439d..590d1948f202 100644 --- a/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt @@ -52,7 +52,9 @@ Optional properties for AXI DMA and MCDMA: Optional properties for AXI DMA: - xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP. - +- xlnx,irq-delay: Tells the interrupt delay timeout value. Valid range is from + 0-255. Setting this value to zero disables the delay timer interrupt. + 1 timeout interval = 125 * clock period of SG clock. Optional properties for VDMA: - xlnx,flush-fsync: Tells which channel to Flush on Frame sync. It takes following values: From patchwork Thu Nov 24 10:27:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarath Babu Naidu Gaddam X-Patchwork-Id: 13054797 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9A90C4321E for ; Thu, 24 Nov 2022 10:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229477AbiKXK3a (ORCPT ); Thu, 24 Nov 2022 05:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiKXK32 (ORCPT ); Thu, 24 Nov 2022 05:29:28 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2082.outbound.protection.outlook.com [40.107.244.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50662CFBA6; Thu, 24 Nov 2022 02:29:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lJWl6rEP49kG+CUjlbQmh0SKB0dj5qME7FqAndbBxyGz9o/2V3CZpww16nKd65wz0w11SNyMs4oRRwHahpndUFYLQPuokerD196kJeunE+e1tLRzFceeq/kYGR7nSkwf1HDF/Puh1x4KHXw8m6gWc5BFIp4PMELwTHh3pC+VXbsjKHP88MFjHsSfYmuMaHhXWfYyxPp1IU4o1y/UTMTcrxiWLTKue/ZXgNPfz27LN6XEyNC3SK0eqg8HDzSRS0mvePNZuI3baIo6kUEAfAG1dSfoRHXCWuZ/hdwVrAp0+WzHs/78klVqZGNSX4sExW7Nc8ZDwsY2bTK4NXNTKNe5OQ== 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=ORokADxLb+Twd43s8TyPeB+RiT/3+LpaH6vE7t1P/lM=; b=fnWNbabPvb6fBcU3pXYjUBndmq24XZQPVp5ZwB8rWpOp+8k+Qi18qvxdHM7PBOgyHUbL5+pjLohDuXCid3daHsyaRiC2VmE1hAsm4EniwJzpw4wofuFkmWoYoom+Kl/v38qYWAQk7J40AYEm6xLvXlTZEPMMD4OXJIMO2BOxgXL28y9GBhsBQPldpg4aPBoHMpB3FTiC7btafW2yZyPuX5tr2guLYVCagUBgBGMnAHabm/r9mkkEGBb44I/2uw9v3AJH8souedZ+a3a7ycjlIj1VFx5O6+SjQk06Q26h/SBEYOPAvBMPFFsEjodUAixJc11XyMU+AjhJ82Tc9fN7DQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ORokADxLb+Twd43s8TyPeB+RiT/3+LpaH6vE7t1P/lM=; b=phEmM3/YY/V8qQzk0K+R0f21PN7UapxiamFWmFScncX6BwXOVFcrbaJXPi1WTrx2GZ/bdntqC4tyAMaDZBnzkLCYLL2wLr3h8mbmYtWt4a8ZiFwMdxch4j0g23DZi7TNSrvhqpbbVN6b8WRyGP9oJxX3sSzDy/WBFlQmEnqf8A0= Received: from BN9PR03CA0902.namprd03.prod.outlook.com (2603:10b6:408:107::7) by MN0PR12MB5860.namprd12.prod.outlook.com (2603:10b6:208:37b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Thu, 24 Nov 2022 10:29:23 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:107:cafe::53) by BN9PR03CA0902.outlook.office365.com (2603:10b6:408:107::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19 via Frontend Transport; Thu, 24 Nov 2022 10:29:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 24 Nov 2022 10:29:23 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:28:56 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 02:28:35 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 24 Nov 2022 04:28:31 -0600 From: Sarath Babu Naidu Gaddam To: , , , , CC: , , , , , , , , , Subject: [PATCH V2 3/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to dma client Date: Thu, 24 Nov 2022 15:57:42 +0530 Message-ID: <20221124102745.2620370-4-sarath.babu.naidu.gaddam@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> References: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT025:EE_|MN0PR12MB5860:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a92aac0-fdf2-41b8-d4ba-08dace06c132 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JcQySStW7FZzEt6BQqTqiznbGqA0Mw4erMghOAfnibxsJeS7IaP6KEqvpJ9aIWhO+c2XHhAilTXyokKv/EZIR783Fwi1bQp4ZUp/OyaI9RYlLLL08tk3Z7M4RFpYsoyxqNcUCkMIHE0IKEFuZfYOASJr9HgdkAL1vdh3WD9EkT0s0r5qbwCIXVT8XFNGV2Ny7f5VwwmbxSLh6xzaRLyfXD3/HijnFe98PrgS5BFcKcSWTNfVucBL1Ragd1tGBhgUgoMqq3s0LIsf71qfJlpq6r+MNw3CuRsq3JnjI6CwZnu2vw0/RgtkDCSi++jqbtnJ1tFb7jbEzMsTojZhHPnsZRKbIvCZZq0hKeB+QErtnaU1CfQPXne/CH6dMQz5bQmN+Zh1/ZG4Lr4Re93fupAozcKJporIBYzd10hhly8hj5fUEVNnlwffreuo2bOPOvV5CRaoYkBRmmglQ9eqGnJa8h5xmZmH1THKJfdXRVIA8yu53SI+ijRr3LCJamp2q7JM31ht21s33RPeGWzF00zE8ES2CUp/UKxxqKGa4rPvkbERu4zTMgygmCcDxxaFLHm9HhU2zFIKSdy7pI1R2/ZiOy2lovI/W58GTiVv4ngjPze7Um22C+tvF5yduyxHlhWccGkxg/tQs+RYK+go6UpF0yC3huYX1CYMZiYPAO8ejJ1GlZ4PZlZ9HbfUo47lz3ky+5OgCm9BRqDe3q1K/vTGOdpMaoimO7HgUce6ZAanwAo= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(376002)(346002)(136003)(396003)(451199015)(36840700001)(40470700004)(46966006)(86362001)(316002)(54906003)(110136005)(41300700001)(8936002)(36756003)(103116003)(356005)(81166007)(70206006)(4326008)(70586007)(8676002)(1076003)(186003)(336012)(426003)(36860700001)(47076005)(2616005)(82740400003)(40460700003)(478600001)(82310400005)(40480700001)(26005)(6666004)(2906002)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:29:23.1556 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a92aac0-fdf2-41b8-d4ba-08dace06c132 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5860 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Radhey Shyam Pandey Read DT property to check if AXI DMA is connected to streaming IP i.e axiethernet. If connected pass AXI4-Stream control words to dma client using metadata_ops dmaengine API. Signed-off-by: Radhey Shyam Pandey --- drivers/dma/xilinx/xilinx_dma.c | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 8cd4e69dc7b4..f783ba86cb09 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -493,6 +493,7 @@ struct xilinx_dma_config { * @s2mm_chan_id: DMA s2mm channel identifier * @mm2s_chan_id: DMA mm2s channel identifier * @max_buffer_len: Max buffer length + * @has_axistream_connected: AXI DMA connected to AXI Stream IP */ struct xilinx_dma_device { void __iomem *regs; @@ -511,6 +512,7 @@ struct xilinx_dma_device { u32 s2mm_chan_id; u32 mm2s_chan_id; u32 max_buffer_len; + bool has_axistream_connected; }; /* Macros */ @@ -623,6 +625,29 @@ static inline void xilinx_aximcdma_buf(struct xilinx_dma_chan *chan, } } +/** + * xilinx_dma_get_metadata_ptr- Populate metadata pointer and payload length + * @tx: async transaction descriptor + * @payload_len: metadata payload length + * @max_len: metadata max length + * Return: The app field pointer. + */ +static void *xilinx_dma_get_metadata_ptr(struct dma_async_tx_descriptor *tx, + size_t *payload_len, size_t *max_len) +{ + struct xilinx_dma_tx_descriptor *desc = to_dma_tx_descriptor(tx); + struct xilinx_axidma_tx_segment *seg; + + *max_len = *payload_len = sizeof(u32) * XILINX_DMA_NUM_APP_WORDS; + seg = list_first_entry(&desc->segments, + struct xilinx_axidma_tx_segment, node); + return seg->hw.app; +} + +static struct dma_descriptor_metadata_ops xilinx_dma_metadata_ops = { + .get_ptr = xilinx_dma_get_metadata_ptr, +}; + /* ----------------------------------------------------------------------------- * Descriptors and segments alloc and free */ @@ -2219,6 +2244,9 @@ static struct dma_async_tx_descriptor *xilinx_dma_prep_slave_sg( segment->hw.control |= XILINX_DMA_BD_EOP; } + if (chan->xdev->has_axistream_connected) + desc->async_tx.metadata_ops = &xilinx_dma_metadata_ops; + return &desc->async_tx; error: @@ -3065,6 +3093,11 @@ static int xilinx_dma_probe(struct platform_device *pdev) } } + if (xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) { + xdev->has_axistream_connected = + of_property_read_bool(node, "xlnx,axistream-connected"); + } + if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) { err = of_property_read_u32(node, "xlnx,num-fstores", &num_frames); @@ -3090,6 +3123,10 @@ static int xilinx_dma_probe(struct platform_device *pdev) else xdev->ext_addr = false; + /* Set metadata mode */ + if (xdev->has_axistream_connected) + xdev->common.desc_metadata_modes = DESC_METADATA_ENGINE; + /* Set the dma mask bits */ err = dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width)); if (err < 0) { From patchwork Thu Nov 24 10:27:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarath Babu Naidu Gaddam X-Patchwork-Id: 13054796 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F3A5C433FE for ; Thu, 24 Nov 2022 10:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbiKXK33 (ORCPT ); Thu, 24 Nov 2022 05:29:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbiKXK32 (ORCPT ); Thu, 24 Nov 2022 05:29:28 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2089.outbound.protection.outlook.com [40.107.220.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0BA8FF8A; Thu, 24 Nov 2022 02:29:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hp5qM3a9miyT6YvawcxLz3I7yGLpMt7EYFDaYFEQe5ixjfM0kzVSuM0zQpM+4rKC4IERlr/Wn7g820nr39qeYJTC95mJTM7ZJq8UAWsD4aNeEDGjPDWQuOcnO1yPIYwKIDFeha5Os3JeNZ1ZmSTQPbm38TlQBZGrvDx5P0+sKDXgX8XmDH7JRZT+0LnYJFjaWGCo3e7DUVkwWpYGd8hepQtyOVtGxXgxKXYfOVzWdsKxyUm5KoV4kbx5ZpJ3ORIKrONg1NDyX/5ZPRncymW3c5v8f8hZSoDsdeD6TwVaYl6X+IcgwGGA9kt2sAJQNM1QmD+erKHS5N1oC+DsglgxjA== 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=NSCysilUQC56RcIe4Av10dPkzjno7xwDAjurkqja+Vc=; b=SCeOSqOLXqolEC23erHMd7CECCSeUXHc2rV7GHIafX+t3NciIksvOsVtB/UVzruJK6lbnuYm02Xa02SPGoprTG19rggn9LwiGk9AM/mdaVN6bvCnRYh1MpOxLPVoUI5+6oYdAshXuijaG8Hq3+3IDPaPM0/5ovwVrYWRpD78Q9XIwD/4oPD3qepOI0HvCt8JBqyLfMyU7EdfirFjOkQ+gyUt6rOSRZ/95sbXUC1LNL27+Tzn8xbjvLP2GHp/CxPaVJD0BPPunBViHAF2d1IP/NBu5RxxjlK0+FltbVOY5amRov82DKSpW5US3pfDcYn+tuutksl+sFabGuG73inVdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NSCysilUQC56RcIe4Av10dPkzjno7xwDAjurkqja+Vc=; b=2zclkWHRN7a3/7mnDxdqn+8xOOr4dzIk/7Stb5EPWBWuuSO5atgI/Vd4F3XRYYGgwncw7CCs01/pxRhgnnZzWXpGtXNV6HIV+HamwKbcZgexPFEa3sIVgSFhIyX+9wnXREZDRpPLYRUaLxQVHl99Qo7b47wVWyXoCzCjXh4ZHCU= Received: from BN9PR03CA0886.namprd03.prod.outlook.com (2603:10b6:408:13c::21) by BL1PR12MB5875.namprd12.prod.outlook.com (2603:10b6:208:397::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Thu, 24 Nov 2022 10:29:24 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13c:cafe::f0) by BN9PR03CA0886.outlook.office365.com (2603:10b6:408:13c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19 via Frontend Transport; Thu, 24 Nov 2022 10:29:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5834.8 via Frontend Transport; Thu, 24 Nov 2022 10:29:23 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:28:57 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 02:28:52 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 24 Nov 2022 04:28:48 -0600 From: Sarath Babu Naidu Gaddam To: , , , , CC: , , , , , , , , , Subject: [PATCH V2 4/6] dmaengine: xilinx_dma: Increase AXI DMA transaction segment count Date: Thu, 24 Nov 2022 15:57:43 +0530 Message-ID: <20221124102745.2620370-5-sarath.babu.naidu.gaddam@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> References: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT021:EE_|BL1PR12MB5875:EE_ X-MS-Office365-Filtering-Correlation-Id: 67fa867b-ec85-4182-55f0-08dace06c189 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mTDikF6+vaMj+ygQCXDX2Awj35YHUwgUSWWLBfvd8/OzYXtBE4WBMgXgKrw6in6PvQSLiPZ4eWJbpxJ00is1pdISTNp+PIcB2oV0plXpDFf9Eeo28naV38pv2NmViIjL3NPmEiLNXljYz5LDKXuCk/SCWCsiLqMRRTdvlHESNPtAE2Vd9bBQ+m4k6P4Y+4ePWwM1hNmFtxwhm3CD9dKwNzHQd7YKInINaP8dRRlUBkIlGXrKTCg0+qkfq1bIYnNqb2L5Km0+ornC3BZvLNzz70UMfNnZoQhOc1IXAtzPdV6AS/VqfSav5u4UCnFVGfzH0o433YrM6+HxcjXxIHhSfvID6lSEi+rtgMsFPQgFrs+BMg2IxdxeELdgb8+6Jhozw4kNSlpeSOrVVA03Y2k2eC3HOjxqszrhG11RFLaYIpBFQ4MeUHkLKgUvu5DujV2db5aqBDceESjAX8x5uuW1JzJ3N+cySNE5oVihlnrx1S5EkWLm1kOU7/iGfpT13JeB6M4iGosS3AYAEdwOjbPz20tJg18o+1t9GBuk0oFp+FT/2/Pmv4OQKi+ztiAM7jY08WVI/AjolNLf5DDaL8HspBMQ/9qTY0eoEzdSR/z9Kvz5iDXpZblOfM0wxGZPHtKi4oDE4ZRvFAE6VBv9ROUgTwFGw3A8Dc5jwPPWsPcgxnDbpBJCo1N5eR2bGq18kGMsQOvoSSXDjyEHebvB7SUHiI9cHQ6I9QMIbypsFU67l7M= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(36840700001)(46966006)(40470700004)(83380400001)(2906002)(36860700001)(103116003)(36756003)(186003)(41300700001)(1076003)(40480700001)(70206006)(70586007)(2616005)(81166007)(86362001)(40460700003)(356005)(54906003)(82310400005)(110136005)(5660300002)(336012)(4326008)(8936002)(8676002)(4744005)(426003)(316002)(47076005)(478600001)(6666004)(26005)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:29:23.7537 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67fa867b-ec85-4182-55f0-08dace06c189 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5875 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Radhey Shyam Pandey Increase AXI DMA transaction segments count to ensure that even in high load we always get a free segment in prepare descriptor for a DMA_SLAVE transaction. Signed-off-by: Radhey Shyam Pandey --- drivers/dma/xilinx/xilinx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index f783ba86cb09..6780b1c21414 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -178,7 +178,7 @@ #define XILINX_DMA_BD_SOP BIT(27) #define XILINX_DMA_BD_EOP BIT(26) #define XILINX_DMA_COALESCE_MAX 255 -#define XILINX_DMA_NUM_DESCS 255 +#define XILINX_DMA_NUM_DESCS 512 #define XILINX_DMA_NUM_APP_WORDS 5 /* AXI CDMA Specific Registers/Offsets */ From patchwork Thu Nov 24 10:27:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarath Babu Naidu Gaddam X-Patchwork-Id: 13054798 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB4DFC43219 for ; Thu, 24 Nov 2022 10:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbiKXK3d (ORCPT ); Thu, 24 Nov 2022 05:29:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbiKXK3b (ORCPT ); Thu, 24 Nov 2022 05:29:31 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::601]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EBB2C0532; Thu, 24 Nov 2022 02:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PTj527pofAhjb/cTWU8oNyNHYTvBRATypV/pgfgDISzCIjFauaR4Uv1qDdgdyy+dw3T8zBV55GUu0Li21c+AjaoMDtiIoRx6kLdVcMmMIYT8Uul3OncshQbXOwpDHKF9A52PHGMoErlQABICUW+/Noy52gdSfJIdJtLFjbfYjBTWpdFcWwqaV1yOTkjWvH9MSQ8fEdAFFN1Zp2QKejxCfqG7v5XH+y5vz+bkLaKVLMOsrM8Y3vcLy7Zx7fSyheruaT/IDTkAnJNzLPDLBsuFueITF5brC5IFZIFyI1HTOstuXWZ5ooIGfjsRxjvkgfWPox3Iv8Vcz0sv7rWhaewGSg== 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=QHxK1Ft+ONeIi/aaMf2yOaMWGf27wZEBgx9HByo+Lwc=; b=csHkE9clSOEFrsnwJ3lhWFISm5wny3vdNBmi5gwjDIMhTYXGwiqigPmd1hsoIE+VtdKCtF6VG2S6FQbITGBMhIID0eJmZSyfiwsA7emkKsag8idjPyHKaS+6Oe5cq9hGFQ99JbWQaPhpqvBrFSFLUlxo4GjrpNYYNebxf3HOjt3NrmAtrabkUt4JrUYvzR/MvIANhrGb9WqiIV3f9YZkrsXF//kX0pPDKrqrbGJn4QoabB7Aog1U1XljQHA3t7TKj3akhiIF5ZlcV/wNws9Bg3rY35/q3jVF34O+gewb1wGc1vQMdyG7VX0xLNsjMFcr1K0wblJ48BvyteTEc6nmvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QHxK1Ft+ONeIi/aaMf2yOaMWGf27wZEBgx9HByo+Lwc=; b=OGITD77oeMQYpvWX9o5yx21jyU4ON72/qlkPKT48JXHFp8I4Q1tb1OEticZ+MVWj9NhXSDxXtOyU9GWWOX1GIlSq5VRrk7zjjtsGTClfU44fMe+PtXPaiq5MIsJCRY7976NTnAaPkFvpweP88KEr4wnmWBW8kQGbXr9EU0PpM74= Received: from BN9PR03CA0901.namprd03.prod.outlook.com (2603:10b6:408:107::6) by CH3PR12MB7497.namprd12.prod.outlook.com (2603:10b6:610:153::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Thu, 24 Nov 2022 10:29:26 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:107:cafe::8a) by BN9PR03CA0901.outlook.office365.com (2603:10b6:408:107::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19 via Frontend Transport; Thu, 24 Nov 2022 10:29:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 24 Nov 2022 10:29:26 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:28:57 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:28:56 -0600 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 24 Nov 2022 04:28:53 -0600 From: Sarath Babu Naidu Gaddam To: , , , , CC: , , , , , , , , , Subject: [PATCH V2 5/6] dmaengine: xilinx_dma: Use tasklet_hi_schedule for timing critical usecase Date: Thu, 24 Nov 2022 15:57:44 +0530 Message-ID: <20221124102745.2620370-6-sarath.babu.naidu.gaddam@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> References: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT025:EE_|CH3PR12MB7497:EE_ X-MS-Office365-Filtering-Correlation-Id: c99f50e9-1e41-4c83-8cff-08dace06c31b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E96yBKXUt9oiS6bQPWzWrb/uxOENYlYlUDrc9NZvHj4jXf8vxIJGV0+nMRYrxP0xpCIHxJYxh4IFwQh8Pi3FBbjNqGsr4F4NO4SPXSge3wAllGlLvNRmFx4hyrrZ+9Zm3zMGeXFgfTqVF1xHyMngiaw5hBE9r5MSz45takoINqLp6Xtw0DbKJj0WMtDoVtQ51R6l+pVhl2y0HmM+WgsoN0qFzNBxRhWvub7MVMQ9lUdiEm2o3mRBtzNOEE5sT/MQ6Ua3Dvh4bLxqwQ8GBgkhVNevs57QrRZ5xUKQyPLlvMNKonmJJ6vSQs7KzafT8Oiwa1CuzRnJc32rG/jt2DJn++wVDsQHDqZxOE0baXSN0gLKT0MJ5Ij4A2erMlikOyzE133dD2SQ76vx//1ADsGnH9ne7B+z7+X2t6u6kDmgT0Oru++Rrad0B/xx5pMm/OKb9KAaqcaSxGzbsqUpVK1aYcU4dALvjRE5wHZolCImuyvjIiukR9qC5BTx65XaHx+cbwKq1RrO+XiboQ5UO/BIqmy5jcDOhST4HOA/GI+d2iU4Q+zRVovPprbrJjNsgNQfkk9aYxQmjHmiaqBtI2cRBi2C6JSckd7zP9hWor5nYD8ThxD2iSCtyDEud1rWxk40ccVBu0tJisUmwwVvzhFj4/X02qQnDpcCUcgMAbx7QmRDzrLXl192ypJrrqlaigHOQDdYiHdDsff6335EBcSsJ9Ch1nUk1i1cMzbYihuLnyk= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(136003)(346002)(396003)(376002)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(70586007)(40460700003)(8676002)(316002)(82310400005)(83380400001)(5660300002)(4326008)(26005)(356005)(6666004)(70206006)(8936002)(36860700001)(36756003)(478600001)(82740400003)(40480700001)(110136005)(86362001)(4744005)(54906003)(41300700001)(103116003)(81166007)(186003)(1076003)(47076005)(426003)(2616005)(336012)(2906002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:29:26.4209 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c99f50e9-1e41-4c83-8cff-08dace06c31b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7497 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Radhey Shyam Pandey Schedule tasklet with high priority to ensure that callback processing is prioritized. It improves throughput for netdev dma clients. Signed-off-by: Radhey Shyam Pandey --- drivers/dma/xilinx/xilinx_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 6780b1c21414..ce0c151d8f61 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1839,7 +1839,7 @@ static irqreturn_t xilinx_mcdma_irq_handler(int irq, void *data) spin_unlock(&chan->lock); } - tasklet_schedule(&chan->tasklet); + tasklet_hi_schedule(&chan->tasklet); return IRQ_HANDLED; } From patchwork Thu Nov 24 10:27:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarath Babu Naidu Gaddam X-Patchwork-Id: 13054799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A1A5C43219 for ; Thu, 24 Nov 2022 10:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229542AbiKXK3w (ORCPT ); Thu, 24 Nov 2022 05:29:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbiKXK3r (ORCPT ); Thu, 24 Nov 2022 05:29:47 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2074.outbound.protection.outlook.com [40.107.101.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B7DE14A2C5; Thu, 24 Nov 2022 02:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kzOpKUI6HH1cyUE7L4XLudkKUVsPEOW5SwF4vuITpy6c+qxsETSPzqvG1qL7HcPJFiIjoU3iA80q/nWFFSCzGa/5qY+aN/onWWlvQkyPKKUqxSH+nBaaX5lF9gw1zNkGbelOyim2TdvKs0Bk7DzvLhhUqoj+/AQJSutwIVjuSfpaQ4+126jf+HbrbDaA+0VcaLMs2Qcd2nhjPoVo17+kHc/9IgfBKHb+h834SHzVOqgjcnbH+M6zAzrmI06LjbwEM3Ugp9Ch/oIUtewopIcv9JfDyfcYSC7Hb1HIhPE56frOjx2cy1oC9w+O7jN+M+62Ybm1zTsRsrJVft/4JDvlnA== 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=MK98sISiu20IUkwpbdgv25SGP2dEfMvoSR5tMNcuguM=; b=bKMRBWJhThRyeTzjN7h9YS3Y0JM1CYWPDaDIIbhX0n+nzxejao3g78MMTFUk1BRwTDA3GgNmnevmIqrYQ/EBlE4WmxRxdqtwGqJsObex10NQxc/bRhGtByYYw8og2M2g21Gj4E3bQi9T2MFkFK87uMeADebaZ+8hc25hu8ccxTRwA++mX+a0KJGI9CT6xH7PJSxnpJ3vrrYqLCVZu+cv1PSQCux8mWIMxwbsN+ZOSp7haTu4foVUqxfwVx/ih1rEoqRnmlo3lRba5PUXI6gGJu7wE+FLed5tYPhEnYj1wQtxooFs26nz1dOJxaO9ABlaTw8qnf7Fk5FGHy37phVQrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MK98sISiu20IUkwpbdgv25SGP2dEfMvoSR5tMNcuguM=; b=p9eqCQzRIStCbZbxycmjdFmEDvHNajgvBSeqHqu0QEFAFnd46oL7lKLJRrDrupClGisYhCjgZE8xS4rHub6oKUrjmLEETQMYm9lG9csQPO5d6rL1CuJLiAVdP1A5DSGSd92O5Ji8pXUff/rj4+OTZgXYnsQcChDXmDOcDmLXN1k= Received: from MW4PR04CA0032.namprd04.prod.outlook.com (2603:10b6:303:6a::7) by DM6PR12MB4044.namprd12.prod.outlook.com (2603:10b6:5:21d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Thu, 24 Nov 2022 10:29:34 +0000 Received: from CO1NAM11FT046.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6a:cafe::ea) by MW4PR04CA0032.outlook.office365.com (2603:10b6:303:6a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19 via Frontend Transport; Thu, 24 Nov 2022 10:29:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT046.mail.protection.outlook.com (10.13.174.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5834.8 via Frontend Transport; Thu, 24 Nov 2022 10:29:33 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:29:21 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 24 Nov 2022 04:29:00 -0600 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 24 Nov 2022 04:28:57 -0600 From: Sarath Babu Naidu Gaddam To: , , , , CC: , , , , , , , , , Subject: [PATCH V2 6/6] dmaengine: xilinx_dma: Program interrupt delay timeout Date: Thu, 24 Nov 2022 15:57:45 +0530 Message-ID: <20221124102745.2620370-7-sarath.babu.naidu.gaddam@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> References: <20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT046:EE_|DM6PR12MB4044:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ce5d549-7cc9-43f3-c932-08dace06c7ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jols/puiB8QKDCOMujL03pwlp+GKZ7+QUBU9JzB3QNBxXcB9gDVM988cLdocVxOTn5HawUK/VsW0i1miJ2uU1R5foyfqOPb71NLYupot4uU3tyXs5gb8htGSYeKUJ0Pafj+KmLNg+P/7C7Tb1sbBPE4Po5C6KqW+HX/bSbmB8J7mnXbh3hHPMa7pij2CoZw1M5ir7StAh8eIdoVK7W7XHGuRlY+rnbugZLh47NmcsjNLVY2UHcWR7cZ4upzNA20XwgZjLASeVCuwVjkT0IgFY6XrskwMTSnC27BCQAvWAb/n8kbaij0bD+5ZJjUo/oU3uUgfmQcxC3AH/wlaFA0z4oVDbLA9ek0v8NeATQ2OBIhXD7WDjg0vMFlk2Zem44kkeXXZbGxkEL/+9E6ub4ZPHyIr5lQfdDaEsUJtLl2CMz+YOasQqKLVTSaC7YTMaXqErRt1qlW8v5hY4tRnVVuYNBJP4i+NKUl6h6aQmZO7i/HSn18K9i5voGcNRbc3JRGBIIzjW6VNC+kkkeiOC+6x88PoIM/rQ/cKMnagNH56Bf2EAwg5BOxkyHvnlS/X/Z65OQDsalsOk/+EklsZUWf3SHo/99hYMjMkuE46cM+eusWifyuqjYqJJ+P7/Kte1+Fysshc/ar3C/GfNvTZmcrNtzp1u4Sa4C+xXV+NOT2WFl1mfDrwnQMFQkfifG7eLiX19+5J+jIzvSUAnhWBEckpRL4o1d6IDkAqnk3fDLQJ2O4= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(39860400002)(346002)(136003)(451199015)(46966006)(40470700004)(36840700001)(2616005)(426003)(1076003)(186003)(336012)(47076005)(82310400005)(36756003)(5660300002)(8936002)(6666004)(41300700001)(26005)(103116003)(86362001)(316002)(54906003)(110136005)(8676002)(4326008)(40460700003)(478600001)(70586007)(70206006)(36860700001)(2906002)(82740400003)(40480700001)(356005)(81166007)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 10:29:33.9899 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ce5d549-7cc9-43f3-c932-08dace06c7ac X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT046.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4044 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Radhey Shyam Pandey Program IRQDelay for AXI DMA. The interrupt timeout mechanism causes the DMA engine to generate an interrupt after the delay time period has expired. It enables dmaengine to respond in real-time even though interrupt coalescing is configured. It also remove the placeholder for delay interrupt and merge it with frame completion interrupt. Since by default interrupt delay timeout is disabled this feature addition has no functional impact on VDMA and CDMA IP's. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Sarath Babu Naidu Gaddam --- drivers/dma/xilinx/xilinx_dma.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index ce0c151d8f61..333d68ee3559 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -173,8 +173,10 @@ #define XILINX_DMA_MAX_TRANS_LEN_MAX 23 #define XILINX_DMA_V2_MAX_TRANS_LEN_MAX 26 #define XILINX_DMA_CR_COALESCE_MAX GENMASK(23, 16) +#define XILINX_DMA_CR_DELAY_MAX GENMASK(31, 24) #define XILINX_DMA_CR_CYCLIC_BD_EN_MASK BIT(4) #define XILINX_DMA_CR_COALESCE_SHIFT 16 +#define XILINX_DMA_CR_DELAY_SHIFT 24 #define XILINX_DMA_BD_SOP BIT(27) #define XILINX_DMA_BD_EOP BIT(26) #define XILINX_DMA_COALESCE_MAX 255 @@ -410,6 +412,7 @@ struct xilinx_dma_tx_descriptor { * @stop_transfer: Differentiate b/w DMA IP's quiesce * @tdest: TDEST value for mcdma * @has_vflip: S2MM vertical flip + * @irq_delay: Interrupt delay timeout */ struct xilinx_dma_chan { struct xilinx_dma_device *xdev; @@ -448,6 +451,7 @@ struct xilinx_dma_chan { int (*stop_transfer)(struct xilinx_dma_chan *chan); u16 tdest; bool has_vflip; + u8 irq_delay; }; /** @@ -1560,6 +1564,9 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan) if (chan->has_sg) xilinx_write(chan, XILINX_DMA_REG_CURDESC, head_desc->async_tx.phys); + reg &= ~XILINX_DMA_CR_DELAY_MAX; + reg |= chan->irq_delay << XILINX_DMA_CR_DELAY_SHIFT; + dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg); xilinx_dma_start(chan); @@ -1887,15 +1894,8 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data) } } - if (status & XILINX_DMA_DMASR_DLY_CNT_IRQ) { - /* - * Device takes too long to do the transfer when user requires - * responsiveness. - */ - dev_dbg(chan->dev, "Inter-packet latency too long\n"); - } - - if (status & XILINX_DMA_DMASR_FRM_CNT_IRQ) { + if (status & (XILINX_DMA_DMASR_FRM_CNT_IRQ | + XILINX_DMA_DMASR_DLY_CNT_IRQ)) { spin_lock(&chan->lock); xilinx_dma_complete_descriptor(chan); chan->idle = true; @@ -2822,6 +2822,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, /* Retrieve the channel properties from the device tree */ has_dre = of_property_read_bool(node, "xlnx,include-dre"); + of_property_read_u8(node, "xlnx,irq-delay", &chan->irq_delay); + chan->genlock = of_property_read_bool(node, "xlnx,genlock-mode"); err = of_property_read_u32(node, "xlnx,datawidth", &value);