Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1486672pxb; Thu, 4 Mar 2021 12:36:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTts7E87MRW4jNGmD03AqDD8qDvq7DjoLz87uKOczu7tGDXwUzxHFMeLOyPhWHexFp+ECq X-Received: by 2002:a05:6402:2cd:: with SMTP id b13mr6461259edx.55.1614890184606; Thu, 04 Mar 2021 12:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614890184; cv=none; d=google.com; s=arc-20160816; b=pnHJ2cfZOzKw3vqpiwxIaZBaC4C+5lSb0irpkqI3tNZiR/Wlru8YUr+Mc56ZR1A3o3 ycO4AQlbVKNcF0zEYek4pJVI4NfgvgrBQESzSzEM64ZpfPQ0WLi4YCaTCOTgtUgEI3pi NCxGbFWIEnKAaw+opbexaDi0MSOuuFRRUq1ESE6/8t6Qc6eu62GGNgp4VqvsSXae3vQM G+CP1zaagYD+6F6OgMzpoM6o1oEvJjiKAGrnaZjkQ2UTSmuN/EsIfLH6SjOE101ofNDc ptejVo7Gu/TFkeWGl/x97Ux7jIig9gv7vIaLSJB1DuA7QLXasXP4qySgLl0yYATDiucK xvPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=L3H573ByBrOBb02mX24lIDWny2m/571jx6B2ljmNh9I=; b=s9qgdUkAUkrhQF2bpCyeLkp9U0lGIk5+keApYTHoZpNAufR8yPpGCtuoP7eqc6z385 O2YJeRo7abArQhQAHYb9O6dRIJ4HkvwlBVzXisdTyDhLOLGz6O7Exu73K6SPVeu4qpdf vHCmN3bUOn6a9bvQutOMSJ2H9kS13FhZiBZ4/27k+Nxo8lJmlMIvuYf/dNRr/AMyAElk xKDW4fTdv7PDOvxR6940++/NFvZJ6g+W+wk7RamSxKONfpxdbTE8525iSPPVDEDHvXkw vWeiKD/qFDBNQJ9npHJfs58UHgfkHPThh7a9ZMcu9Nov0iGDd31tS1xH3h2XbhF4Pb01 LpaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsm0YN6O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m24si334134edp.422.2021.03.04.12.36.02; Thu, 04 Mar 2021 12:36:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsm0YN6O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356757AbhCCKsS (ORCPT + 99 others); Wed, 3 Mar 2021 05:48:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2361018AbhCBXME (ORCPT ); Tue, 2 Mar 2021 18:12:04 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58237C061756; Tue, 2 Mar 2021 15:11:24 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id j12so14813545pfj.12; Tue, 02 Mar 2021 15:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=L3H573ByBrOBb02mX24lIDWny2m/571jx6B2ljmNh9I=; b=nsm0YN6OwiBC+K4bksH/UKwwlqlHN8/6zHYehmIUvbFMy2m/6ZdXis7+k2M95kBthr 3vFkaz4iRTr4hgC3hDjLpsq4Cmn48gblX4IBupXb0rLWaVoccuf3m28hhu1tNb4F6jrf gSzNoOkLAcV7+u1XMmPFrNgnOUeOTGbF1GDwWjDuNK5TBFsmY+E7GGl9HyBGgyxk1vBR rkGvERwp9pKlgNrDRNUq6vuD8JNscgDWtQ0rlBdHQf6YBC8AwfVn4fsn/oaJTVjmnfPi EowMgu5d2N1iyjQluoRtsZNqUVQQDlIvye2+UFCy3LA32Vq7eJ1yxGmgjbcHwzD//e0K ZMUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=L3H573ByBrOBb02mX24lIDWny2m/571jx6B2ljmNh9I=; b=mFsAl3tW69fVM7Im2tQPw3rH1n1BiV5L0+Ml/8eC77K7BLhatDXW0aiwxYYSiRr79e FCZ4cz2WHpxE5dT8rZSjTEgtiEkQTSj0lFXdW+b5HplWRa5Oa2r5l4FHYGjQow2TMAcC HCrnksVfqMIHMRNjHIv8wnLxXOksmBLvnSFjb0IoTP0MK5vqKmj1JBUVuSXqGbhHcefx mrpXUbxZ/7xRb3KlDZt3owmOw+j3E0s7ej4Eae3LKKM2wCDXAfXX3cRdX5dH98SCEAyZ /RcYLfyqiOQ+hr2+fv9w4D2Ykj+kEcMLRu8ZER/4rhfCiDkv3tnGKizgg+r2ShUbzknX oAVQ== X-Gm-Message-State: AOAM530K4ojoxhV8qfJpXHEU0ulYlg5//lKyUTPo2scoLQGUpEvK7PL8 iZ9Ktim6XCaevzRHn8MaKZA= X-Received: by 2002:a65:46c7:: with SMTP id n7mr20247495pgr.267.1614726683722; Tue, 02 Mar 2021 15:11:23 -0800 (PST) Received: from Asurada-Nvidia (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id y12sm7959008pgs.71.2021.03.02.15.11.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Mar 2021 15:11:23 -0800 (PST) Date: Tue, 2 Mar 2021 15:08:59 -0800 From: Nicolin Chen To: Dmitry Osipenko Cc: joro@8bytes.org, thierry.reding@gmail.com, will@kernel.org, guillaume.tucker@collabora.com, vdumpa@nvidia.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Message-ID: <20210302230856.GA22992@Asurada-Nvidia> References: <20210218220702.1962-1-nicoleotsuka@gmail.com> <9d6445c0-9574-1650-e327-32b11716f87e@gmail.com> <20210223021343.GA6539@Asurada-Nvidia> <79bb1248-497f-8adf-663b-74448bea3849@gmail.com> <20210225062742.GA13353@Asurada-Nvidia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote: > 25.02.2021 09:27, Nicolin Chen пишет: > ... > >> The partially revert should be okay, but it's not clear to me what makes > >> difference for T124 since I don't see that problem on T30, which also > >> has active display at a boot time. > > > > Hmm..do you see ->attach_dev() is called from host1x_client_iommu_attach > > or from of_dma_configure_id/arch_setup_dma_ops? > > > > I applied yours debug-patch, please see dmesg.txt attached to the email. > Seems probe-defer of the tegra-dc driver prevents the implicit > tegra_smmu_attach_dev, so it happens to work by accident. > [ 0.327826] tegra-dc 54200000.dc: -------tegra_smmu_of_xlate: id 1 > [ 0.328641] [] (tegra_smmu_of_xlate) from [] (of_iommu_xlate+0x51/0x70) > [ 0.328740] [] (of_iommu_xlate) from [] (of_iommu_configure+0x127/0x150) > [ 0.328896] [] (of_iommu_configure) from [] (of_dma_configure_id+0x1fb/0x2ec) > [ 0.329060] [] (of_dma_configure_id) from [] (really_probe+0x7b/0x2a0) > [ 0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822 > [ 0.332234] [] (tegra_smmu_probe_device) from [] (__iommu_probe_device+0x35/0x1c4) > [ 0.332391] [] (__iommu_probe_device) from [] (iommu_probe_device+0x19/0xec) > [ 0.332545] [] (iommu_probe_device) from [] (of_iommu_configure+0xfb/0x150) > [ 0.332701] [] (of_iommu_configure) from [] (of_dma_configure_id+0x1fb/0x2ec) > [ 0.332804] [] (of_dma_configure_id) from [] (really_probe+0x7b/0x2a0) > [ 0.335202] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1572 > [ 0.335292] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 862 > [ 0.335474] tegra-dc 54200000.dc: ---------tegra_smmu_device_group, 909: 1: drm > [ 0.335566] tegra-dc 54200000.dc: ---------iommu_group_get_for_dev, 1574 > [ 0.335718] tegra-dc 54200000.dc: ---------iommu_group_add_device, 858 > [ 0.335862] tegra-dc 54200000.dc: Adding to iommu group 1 > [ 0.335955] tegra-dc 54200000.dc: ---------iommu_alloc_default_domain, 1543: type 3 > [ 0.336101] iommu: ------iommu_group_alloc_default_domain: platform, (null), drm > [ 0.336187] ---------tegra_smmu_domain_alloc, 284: type 3 [ 0.336968] [] (tegra_smmu_domain_alloc) from [] (iommu_group_alloc_default_domain+0x4b/0xfa) > [ 0.337127] [] (iommu_group_alloc_default_domain) from [] (iommu_probe_device+0x69/0xec) > [ 0.337285] [] (iommu_probe_device) from [] (of_iommu_configure+0xfb/0x150) > [ 0.337441] [] (of_iommu_configure) from [] (of_dma_configure_id+0x1fb/0x2ec) > [ 0.337599] [] (of_dma_configure_id) from [] (really_probe+0x7b/0x2a0) > [ 0.339913] tegra-dc 54200000.dc: ---------iommu_probe_device, 272 > [ 0.348144] tegra-dc 54200000.dc: failed to probe RGB output: -517 Hmm..not sure where this EPROBE_DEFER comes from. But you are right, as of_dma_configure_id() returns because of that so it didn't run to arch_setup_dma_ops() call, which allocates an UNMANAGED iommu domain and attaches DC to it on Tegra124. By the way, anyone can accept this change? It doesn't feel right to leave a regression in the newer release...