Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218057/?format=api
{ "id": 2218057, "url": "http://patchwork.ozlabs.org/api/patches/2218057/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260331102303.33181-9-akhilrajeev@nvidia.com/", "project": { "id": 21, "url": "http://patchwork.ozlabs.org/api/projects/21/?format=api", "name": "Linux Tegra Development", "link_name": "linux-tegra", "list_id": "linux-tegra.vger.kernel.org", "list_email": "linux-tegra@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260331102303.33181-9-akhilrajeev@nvidia.com>", "list_archive_url": null, "date": "2026-03-31T10:23:01", "name": "[v6,08/10] dmaengine: tegra: Use iommu-map for stream ID", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "728f5b3a9013f64334524e2f1c047dfb290129ed", "submitter": { "id": 81965, "url": "http://patchwork.ozlabs.org/api/people/81965/?format=api", "name": "Akhil R", "email": "akhilrajeev@nvidia.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260331102303.33181-9-akhilrajeev@nvidia.com/mbox/", "series": [ { "id": 498169, "url": "http://patchwork.ozlabs.org/api/series/498169/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=498169", "date": "2026-03-31T10:22:54", "name": "Add GPCDMA support in Tegra264", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/498169/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218057/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218057/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-tegra+bounces-13479-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-tegra@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=ZEygUXLV;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13479-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"ZEygUXLV\"", "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=40.107.208.7", "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com", "smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com" ], "Received": [ "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flPTB2stzz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 21:27:58 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 01B5A30582A6\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 10:25:10 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A2FE03EF0BC;\n\tTue, 31 Mar 2026 10:25:09 +0000 (UTC)", "from PH0PR06CU001.outbound.protection.outlook.com\n (mail-westus3azon11011007.outbound.protection.outlook.com [40.107.208.7])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 14E673EDAAF;\n\tTue, 31 Mar 2026 10:25:07 +0000 (UTC)", "from CH0PR03CA0181.namprd03.prod.outlook.com (2603:10b6:610:e4::6)\n by SA5PPFDC35F96D4.namprd12.prod.outlook.com (2603:10b6:80f:fc04::8e5) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.15; Tue, 31 Mar\n 2026 10:24:56 +0000", "from DS3PEPF0000C37F.namprd04.prod.outlook.com\n (2603:10b6:610:e4:cafe::f7) by CH0PR03CA0181.outlook.office365.com\n (2603:10b6:610:e4::6) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.28 via Frontend Transport; Tue,\n 31 Mar 2026 10:24:56 +0000", "from mail.nvidia.com (216.228.118.232) by\n DS3PEPF0000C37F.mail.protection.outlook.com (10.167.23.9) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9745.21 via Frontend Transport; Tue, 31 Mar 2026 10:24:56 +0000", "from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com\n (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Tue, 31 Mar\n 2026 03:24:47 -0700", "from drhqmail203.nvidia.com (10.126.190.182) by\n drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.2562.20; Tue, 31 Mar 2026 03:24:46 -0700", "from BUILDSERVER-IO-L4T.nvidia.com (10.127.8.9) by mail.nvidia.com\n (10.126.190.182) with Microsoft SMTP Server id 15.2.2562.20 via Frontend\n Transport; Tue, 31 Mar 2026 03:24:42 -0700" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774952709; cv=fail;\n b=cRlSyTzxobK69NC/ojRtAe9sbPXhQwymDB/kQTkez5N811zwMRgyF0h3mFs3ny75ZQYJRTf6pmskckSx8tFK+SsUNWgvPmeu/h1vPsg2rMnZabOKTMG3y/hbbbrX4tpGY/7SlKGdOux0Kda4r5qLRwRvExsTAmuZ7Vgs+s66IPE=", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=hErH4fXQwE/OENb9D0KCiz/8Fg827pHf63e7hNDNEffrCf8aMiV0IulhjnOvSQUu7YBK62qNYiPagjBoMj1MSFoVlEVB+uQtwvk0CBww29aJfn7903ItfebaiYFvBAyMchpSWOswF34VYgq9BFKFBBdQVA7UJMCle/blea00MWZhL+KrcMraSW7w1//paACZArIz5wJasnPLWIiM5NXqiStIyYtbZWF4Geov5P7vESWO5eWaq6f4sW3R6+4rFQXJvOFueH6DcxmkRM3+LUSClWK7FMx0njYTbvHnvhs/+fIMBPYw1kiudLCJxs3MMaBGvWpgZPOZo2PZ5V1j1lZJEg==" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774952709; c=relaxed/simple;\n\tbh=OM5BEsJMn9MdTnYaXLqqGwpVfkzAWgapdjHwKGili9s=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=eYFxEITBSz6yyBh1KbGTFshn3ZhI8lOFuaoohUuhkVB1yDrylOJWJgU1v2p5pf132nP9HmvxE4ZzNejAnpXl9Gia+fLOyXeR9Ai7lNh2mgdFBbWrCPRtTAGCUbcH7LpzuEojqeQ6I72bXmazVLuREf277YSTjhTI7AM3HpA6b1A=", "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=/Nca36bDpJgZPPkBqyrYycJ5tYt0634axG2dvgcFpGw=;\n b=RR3nS6T8sG2S2IShoooEGv33il66TF3KFGuD4E/3CYtyvWWLYkctBRrJeFxiDTMwOYx5YZNx3Uc7IDi/Ebn1jegbqj+7rh2lQ3pDjKePv4m4lVCmYcJyUPVkcWvSRIJRv0/Z8CO2TpUEIeQvW4onPelnFU8u2tumTzWNIYB1JqwwA6VhMy1Y2VDHnjH7Pn5chxD9eVltdzwsmsCW0gzU8ZrkxxJscwUQbQsqfnZeBLMYEqcX1ruz2+0t6hy1etPu90PR+lqlcbbBqIq19MgjkdN19dkIdzA5HSP1HvTBMrtB24H2MMfMEjUA4Q2yGuNcS7L7FM+ukN7azM/uC96fLw==" ], "ARC-Authentication-Results": [ "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=ZEygUXLV; arc=fail smtp.client-ip=40.107.208.7", "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.118.232) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=/Nca36bDpJgZPPkBqyrYycJ5tYt0634axG2dvgcFpGw=;\n b=ZEygUXLVX+OOvgpjOCq4Gj8aKMODyUhFSCAk5korwh4NlFqROfdoYQJPjnjkeun9Fw224cdboSihNK5TImZMgg6J1hyIl25wBo0R9yNNWvMWQeNsdkXHzjR2Jo2iql680CWthwzOC0sOMBF0IoQfqib0f0pjJdN+i6oO4woc3aAH4HpFx390aALNhOmM9OFjKYD+emysDukvg50MELZi06Q9PI92i1ksEUW6TvoEkZJjj+MY+YvAJTcu6QAKuiwOvvUTX84vREMQduh91QUqKmrLTP3Iwf5xgBegSqZvAzrG91fC/TcsNHYRHQq+D6jPWT0uiDxUIwV/1lIg17bVeQ==", "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.118.232)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;", "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.118.232 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C", "From": "Akhil R <akhilrajeev@nvidia.com>", "To": "Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>, Rob Herring\n\t<robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley\n\t<conor+dt@kernel.org>, Thierry Reding <thierry.reding@gmail.com>, \"Jonathan\n Hunter\" <jonathanh@nvidia.com>, Laxman Dewangan <ldewangan@nvidia.com>,\n\tPhilipp Zabel <p.zabel@pengutronix.de>, <dmaengine@vger.kernel.org>,\n\t<devicetree@vger.kernel.org>, <linux-tegra@vger.kernel.org>,\n\t<linux-kernel@vger.kernel.org>", "CC": "Akhil R <akhilrajeev@nvidia.com>", "Subject": "[PATCH v6 08/10] dmaengine: tegra: Use iommu-map for stream ID", "Date": "Tue, 31 Mar 2026 15:53:01 +0530", "Message-ID": "<20260331102303.33181-9-akhilrajeev@nvidia.com>", "X-Mailer": "git-send-email 2.50.1", "In-Reply-To": "<20260331102303.33181-1-akhilrajeev@nvidia.com>", "References": "<20260331102303.33181-1-akhilrajeev@nvidia.com>", "Precedence": "bulk", "X-Mailing-List": "linux-tegra@vger.kernel.org", "List-Id": "<linux-tegra.vger.kernel.org>", "List-Subscribe": "<mailto:linux-tegra+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-tegra+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "X-NVConfidentiality": "public", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-NV-OnPremToCloud": "ExternallySecured", "X-EOPAttributedMessage": "0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "DS3PEPF0000C37F:EE_|SA5PPFDC35F96D4:EE_", "X-MS-Office365-Filtering-Correlation-Id": "c2317ab6-f6f5-41b9-5109-08de8f0fc149", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|36860700016|376014|7416014|1800799024|82310400026|18002099003|56012099003|22082099003|921020;", "X-Microsoft-Antispam-Message-Info": "\n\td85k5mWC5R/DYkz6M+sgSbwXScYWDKL5lcop5LgEi/YP0MAoggaWquCo3SuTmZULoEUjyk0H4tmz+3rn9qAMudIKVyHcotOig8zEThRwq+8GIXbOVvKKDryL8vne2WzCzrKPqx6Akk383SUMvj80ri63jmRQDdk1sKzT/nn1BcOFgMRQCoaSMjhdnV+Yitx+ed9lJbNMkAkYvQbhQgNmMoNmTmpf91wvYKsymkkdP0qGjOTFErkWYT49p2Bh+otPOQPuZ8VtXvWtH2VviJfe9Bx1HoPNdKkXU2jHkuYMA/yFCLVk7RXyyL1Q8aEyURv1/L+nEVwiem+u1y5n4akzY6NFMmLslvZ/WypG+07+kVAQ7sblAuiD/Zc85UfLPxTBJkKQnBa0EPo8qc383w63G1t/SsUEAIbtb+Mu256Y4pUOxLGK8QVyaM35j8mu2rJ5qiLSTBC8huWNOpjgNOzWKft/nTEnw2nNbSj0J8LYVy/o8Y2Pd+8u1xSvbdECdjwdJlDbemIev0eF5Pm0XjGOTYB5dngAEotowQXpgUIKBSZxoJ5k84MAtqPCgZXftxgGSS/3Pio0Lmd1QXIupa3dh6H9rVxAiTc8NMahnlS7Yh4wtk9Ncs5vSbtxdowjKIEcgbmRsIM6wNX/zfiktBU8VK6tE/nQk2lWEDHk0dJfUIPeXQIO7x91jeaigiYbVG4MEaa1r3QvS6FuP8hhgHhOh8r4f53UCHQMsVrxJ3dMi9B3r3JCUfX0kETzDteJE20Kcz9ve34zr1vkvvCYoa5Yo/YnZMai6xKtxpP8QZmG0/wPg02WTSNTEjhAkO4ZG230", "X-Forefront-Antispam-Report": "\n\tCIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230040)(36860700016)(376014)(7416014)(1800799024)(82310400026)(18002099003)(56012099003)(22082099003)(921020);DIR:OUT;SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n\tEAdmcBxV43ZybosSxjytJ+GjWHEGNMeua/82fh3H6VE56IulTD3mnz6+HGEPo9vjBCCyhrV4UWRRPYcTnyhXUqNIx7NRhsNJfWKUf+CX905tBgsd5BPs5i5eE+0y3gzoPEYzYDFQyaQIRM6BETvDmQN9n8tcHQkIAtEmdqkFvkCFB/f+hT1+++Lo0S4zusONL/LPzk1ZjlTFc51jKuS1PJk1scUOddzzfJ1ii6bRxoL/WUXcR2ncDjCKmlPBa0SVdn5b2P4qN3RDlCS1zW+e9uWyCbZVqGruIadIe3CnqVxyDvcWwWqSE4D672KbaEtXjw12ubyssnxiZHM2SywpBpsIyf5fXR5+NUi9VGScG87FoSmgRnCGtxJzwxp9dLxyULYx/1lAlDH+8KPSW16I1tAcrlRrqEGknlEKNTD+GRGKOKYdnq+8BZxGqv2oMln3", "X-OriginatorOrg": "Nvidia.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "31 Mar 2026 10:24:56.1781\n (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n c2317ab6-f6f5-41b9-5109-08de8f0fc149", "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com]", "X-MS-Exchange-CrossTenant-AuthSource": "\n\tDS3PEPF0000C37F.namprd04.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SA5PPFDC35F96D4" }, "content": "Use 'iommu-map', when provided, to get the stream ID to be programmed\nfor each channel. Iterate over the channels registered and configure\neach channel device separately using of_dma_configure_id() to allow\nit to use a separate IOMMU domain for the transfer. However, do this\nin a second loop since the first loop populates the DMA device channels\nlist and async_device_register() registers the channels. Both are\nprerequisites for using the channel device in the next loop.\n\nChannels will continue to use the same global stream ID if the\n'iommu-map' property is not present in the device tree.\n\nSigned-off-by: Akhil R <akhilrajeev@nvidia.com>\n---\n drivers/dma/tegra186-gpc-dma.c | 53 ++++++++++++++++++++++++++++------\n 1 file changed, 44 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/dma/tegra186-gpc-dma.c b/drivers/dma/tegra186-gpc-dma.c\nindex 9bea2ffb3b9e..cd480d047204 100644\n--- a/drivers/dma/tegra186-gpc-dma.c\n+++ b/drivers/dma/tegra186-gpc-dma.c\n@@ -15,6 +15,7 @@\n #include <linux/module.h>\n #include <linux/of.h>\n #include <linux/of_dma.h>\n+#include <linux/of_device.h>\n #include <linux/platform_device.h>\n #include <linux/reset.h>\n #include <linux/slab.h>\n@@ -1380,9 +1381,13 @@ static int tegra_dma_program_sid(struct tegra_dma_channel *tdc, int stream_id)\n static int tegra_dma_probe(struct platform_device *pdev)\n {\n \tconst struct tegra_dma_chip_data *cdata = NULL;\n+\tstruct tegra_dma_channel *tdc;\n+\tstruct tegra_dma *tdma;\n+\tstruct dma_chan *chan;\n+\tstruct device *chdev;\n+\tbool use_iommu_map = false;\n \tunsigned int i;\n \tu32 stream_id;\n-\tstruct tegra_dma *tdma;\n \tint ret;\n \n \tcdata = of_device_get_match_data(&pdev->dev);\n@@ -1410,9 +1415,10 @@ static int tegra_dma_probe(struct platform_device *pdev)\n \n \ttdma->dma_dev.dev = &pdev->dev;\n \n-\tif (!tegra_dev_iommu_get_stream_id(&pdev->dev, &stream_id)) {\n-\t\tdev_err(&pdev->dev, \"Missing iommu stream-id\\n\");\n-\t\treturn -EINVAL;\n+\tuse_iommu_map = of_property_present(pdev->dev.of_node, \"iommu-map\");\n+\tif (!use_iommu_map) {\n+\t\tif (!tegra_dev_iommu_get_stream_id(&pdev->dev, &stream_id))\n+\t\t\treturn dev_err_probe(&pdev->dev, -EINVAL, \"Missing iommu stream-id\\n\");\n \t}\n \n \tret = device_property_read_u32(&pdev->dev, \"dma-channel-mask\",\n@@ -1424,9 +1430,10 @@ static int tegra_dma_probe(struct platform_device *pdev)\n \t\ttdma->chan_mask = TEGRA_GPCDMA_DEFAULT_CHANNEL_MASK;\n \t}\n \n+\t/* Initialize vchan for each channel and populate the channels list */\n \tINIT_LIST_HEAD(&tdma->dma_dev.channels);\n \tfor (i = 0; i < cdata->nr_channels; i++) {\n-\t\tstruct tegra_dma_channel *tdc = &tdma->channels[i];\n+\t\ttdc = &tdma->channels[i];\n \n \t\t/* Check for channel mask */\n \t\tif (!(tdma->chan_mask & BIT(i)))\n@@ -1446,10 +1453,6 @@ static int tegra_dma_probe(struct platform_device *pdev)\n \n \t\tvchan_init(&tdc->vc, &tdma->dma_dev);\n \t\ttdc->vc.desc_free = tegra_dma_desc_free;\n-\n-\t\t/* program stream-id for this channel */\n-\t\ttegra_dma_program_sid(tdc, stream_id);\n-\t\ttdc->stream_id = stream_id;\n \t}\n \n \tdma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(cdata->addr_bits));\n@@ -1483,6 +1486,7 @@ static int tegra_dma_probe(struct platform_device *pdev)\n \ttdma->dma_dev.device_synchronize = tegra_dma_chan_synchronize;\n \ttdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;\n \n+\t/* Register the DMA device and the channels */\n \tret = dmaenginem_async_device_register(&tdma->dma_dev);\n \tif (ret < 0) {\n \t\tdev_err_probe(&pdev->dev, ret,\n@@ -1490,6 +1494,37 @@ static int tegra_dma_probe(struct platform_device *pdev)\n \t\treturn ret;\n \t}\n \n+\t/*\n+\t * Configure stream ID for each channel from the channels registered\n+\t * above. This is done in a separate iteration to ensure that only\n+\t * the channels available and registered for the DMA device are used.\n+\t */\n+\tlist_for_each_entry(chan, &tdma->dma_dev.channels, device_node) {\n+\t\tchdev = &chan->dev->device;\n+\t\ttdc = to_tegra_dma_chan(chan);\n+\n+\t\tif (use_iommu_map) {\n+\t\t\tchdev->bus = pdev->dev.bus;\n+\t\t\tdma_coerce_mask_and_coherent(chdev, DMA_BIT_MASK(cdata->addr_bits));\n+\n+\t\t\tret = of_dma_configure_id(chdev, pdev->dev.of_node,\n+\t\t\t\t\t\t true, &tdc->id);\n+\t\t\tif (ret)\n+\t\t\t\treturn dev_err_probe(chdev, ret,\n+\t\t\t\t\t \"Failed to configure IOMMU for channel %d\\n\", tdc->id);\n+\n+\t\t\tif (!tegra_dev_iommu_get_stream_id(chdev, &stream_id))\n+\t\t\t\treturn dev_err_probe(chdev, -EINVAL,\n+\t\t\t\t\t \"Failed to get stream ID for channel %d\\n\", tdc->id);\n+\n+\t\t\tchan->dev->chan_dma_dev = true;\n+\t\t}\n+\n+\t\t/* program stream-id for this channel */\n+\t\ttegra_dma_program_sid(tdc, stream_id);\n+\t\ttdc->stream_id = stream_id;\n+\t}\n+\n \tret = devm_of_dma_controller_register(&pdev->dev, pdev->dev.of_node,\n \t\t\t\t\t tegra_dma_of_xlate, tdma);\n \tif (ret < 0) {\n", "prefixes": [ "v6", "08/10" ] }