lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 6 Feb 2019 08:37:17 +0100
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Thierry Reding <thierry.reding@...il.com>,
        Christoph Hellwig <hch@....de>
Cc:     Robin Murphy <robin.murphy@....com>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma-direct: Export dma_direct_alloc() and
 dma_direct_free()

Hi Thierry,

On 2019-02-05 23:29, Thierry Reding wrote:
> On Tue, Feb 05, 2019 at 07:02:18PM +0100, Christoph Hellwig wrote:
>> On Tue, Feb 05, 2019 at 06:56:11PM +0100, Thierry Reding wrote:
>>> Sure, here you go:
>>>
>>> 	https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/host1x/cdma.c#n106
>> Yes, I think we I can come up with a nicer helper for that.
> One thing I could also try is to remove direct IOMMU API usage at least
> from the host1x driver. I think this might work nowadays.
>
> For Tegra DRM we still need direct IOMMU API usage because we need to be
> able to map into an IOMMU domain without knowing the struct device *
> that we're mapping for (it could be needed by any of up to four display
> controllers). For host1x we always only have one struct device *, so the
> DMA mapping API should be good enough.

In case of Tegra DRM you may try to use Exynos DRM approach. Exynos DRM
also consists of more than one DMA capable device and uses one common
IOMMU address space for them. It is achieved by attaching all those
devices to the IOMMU domain of the first CRTC device that has been
registered. Then that device is used for DMA-mapping calls. It is not
very elegant, but works fine and allows to use standard DMA-mapping calls.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists