Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627277
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse |
| Date | 2017-04-20 12:10 +0200 |
| Message-ID | <tyhcf-7D4-43@gated-at.bofh.it> (permalink) |
| References | <ty2wy-6N4-3@gated-at.bofh.it> <tyeo3-5TJ-29@gated-at.bofh.it> <tyfDs-6zX-21@gated-at.bofh.it> <tygSR-7gN-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Apr 20, 2017 at 11:44 AM, Mikko Perttunen <cyndis@kapsi.fi> wrote:
> On 20.04.2017 11:25, Arnd Bergmann wrote:
>> On Thu, Apr 20, 2017 at 9:02 AM, Mikko Perttunen <cyndis@kapsi.fi> wrote:
>>> On 19.04.2017 21:24, Arnd Bergmann wrote:
>>
>> I don't think this can be a per-platform policy.
>
>
> Yeah, now that we are using the ARM SMMU on T186 onwards it's more difficult
> than when we were using the Tegra SMMU, so we'll probably have to change
> that.
>
> The goal of the current code is to allocate memory from the CMA, so one
> option would be to change it to use dma_alloc_from_contiguous. That way we
> wouldn't get the double IOMMU mapping, which would be nice.
Right, also we shouldn't define what a particular API does based on
which platform you run on.
> The goal of the current code is to allocate memory from the CMA, so one
> option would be to change it to use dma_alloc_from_contiguous. That way
> we wouldn't get the double IOMMU mapping, which would be nice.
dma_alloc_from_contiguous() is intentionally not exported to drivers,
and it would result in a page that is not mapped into your kernel
address space.
This is probably not the only driver that has this issue, so maybe a
better approach would be to fill the API gap and introduce an IOMMU
API function that takes a domain/iova/length tuple as its argument
and allocates coherent or WC memory that it maps into that address?
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-19 20:30 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-20 09:10 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-20 10:30 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-20 11:50 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-20 12:10 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-20 12:20 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-20 11:50 +0200
Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-20 12:10 +0200
csiph-web