Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906AbdGFMYO (ORCPT ); Thu, 6 Jul 2017 08:24:14 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33513 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752520AbdGFMYI (ORCPT ); Thu, 6 Jul 2017 08:24:08 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170705071215.17603-1-tfiga@chromium.org> <20170705071215.17603-2-tfiga@chromium.org> <20170705151728.GA2479@lst.de> <20170705172019.GB5246@lst.de> From: Arnd Bergmann Date: Thu, 6 Jul 2017 14:23:57 +0200 X-Google-Sender-Auth: s1uMNiMubPAyxumD1l2Fyypg2KE Message-ID: Subject: Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols To: Tomasz Figa Cc: Christoph Hellwig , "open list:IOMMU DRIVERS" , "linux-kernel@vger.kernel.org" , Marek Szyprowski , Robin Murphy , Greg Kroah-Hartman , Joerg Roedel , Will Deacon , Vineet Gupta , Hans-Christian Noren Egtvedt , Mitchel Humpherys , Krzysztof Kozlowski , Hans Verkuil , Sakari Ailus , Pawel Osciak , Laurent Pinchart , Linux Media Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1210 Lines: 26 On Thu, Jul 6, 2017 at 10:36 AM, Tomasz Figa wrote: > On Thu, Jul 6, 2017 at 5:34 PM, Tomasz Figa wrote: >> On Thu, Jul 6, 2017 at 5:26 PM, Arnd Bergmann wrote: >>> On Thu, Jul 6, 2017 at 3:44 AM, Tomasz Figa wrote: >> >> I'd say that this is something that has been consistently tried to be >> avoided by V4L2 and that's why it's so tightly integrated with DMA >> mapping. 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. > > 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? Arnd