Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2823918imu; Thu, 29 Nov 2018 10:48:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/XpI2oZ+l1nhCwOymy3hV0HLYrDJ7+bNfhbb0m7geZlsJCQhmh3iq9FdmjB7bj1yYQ6Tbzz X-Received: by 2002:a63:2c0e:: with SMTP id s14mr2237233pgs.132.1543517309167; Thu, 29 Nov 2018 10:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543517309; cv=none; d=google.com; s=arc-20160816; b=sH539Hjc7KdRIZmhRapmCPgZSgG0pC1RGTWEsQTUN0G4gMJOsz7z87k3TYu3Ehrh5b sKjatJxYLiRnORGxWAoAuG8rdppTmsRs3KOjN2gvP/iHJ4UtD0vgZBnzDm14PUIGUSjC wMSJBJwzPsawn98bmgCv98v791K92WakCBB5KFqgArHUihK6Y32827YCa3O5dWExK8Nt 4Gbe+wYN3wSIVdg71wiVEv3YLsjMpsrA5IR6zHERrUAF0EwZh/2Lvet8XgxN2JSH1ZbI dJNRezDZ/qhnptYh9s1THHqMLnzIIWCH6Vp1F/P4RHkbdWStJwG5X2lYhtZVJZkqc8sz JBlg== 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:message-id:subject:cc :to:from:date; bh=cWzDgDqi/rbKj0IzWsiu0xQTezh8ghYuSz77Et6TuwE=; b=Wfxo+1d+Fq+uvr+w773pNgQIBPJq1KbZeDjAY4dCzsojppzbqjFi96Zdu1oVbtzncK 7wVj+Zbl6RKeQR0FUsojZmGFGDPG0a3AG0ZyJQPsbfuQlGUeZ/ZhiZmR64bhuATAJIbF CF5uwyBf439xQK+mqQla8WjxG0tcSGXmkib3Hv8sqy0ueeBV3tXiho81HZ86HVmdZHdc 9szLANvu80u74zLxnzucss1PzhdBtsbS+lDbpTLbmvHwSYqfboBeSrjcEkY94uS4s8+1 jPHzvpFmO1nITqCCC0J7NnUsStyWWlcEYWPYtQEIEnqhqVeQqAngQ2GfmK22m/eUitQq 2ZiA== ARC-Authentication-Results: i=1; mx.google.com; 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 z4si2536153pgl.16.2018.11.29.10.48.13; Thu, 29 Nov 2018 10:48:29 -0800 (PST) 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; 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 S1727229AbeK3FmM (ORCPT + 99 others); Fri, 30 Nov 2018 00:42:12 -0500 Received: from verein.lst.de ([213.95.11.211]:45515 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbeK3FmK (ORCPT ); Fri, 30 Nov 2018 00:42:10 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id B7BB268BDF; Thu, 29 Nov 2018 19:35:50 +0100 (CET) Date: Thu, 29 Nov 2018 19:35:50 +0100 From: Christoph Hellwig To: Brian Starkey Cc: Christoph Hellwig , "Clark, Rob" , Dave Airlie , linux-arm-msm , Linux Kernel Mailing List , dri-devel , Tomasz Figa , Sean Paul , "vivek.gautam@codeaurora.org" , freedreno , Robin Murphy , nd Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg* Message-ID: <20181129183550.GD30281@lst.de> References: <20181129140315.28476-1-vivek.gautam@codeaurora.org> <20181129141429.GA22638@lst.de> <20181129155758.GC26537@lst.de> <20181129162807.GL21184@phenom.ffwll.local> <20181129165715.GA27786@lst.de> <20181129173301.rye77slpy27regi5@DESKTOP-E1NTVVP.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181129173301.rye77slpy27regi5@DESKTOP-E1NTVVP.localdomain> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 05:33:03PM +0000, Brian Starkey wrote: > This sounds very useful for ion, to avoid CPU cache maintenance as > long as the buffer stays in device-land. > > One question though: How would you determine "the last user to unmap" > to know when to do the final "make visible to CPU" step? I'd assume the user of the DMA API keeps track of it. E.g. dmabuf would be a pretty natural layer to implement common logic for this.