linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>
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
Date: Wed, 3 Mar 2021 12:47:28 +0300	[thread overview]
Message-ID: <4a407ad8-33cb-94e9-398a-78fa65178e08@gmail.com> (raw)
In-Reply-To: <20210302230856.GA22992@Asurada-Nvidia>

03.03.2021 02:08, Nicolin Chen пишет:
> 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] [<c052ec75>] (tegra_smmu_of_xlate) from [<c052e591>] (of_iommu_xlate+0x51/0x70)
>> [    0.328740] [<c052e591>] (of_iommu_xlate) from [<c052e6d7>] (of_iommu_configure+0x127/0x150)
>> [    0.328896] [<c052e6d7>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>> [    0.329060] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (really_probe+0x7b/0x2a0)
>> [    0.331438] tegra-dc 54200000.dc: --------tegra_smmu_probe_device, 822
>> [    0.332234] [<c052ebed>] (tegra_smmu_probe_device) from [<c052bd6d>] (__iommu_probe_device+0x35/0x1c4)
>> [    0.332391] [<c052bd6d>] (__iommu_probe_device) from [<c052c3cd>] (iommu_probe_device+0x19/0xec)
>> [    0.332545] [<c052c3cd>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>> [    0.332701] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>> [    0.332804] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (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] [<c0a0ff45>] (tegra_smmu_domain_alloc) from [<c0a0f87b>] (iommu_group_alloc_default_domain+0x4b/0xfa)
>> [    0.337127] [<c0a0f87b>] (iommu_group_alloc_default_domain) from [<c052c41d>] (iommu_probe_device+0x69/0xec)
>> [    0.337285] [<c052c41d>] (iommu_probe_device) from [<c052e6ab>] (of_iommu_configure+0xfb/0x150)
>> [    0.337441] [<c052e6ab>] (of_iommu_configure) from [<c073f697>] (of_dma_configure_id+0x1fb/0x2ec)
>> [    0.337599] [<c073f697>] (of_dma_configure_id) from [<c059743f>] (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.

DC driver on Nexus 7 depends on LVDS bridge and display panel, which
cause the probe defer.

> 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...
> 

I think Thierry should give ack.

  reply	other threads:[~2021-03-03 14:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 22:07 [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan Nicolin Chen
2021-02-20  5:16 ` Dmitry Osipenko
2021-02-23  2:13   ` Nicolin Chen
2021-02-23  5:10     ` Dmitry Osipenko
2021-02-25  6:27       ` Nicolin Chen
2021-02-27  9:59         ` Dmitry Osipenko
2021-03-02 23:08           ` Nicolin Chen
2021-03-03  9:47             ` Dmitry Osipenko [this message]
2021-03-28 15:25               ` Dmitry Osipenko
2021-03-28 15:36                 ` Dmitry Osipenko
2021-02-22 13:15 ` Guillaume Tucker
2021-03-03 18:26 ` Thierry Reding
2021-03-04 12:21 ` Joerg Roedel
2021-03-10 19:13 ` Dmitry Osipenko
2021-03-10 20:22   ` Dmitry Osipenko
2021-03-10 22:17     ` Nicolin Chen
2021-03-11 12:06       ` Dmitry Osipenko
2021-03-12  1:09         ` Nicolin Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a407ad8-33cb-94e9-398a-78fa65178e08@gmail.com \
    --to=digetx@gmail.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).