[lkml]   [2017]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols
On Thu, Jul 6, 2017 at 3:31 PM, Tomasz Figa <> wrote:
> On Thu, Jul 6, 2017 at 9:23 PM, Arnd Bergmann <> wrote:
>> On Thu, Jul 6, 2017 at 10:36 AM, Tomasz Figa <> wrote:
>>> On Thu, Jul 6, 2017 at 5:34 PM, Tomasz Figa <> wrote:
>>> Sorry, I intended to mean:
>>> IMHO re-implementing the code that's already there in videobuf2 again
>>> in the driver, only because, for no good reason mentioned as for now,
>>> having a loadable module providing DMA ops was disliked, would make no
>>> sense.
>> Why would we need to duplicate that code? I would expect that the videobuf2
>> core can simply call the regular dma_mapping interfaces, and you handle the
>> IOPTE generation at the point when the buffer is handed off from the core
>> code to the device driver. Am I missing something?
> Well, for example, the iommu-dma helpers already implement all the
> IOVA management, SG iterations, IOMMU API calls, sanity checks and so
> on. There is a significant amount of common code.
> On the other hand, if it's strictly about base/dma-mapping, we might
> not need it indeed. The driver could call iommu-dma helpers directly,
> without the need to provide its own DMA ops.

Yes, that's what I meant: if using the IOMMU interface helps, I don't
see anything wrong with that, but using the iommu based
dma_map_ops seems like it may introduce more problems than
it solves.


 \ /
  Last update: 2017-07-06 15:57    [W:0.049 / U:4.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site