All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: David Virag <virag.david003@gmail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Janghyuck Kim <janghyuck.kim@samsung.com>,
	Cho KyongHo <pullip.cho@samsung.com>,
	Daniel Mentz <danielmentz@google.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	iommu@lists.linux-foundation.org, iommu@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7
Date: Mon, 11 Jul 2022 02:04:31 +0300	[thread overview]
Message-ID: <CAPLW+4kU3gLfSRa4cm+374Fh4ooCag7kSk_cwhDe=M8ewMzcbw@mail.gmail.com> (raw)
In-Reply-To: <67943ec4dcfe85d6d616a5507437d99f6c5638a2.camel@gmail.com>

On Sun, 3 Jul 2022 at 13:47, David Virag <virag.david003@gmail.com> wrote:
>
> On Sun, 2022-07-03 at 00:48 +0300, Sam Protsenko wrote:
> [...]
> > Hi Marek,
> >
> > As I understand, you have some board with SysMMU v7, which is not VM
> > capable (judging from the patches you shared earlier). Could you
> > please somehow verify if this series works fine for you? For example,
> > this testing driver [1] can be helpful.
> >
> > Thanks!
> >
> > [1]
> > https://github.com/joe-skb7/linux/commit/bbadd46fa525fe1fef2ccbdfff81f7d29caf0506
>
> Hi Sam,
>
> Not Marek here, but I wanted to try this on my jackpotlte (Exynos
> 7885). The driver reports it's DPU sysmmu as version 7.2, and manually
> reading the capabilities registers it looks like it has the 2nd
> capability register but not the VM capability.
>
> After applying your patches, adding your test driver (with SYSMMU_BASE
> corrected to 7885 value), and adding the sysmmu to dt, I tried to cat
> the test file that it creates in debugfs and I got an SError kernel
> panic.
>
> I tried tracing where the SError happens and it looks like it's this
> line:
>         /* Preload for emulation */
>         iowrite32(rw | vpn, obj->reg_base + MMU_EMU_PRELOAD);
>
> Trying to read the EMU registers using devmem results in a "Bus error".
>
> Could these emulation registers be missing from my SysMMU? Do you have
> any info on what version should have it? Or maybe some capability bit?
> I'll try testing it with DECON/DPP later and see if it works that way.
>

I don't have any manuals for v7.2, so I can only assume. Yes, it looks
to me very much like those EMU registers are missing in your SysMMU
IP-core: I remember seeing some similar SError messages while trying
to access some incorrect MMIO addresses. Good news is that once this
patch series is fixed and accepted, you can *probably* base your work
on top of it (as I only validated it with EMU registers for now). I
mean you can add some real IP-core users of that IOMMU, like graphics
(DPU), audio, camera, etc. Not sure though if it would be enough to
just add some DTS nodes, or your SoC support has to be added to some
drivers first.

> Best regards,
> David

WARNING: multiple messages have this Message-ID (diff)
From: Sam Protsenko <semen.protsenko@linaro.org>
To: David Virag <virag.david003@gmail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Joerg Roedel <joro@8bytes.org>,  Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	 Janghyuck Kim <janghyuck.kim@samsung.com>,
	Cho KyongHo <pullip.cho@samsung.com>,
	 Daniel Mentz <danielmentz@google.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	 iommu@lists.linux-foundation.org, iommu@lists.linux.dev,
	 linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7
Date: Mon, 11 Jul 2022 02:04:31 +0300	[thread overview]
Message-ID: <CAPLW+4kU3gLfSRa4cm+374Fh4ooCag7kSk_cwhDe=M8ewMzcbw@mail.gmail.com> (raw)
In-Reply-To: <67943ec4dcfe85d6d616a5507437d99f6c5638a2.camel@gmail.com>

On Sun, 3 Jul 2022 at 13:47, David Virag <virag.david003@gmail.com> wrote:
>
> On Sun, 2022-07-03 at 00:48 +0300, Sam Protsenko wrote:
> [...]
> > Hi Marek,
> >
> > As I understand, you have some board with SysMMU v7, which is not VM
> > capable (judging from the patches you shared earlier). Could you
> > please somehow verify if this series works fine for you? For example,
> > this testing driver [1] can be helpful.
> >
> > Thanks!
> >
> > [1]
> > https://github.com/joe-skb7/linux/commit/bbadd46fa525fe1fef2ccbdfff81f7d29caf0506
>
> Hi Sam,
>
> Not Marek here, but I wanted to try this on my jackpotlte (Exynos
> 7885). The driver reports it's DPU sysmmu as version 7.2, and manually
> reading the capabilities registers it looks like it has the 2nd
> capability register but not the VM capability.
>
> After applying your patches, adding your test driver (with SYSMMU_BASE
> corrected to 7885 value), and adding the sysmmu to dt, I tried to cat
> the test file that it creates in debugfs and I got an SError kernel
> panic.
>
> I tried tracing where the SError happens and it looks like it's this
> line:
>         /* Preload for emulation */
>         iowrite32(rw | vpn, obj->reg_base + MMU_EMU_PRELOAD);
>
> Trying to read the EMU registers using devmem results in a "Bus error".
>
> Could these emulation registers be missing from my SysMMU? Do you have
> any info on what version should have it? Or maybe some capability bit?
> I'll try testing it with DECON/DPP later and see if it works that way.
>

I don't have any manuals for v7.2, so I can only assume. Yes, it looks
to me very much like those EMU registers are missing in your SysMMU
IP-core: I remember seeing some similar SError messages while trying
to access some incorrect MMIO addresses. Good news is that once this
patch series is fixed and accepted, you can *probably* base your work
on top of it (as I only validated it with EMU registers for now). I
mean you can add some real IP-core users of that IOMMU, like graphics
(DPU), audio, camera, etc. Not sure though if it would be enough to
just add some DTS nodes, or your SoC support has to be added to some
drivers first.

> Best regards,
> David

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-07-10 23:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 21:37 [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7 Sam Protsenko
2022-07-02 21:37 ` Sam Protsenko
2022-07-02 21:37 ` Sam Protsenko
2022-07-02 21:37 ` [PATCH 1/4] iommu/exynos: Set correct dma mask for SysMMU v5+ Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-03 18:50   ` Krzysztof Kozlowski
2022-07-03 18:50     ` Krzysztof Kozlowski
2022-07-03 18:50     ` Krzysztof Kozlowski
2022-07-08 13:18     ` Sam Protsenko
2022-07-08 13:18       ` Sam Protsenko
2022-07-11 12:27       ` Krzysztof Kozlowski
2022-07-11 12:27         ` Krzysztof Kozlowski
2022-07-11 12:59         ` Robin Murphy
2022-07-11 12:59           ` Robin Murphy
2022-07-02 21:37 ` [PATCH 2/4] iommu/exynos: Check if SysMMU v7 has VM registers Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-03 19:10   ` Krzysztof Kozlowski
2022-07-03 19:10     ` Krzysztof Kozlowski
2022-07-03 19:10     ` Krzysztof Kozlowski
2022-07-08 13:34     ` Sam Protsenko
2022-07-08 13:34       ` Sam Protsenko
2022-07-02 21:37 ` [PATCH 3/4] iommu/exynos: Use lookup based approach to access v7 registers Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-03 19:29   ` Krzysztof Kozlowski
2022-07-03 19:29     ` Krzysztof Kozlowski
2022-07-03 19:29     ` Krzysztof Kozlowski
2022-07-08 18:13     ` Sam Protsenko
2022-07-08 18:13       ` Sam Protsenko
2022-07-02 21:37 ` [PATCH 4/4] iommu/exynos: Add minimal support for SysMMU v7 with VM registers Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-02 21:37   ` Sam Protsenko
2022-07-02 21:48 ` [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7 Sam Protsenko
2022-07-02 21:48   ` Sam Protsenko
2022-07-02 21:48   ` Sam Protsenko
2022-07-03 12:47   ` David Virag
2022-07-03 12:47     ` David Virag
2022-07-03 12:47     ` David Virag
2022-07-06 14:24     ` Sam Protsenko
2022-07-06 14:24       ` Sam Protsenko
2022-07-06 14:24       ` Sam Protsenko
2022-07-10 23:04     ` Sam Protsenko [this message]
2022-07-10 23:04       ` Sam Protsenko
2022-07-13 14:14     ` Sam Protsenko
2022-07-13 14:14       ` Sam Protsenko

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='CAPLW+4kU3gLfSRa4cm+374Fh4ooCag7kSk_cwhDe=M8ewMzcbw@mail.gmail.com' \
    --to=semen.protsenko@linaro.org \
    --cc=danielmentz@google.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=iommu@lists.linux.dev \
    --cc=janghyuck.kim@samsung.com \
    --cc=joro@8bytes.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=pullip.cho@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=sumit.semwal@linaro.org \
    --cc=virag.david003@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.