Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp483319lqr; Wed, 5 Jun 2024 11:29:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVap0QHKxle2PCWK7Cq9afxOvCJR9r18dQTsbs5FSc/iFapV70aksNjecw2/b1+7Gw1saG2DUzhYX4XmVCp7w9mQIVJJu+u5rAhZh0NMg== X-Google-Smtp-Source: AGHT+IEfRzMo/3mUiffAlS/aHXPacrHMWbhdgRpmAeBrhBB5TFGCQUEko1BSFlhyuIwcq5NnpyVr X-Received: by 2002:a05:620a:4045:b0:793:cd7:5854 with SMTP id af79cd13be357-7952f1470bfmr85680585a.36.1717612148676; Wed, 05 Jun 2024 11:29:08 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f317b1c7si37475685a.438.2024.06.05.11.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203057-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=VekqrrT7; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-203057-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203057-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 45FB81C231B6 for ; Wed, 5 Jun 2024 18:29:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 786527347A; Wed, 5 Jun 2024 18:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="VekqrrT7" Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2041.outbound.protection.outlook.com [40.107.249.41]) (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 6C9DA5228; Wed, 5 Jun 2024 18:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.41 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717612137; cv=fail; b=oTOcopNrtpb8VkLVDRZn3Y/9JxeblAQVih5NZBxn6ElW69mUqsz7314PIY0qfe0tEUdQxaNyg+QuORekVU9qfSiYujqVXe3P/rmYw8eqs4v2VR9jOmiOw36t2g9MFPoGAJwdBZYuTFwhYGCgfu2i+cgrrHP3iYpX47n5Zb/vcrI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717612137; c=relaxed/simple; bh=exsVi7RISMNaMclnM6P4PO0kMFwSwF1InvjwHGNh3+0=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=aQtrpFHfyiT9Tygtixhmd9JQg5Dw2sMZiBWiY8VsnVs/kyRutYS8ka0+o9jIRcKBoOnUG5ZPe6zC7/J22/aCrHrw2GWkETq1RsIQU34086UoQ3aUPTFObhCd3CJLJUd7i8OYs+3o4ANT7Eq8DA61sKnUYecGAWXEBBNmKa9Wdn8= 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=VekqrrT7; arc=fail smtp.client-ip=40.107.249.41 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=T2Q+Dfp/oF9f2LOsh5n+AC5CdXj2B5kkRSOyvZ+uBnulvEhPll79uCH+vQjn9Qcsm8o17KrsxdoQMael4/AoT0aEKU4esmlOVQuYbyTUFn/1Qce8Vw66Y4YnhdnjgjdP1NKN1WQa2wRSv/L2u7ddYQVPSdXVjGB4jKsJ+fJSWqP4KEO4I+2GhzfMAtD+JM+V4xXHMkS+5ND2xOdIEIok7eX7B/VDVMCsFH/VU/JmQU19blkZaYbXrl+Jzh23d8hga7Ji0X7br2edfWg71exeoS+09eBbX4B9uMGnScbZ1alezsUiHvZFb+xdYXuKTSwXWAvRRepr0kPanfyJeswkMQ== 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=BMBBYpg3mi7aWqlP2BbsF8b+pD8UEkhOSYYQQhsKTVU=; b=Ix/n4dd5JmLBCHuQmb8xvxulV4+BnmEJvSV5oQdkAetVQ1X+/9qzQPSwtZ/Fhm3qNJT/weAdxS/Bu6LaK3wnyMndrAitMAnsEGtifP2Ey2t1S4FBH7eYy6my4eUw3mr8DvC6UJcbdUGilK3JYiUgtdEc4nERahJnLECHh4EBCnQSDdfeYCvjX01N0tGlhvuKpdMoMbKv7U3ahIcThAr/u3eRYPozD4YjUMeWX7IVxAAcb65RGi16LjwOQlxXULCgyxsjoQFihxA5Y5TQpoXsRUHN9rXodh0EvXeEcl6xfCCnB+T1tUKcyLgp8VFZz62FiaOARr8HBSgToc6DIh4/9w== 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=BMBBYpg3mi7aWqlP2BbsF8b+pD8UEkhOSYYQQhsKTVU=; b=VekqrrT7brUAPpgN2f7JgNhHSkxvTL3ypMsEZUQy1eVIgQgo+tE3M2hdZaYfp9oD5it96TSRxE1N8LTfJynMNjKjtNfmXvPURhTMw/bJtNxypJJWPkQqZ0+2JEXpPKBg1mXk2uQElNt7vWiibccD0UoKjF5EoWoetLzqpHhJgTw= 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 AM8PR04MB7906.eurprd04.prod.outlook.com (2603:10a6:20b:24e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.27; Wed, 5 Jun 2024 18:28:52 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7633.021; Wed, 5 Jun 2024 18:28:51 +0000 Date: Wed, 5 Jun 2024 14:28:38 -0400 From: Frank Li To: Dave Stevenson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Vinod Koul , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Ulf Hansson , Mark Brown , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Vladimir Murzin , Phil Elwell , Stefan Wahren , Serge Semin , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mmc@vger.kernel.org, linux-spi@vger.kernel.org, iommu@lists.linux.dev, linux-sound@vger.kernel.org Subject: Re: [PATCH 16/18] drm/vc4: Use phys addresses for slave DMA config Message-ID: References: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> <20240524182702.1317935-17-dave.stevenson@raspberrypi.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524182702.1317935-17-dave.stevenson@raspberrypi.com> X-ClientProxiedBy: BY5PR03CA0026.namprd03.prod.outlook.com (2603:10b6:a03:1e0::36) 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_|AM8PR04MB7906:EE_ X-MS-Office365-Filtering-Correlation-Id: ef87de64-a382-48ab-ceb0-08dc858d594d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007|7416005|52116005|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6QKKJq3vF58VtTVeJV0e7TZMecz8CKSYxf9pT0wCspCG3tG8+M6OM8lAy86E?= =?us-ascii?Q?LEFjzhbxXXWQXOPRxJtoWpdq6yNqoDD6DiXxdW+599bz7iGdehYlOyzeTGmC?= =?us-ascii?Q?Zp+2xeVVZNOgqy9HMrPuoF1aTXL5nFNfwmnD7KMR3FbBoPhrxyUnfUMzBczU?= =?us-ascii?Q?ynHYFIm+x1/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5QKSUS/RqMq?= =?us-ascii?Q?thTriX9+DMelQmXyZm+DE2hF7H2KMukBEXI2rqfPYdVbOfx+lrZaApcytJSm?= =?us-ascii?Q?V61PcHlBIWQf4DinF7eShK789mexxuTElauzeIwOF91qbM8drv73BL2/6Ypz?= =?us-ascii?Q?df9Ay6P9kIZrz0n6JeW7QTi/7Urh1rTsryjk1cfLZBeo4Nu2v1SryI6nSot+?= =?us-ascii?Q?ACvAa+prH+jbp6jzgvokCJMVJpBkTk7jA79bCJgl3vaSCzPKkfAKWlyYjdm2?= =?us-ascii?Q?EYf/6mwmvwBxRHwiPJ3x/3RehAHv6zLeQrwSICdOhbOl+w=3D=3D?= 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)(1800799015)(366007)(7416005)(52116005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?f4JppEpsVHNRidpszQ7pTvwzJRWL10VYJD2WmA8+GmMvyvWj2nn24Y4AB7QT?= =?us-ascii?Q?8rcHZU5p/St5todaDrdw6+afB/edd2RX0H++qhMWIOyytRNLp3GIOMqIZ66I?= =?us-ascii?Q?5eKwJbQOKR0+8ZRrEEEJFGQFL4vZzuts/m3zkhnoOWz+N47k1XwGpzAQfDA5?= =?us-ascii?Q?GgFCaXB4XvfhtbfnINrDjemoWIe6ZY3IFYelVNyodUvWFe7LS6ETmkO643Wn?= =?us-ascii?Q?v1PXF9OS6antgU9DJELqZJ1VuN6YwC6+Zs2LNIligCH+f+WbCLSBb0l4/v52?= =?us-ascii?Q?Qm2gkZzKnaE0izOU2jml5nUI+Whg2ajr7az87rp+xZZzvl54oULRonSJ1PLn?= =?us-ascii?Q?itEX1BDpqWNByR27s/4RnrP6DELosWA9JoaxYe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Afzx6oTly1xVbLb3JKta/a1i5hEiN+IKspfLihvDv7Fym?= =?us-ascii?Q?N1LOCQywlr//dZka/CIAZOiarWp1JZrHswaGyWir2oow+heQaj9+BSa8jEMg?= =?us-ascii?Q?BBesC2gTljxtAs/m3jgS7nOGk//L9w65Hw7DiyJ0KkRYW7zMaRnOW6BjPGGh?= =?us-ascii?Q?ryoBDBYT1Phk8VQQdmGUH/l8quk0NjYNUqsryIcgaLf6QHTsmok0emXNxYMr?= =?us-ascii?Q?LVBzoK+0Vhh6NfXuGEM2qgncaOvBXmAnqs0LOoHJcrY0jValEfgp0JgeOXNS?= =?us-ascii?Q?hX0h0O73OPfcmvUlzf6BO8Y4HjDUudjOlw5pte4G?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef87de64-a382-48ab-ceb0-08dc858d594d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2024 18:28:51.5877 (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: jlDT/6XeYhA/R7WmhgCKJWO6H4F69joibEF5AOMLo+zd2LlAwdpoO+OCOYspKBL4D+mFbD55Ir0jy9zc10IWJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7906 On Fri, May 24, 2024 at 07:27:00PM +0100, Dave Stevenson wrote: > From: Phil Elwell > > Slave addresses for DMA are meant to be supplied as physical addresses > (contrary to what struct snd_dmaengine_dai_dma_data does). Can you use the same content for patch 14-17? Frank > > Signed-off-by: Phil Elwell > Signed-off-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index d30f8e8e8967..c2afd72bd96e 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -2696,7 +2696,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi) > struct snd_soc_card *card = &vc4_hdmi->audio.card; > struct device *dev = &vc4_hdmi->pdev->dev; > struct platform_device *codec_pdev; > - const __be32 *addr; > + struct resource *iomem; > int index, len; > int ret; > > @@ -2732,22 +2732,15 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi) > } > > /* > - * Get the physical address of VC4_HD_MAI_DATA. We need to retrieve > - * the bus address specified in the DT, because the physical address > - * (the one returned by platform_get_resource()) is not appropriate > - * for DMA transfers. > - * This VC/MMU should probably be exposed to avoid this kind of hacks. > + * Get the physical address of VC4_HD_MAI_DATA. > */ > index = of_property_match_string(dev->of_node, "reg-names", "hd"); > /* Before BCM2711, we don't have a named register range */ > if (index < 0) > index = 1; > + iomem = platform_get_resource(vc4_hdmi->pdev, IORESOURCE_MEM, index); > > - addr = of_get_address(dev->of_node, index, NULL, NULL); > - if (!addr) > - return -EINVAL; > - > - vc4_hdmi->audio.dma_data.addr = be32_to_cpup(addr) + mai_data->offset; > + vc4_hdmi->audio.dma_data.addr = iomem->start + mai_data->offset; > vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; > vc4_hdmi->audio.dma_data.maxburst = 2; > > -- > 2.34.1 >