[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf32cdea-ee5b-1431-3b97-c0889acdacc6@samsung.com>
Date: Mon, 24 Aug 2020 13:40:48 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Robin Murphy <robin.murphy@....com>, hch@....de, joro@...tes.org,
linux@...linux.org.uk
Cc: will@...nel.org, inki.dae@...sung.com, sw0312.kim@...sung.com,
kyungmin.park@...sung.com, agross@...nel.org,
bjorn.andersson@...aro.org, thierry.reding@...il.com,
jonathanh@...dia.com, vdumpa@...dia.com, digetx@...il.com,
matthias.bgg@...il.com, yong.wu@...iatek.com,
geert+renesas@...der.be, magnus.damm@...il.com, t-kristo@...com,
s-anna@...com, laurent.pinchart@...asonboard.com,
linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux-foundation.org,
linux-samsung-soc@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-mediatek@...ts.infradead.org,
dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/18] Convert arch/arm to use iommu-dma
Hi Robin,
On 20.08.2020 17:08, Robin Murphy wrote:
> Hi all,
>
> After 5 years or so of intending to get round to this, finally the
> time comes! The changes themselves actualy turn out to be relatively
> mechanical; the bigger concern appears to be how to get everything
> merged across about 5 diffferent trees given the dependencies.
>
> I've lightly boot-tested things on Rockchip RK3288 and Exynos 4412
> (Odroid-U3), to the degree that their display drivers should be using
> IOMMU-backed buffers and don't explode (the Odroid doesn't manage to
> send a working HDMI signal to the one monitor I have that it actually
> detects, but that's a pre-existing condition...) Confirmation that the
> Mediatek, OMAP and Tegra changes work will be most welcome.
>
> Patches are based on 5.9-rc1, branch available here:
>
> git://linux-arm.org/linux-rm arm/dma
Well, my first proposal for the ARM and ARM64 DMA-mapping unification
has been posted long time ago: https://lkml.org/lkml/2016/2/19/79
Thanks for resurrecting it! :)
I've tested this patchset on various ARM32bit Exynos based boards (not
only Exynos4412) and most of them works fine after your conversion.
However there are issues you cannot learn from the code.
Conversion of the Exynos DRM was straightforward (thanks!), but there
are other Exynos drivers that depends on the old ARM implementation. The
S5P-MFC (only for the v5 hardware) and Exynos4 FIMC-ISP drivers depends
on the first-fit IOVA allocation algorithm in the old ARM DMA-mapping.
This was the main reason I've didn't continue my initial conversion attempt.
Both drivers allocate a buffer for their firmware and then in the
hardware registers address video buffers as an offset from the
begginning of the firmware. This doesn't work when underlying
DMA-mapping allocates IOVA with the last-fit algorithm, what the
drivers/iommu/dma-iommu.c does. So far I didn't find a good solution for
that issue.
I'm open for suggestions. One more limitation for the S5P-MFC driver is
that the hardware is capable only for addressing 128MiB. They will
probably need to call IOMMU API directly, but I would like to keep as
much from the IOMMU/DMA-mapping code as possible.
Anyway, we need to move ARM 32bit forward, so for the ARM DMA-mapping
and Exynos DRM changes, feel free to add:
Acked-by: Marek Szyprowski <m.szyprowski@...sung.com>
Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Powered by blists - more mailing lists