Received: by 10.192.165.148 with SMTP id m20csp374764imm; Wed, 25 Apr 2018 00:32:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/VGEprUR7tyaqFv1aGOEX0XmNBXaR/p2IIHLCwRIifavJA0TLlXaxuaC9kNd0gm+zRxLmg X-Received: by 10.99.97.150 with SMTP id v144mr23353566pgb.264.1524641530211; Wed, 25 Apr 2018 00:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524641530; cv=none; d=google.com; s=arc-20160816; b=yJ1mDTpfq+sBkG4ow7pCMfY1w9Z+iBFpQtOARjC+Zg8Y1HI+uD+RlgKTFlsWyy4R+Z zL/Uh+kQekl7Gb+r1sYKUouqqHoaksXRHbWSDLWuOKkLRoLDI4tQe3ov1qCos9oF37RM XC0kL8JSrdyZVgjDaL2ayjek/9z06lBAqq0j4Qvv953ZnqKeSDO34m/R4QwTr3t/jhso stLFj90fOn/8T+SiLVKhu9eFMrgqUvOk3+kvjqR+TzpTr1nuFwyuh3tvJUP2+SY6FSTB AyZfYF6BE8A0i4wQ+Hvb7b1Pgyd2wfl0CxMVva36//AdAhsks1tFVyuS5FY+sbPkAdWo f1Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=ORm/dweRP+0ATmZY62Vxdu1GlLH3y4caYF3wgGJ4Noo=; b=Sce39RqPjKJAB5OdoxFQH7H/vJTUR2n9a750LUhAPvvA8DIo1m7Ph5N9LDcZ8Ofw6v HyPXfz3Z5KtNvWnVFFxPRHZa+qJ4OJZyh2W78zmVRvfgX4AI3SIg6WnRSP1zOV36Cdyb NDi8bnl3HHJ3wNBa/COyl4uFxEo1RVamug1AXDISrySdAVlDLO7P55npannJUKD/u9R9 dh2dHRKj9Ur6jivvFaWdS4WKxyG/RxP0rHXkmgcR/AYY2FbuktRiMIeehKROLR+Srk76 w0CE2nYgsaJ86bixv9ftfBoURbe96C/u7rC06RPBFDyc/Xtxils99OuUxu8jPqHw+CMe FGaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=ZK8snEeD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22-v6si16741412plj.595.2018.04.25.00.31.55; Wed, 25 Apr 2018 00:32:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=ZK8snEeD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308AbeDYHas (ORCPT + 99 others); Wed, 25 Apr 2018 03:30:48 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:55712 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbeDYHan (ORCPT ); Wed, 25 Apr 2018 03:30:43 -0400 Received: by mail-wm0-f46.google.com with SMTP id a8so5370218wmg.5 for ; Wed, 25 Apr 2018 00:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ORm/dweRP+0ATmZY62Vxdu1GlLH3y4caYF3wgGJ4Noo=; b=ZK8snEeDW3z5gfZ11hST3KhMx0CDzZP4qtT34IAqxHmzJeo1zprwvEx1yjVXO3BDln mi+LTepOgADEU0NTjAvjHZoOR6+nP6uTGarKIgUr0hnMn/Ixgq0IjFvfOn8BLjzslTEx sWHhdWGwJQEeSdXh9o/5K7+Y7OlJiHb1yqG4E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=ORm/dweRP+0ATmZY62Vxdu1GlLH3y4caYF3wgGJ4Noo=; b=GUnguO03/lKgC/nbwq/rrJ53rG9IkSFUJ8K/g3zpg3w6gtbl+1kevgT2iC2Zm+wCvH I72EwMW6BEOOajpKOGTCuyDQgH55frItB40glpqitlJI2kV45VukixRU/g9n95UGvY/N QI0PuuZ9vk/r/GVzHp4vFMmmE+/3GsYUhV0arK03Pe/VxE4EsfdxwP8BMr1/WuXZ65L7 +8Mh3ASJCkhSv0IN/91UM286+dmr6z8YTypQUbiMLFANSB5q3ZNRlzwa8O35GAUPSVs9 yYnloxDeLo8xqlRvHxgtkYK9teygx5X8hm1RvoKJSkosnb4oUpPP1AxHYSp8CDjjmCz6 bCxw== X-Gm-Message-State: ALQs6tDTeHFHcRQU8TNs/8xpE9pRYfdZKq9rEgxSz8LKlj99nmL8cpmK iJLOI/J1ztpBSutDMFzaf8rSSQ== X-Received: by 10.80.158.141 with SMTP id a13mr31149322edf.78.1524641442267; Wed, 25 Apr 2018 00:30:42 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id o47sm840612edc.95.2018.04.25.00.30.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Apr 2018 00:30:41 -0700 (PDT) Date: Wed, 25 Apr 2018 09:30:39 +0200 From: Daniel Vetter To: Christoph Hellwig Cc: Daniel Vetter , Christian =?iso-8859-1?Q?K=F6nig?= , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Linux Kernel Mailing List , amd-gfx list , Jerome Glisse , dri-devel , Dan Williams , Logan Gunthorpe , "open list:DMA BUFFER SHARING FRAMEWORK" , Thierry Reding Subject: Re: [Linaro-mm-sig] [PATCH 4/8] dma-buf: add peer2peer flag Message-ID: <20180425073039.GO25142@phenom.ffwll.local> Mail-Followup-To: Christoph Hellwig , Christian =?iso-8859-1?Q?K=F6nig?= , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Linux Kernel Mailing List , amd-gfx list , Jerome Glisse , dri-devel , Dan Williams , Logan Gunthorpe , "open list:DMA BUFFER SHARING FRAMEWORK" , Thierry Reding References: <20180420124625.GA31078@infradead.org> <20180420152111.GR31310@phenom.ffwll.local> <20180424184847.GA3247@infradead.org> <20180425054855.GA17038@infradead.org> <20180425064335.GB28100@infradead.org> <20180425070905.GA24827@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180425070905.GA24827@infradead.org> X-Operating-System: Linux phenom 4.15.0-1-amd64 User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 25, 2018 at 12:09:05AM -0700, Christoph Hellwig wrote: > On Wed, Apr 25, 2018 at 09:02:17AM +0200, Daniel Vetter wrote: > > Can we please not nack everything right away? Doesn't really motivate > > me to show you all the various things we're doing in gpu to make the > > dma layer work for us. That kind of noodling around in lower levels to > > get them to do what we want is absolutely par-for-course for gpu > > drivers. If you just nack everything I point you at for illustrative > > purposes, then I can't show you stuff anymore. > > No, it's not. No driver (and that includes the magic GPUs) has > any business messing with dma ops directly. > > A GPU driver imght have a very valid reason to disable the IOMMU, > but the code to do so needs to be at least in the arch code, maybe > in the dma-mapping/iommu code, not in the driver. > > As a first step to get the discussion started we'll simply need > to move the code Thierry wrote into a helper in arch/arm and that > alone would be a massive improvement. I'm not even talking about > minor details like actually using arm_get_dma_map_ops instead > of duplicating it. > > And doing this basic trivial work really helps to get this whole > mess under control. Ah ok. It did sound a bit like a much more cathegorical NAK than an "ack in principle, but we need to shuffle the implementation into the right place first". In the past we generally got a principled NAK on anything funny we've been doing with the dma api, and the dma api maintainer steaming off telling us we're incompetent idiots. I guess I've been branded a bit on this topic :-/ Really great that this is changing now. On the patch itself: It might not be the right thing in all cases, since for certain compression formats the nv gpu wants larger pages (easy to allocate from vram, not so easy from main memory), so might need the iommu still. But currently that's not implemented: https://www.spinics.net/lists/dri-devel/msg173932.html Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch