From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0468C10F0E for ; Thu, 18 Apr 2019 09:13:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7019220835 for ; Thu, 18 Apr 2019 09:13:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="B8kgmlY5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388036AbfDRJNU (ORCPT ); Thu, 18 Apr 2019 05:13:20 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:46317 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388000AbfDRJNU (ORCPT ); Thu, 18 Apr 2019 05:13:20 -0400 Received: by mail-ed1-f65.google.com with SMTP id d1so1157881edd.13 for ; Thu, 18 Apr 2019 02:13:19 -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 :content-transfer-encoding:in-reply-to:user-agent; bh=OjUGlAjT4DYAvkg6QLdVvAZHTHbrrjwl7QJ0dcImz98=; b=B8kgmlY5n9tUWDOiNreu2Eg1oJlBQ3EPZgAI3s0iow3UmdEQLra6Bsp+nPtBo1nB2/ JuPxXmc5Igd8SISFP/nl0buLxcXm5NFgQ6jzP8lm+cK1duj085pWm7ioj4y1rvJ+VSRH e9d7R532oDrnxBIdOdZrqQCjzYOAlQVAqmJc8= 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 :content-transfer-encoding:in-reply-to:user-agent; bh=OjUGlAjT4DYAvkg6QLdVvAZHTHbrrjwl7QJ0dcImz98=; b=q5IvZVf/tbV1byoX3kGbtIj2/W5mZwUMPcHp13qHzGcsoUNYiFrXB5aFt4rvwHtd9x zz4Fc1UKiGXwmTB6rhJbkC+VaRAFG0dbnN/T3SkLa6BXe2m4T+x2T37+mdo8Z750Gqjc 9nVZCgpdhtehJY/VRTD+ZovajS/0umkAZNQLS3iHbIxTSU4MbnA1jwlFkFLHEsJGY93d cpmcF2a2SN82aR+y60uwUtM/cqm9NNveecvHTYgQ+4QWLXqzuj16TNWZpa2uby798t0L CEbmqCwE3Kuuh+rT9YubChEbS8lvhsEDaCTgNY82i2r5IZqNK9iPxe1V5Y3F1LaAJtf/ D0FQ== X-Gm-Message-State: APjAAAUbE1dgLhoZSoKSiPS8nnOPZMQxcCNvbQIR+P7G9QAAixssmIM3 v4nmzgo9a7JqQymCqtudxTViwJGpwKo= X-Google-Smtp-Source: APXvYqzd+Pd8rX3m0x97zDCVsH2TW0wHOoEOzfzXh82K2xObGfaqRGKAMLljVzlc5EylaZbnBdkSRQ== X-Received: by 2002:a17:906:1ed7:: with SMTP id m23mr51584158ejj.198.1555578798558; Thu, 18 Apr 2019 02:13:18 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id p1sm283982ejf.40.2019.04.18.02.13.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 02:13:17 -0700 (PDT) Date: Thu, 18 Apr 2019 11:13:15 +0200 From: Daniel Vetter To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: sumit.semwal@linaro.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org Subject: Re: dynamic DMA-buf sharing between devices Message-ID: <20190418091315.GU13337@phenom.ffwll.local> Mail-Followup-To: Christian =?iso-8859-1?Q?K=F6nig?= , sumit.semwal@linaro.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org References: <20190416183841.1577-1-christian.koenig@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190416183841.1577-1-christian.koenig@amd.com> X-Operating-System: Linux phenom 4.19.0-1-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Tue, Apr 16, 2019 at 08:38:29PM +0200, Christian König wrote: > Hi everybody, > > core idea in this patch set is that DMA-buf importers can now provide an optional invalidate callback. Using this callback and the reservation object exporters can now avoid pinning DMA-buf memory for a long time while sharing it between devices. > > I've already send out an older version roughly a year ago, but didn't had time to further look into cleaning this up. > > The last time a major problem was that we would had to fix up all drivers implementing DMA-buf at once. > > Now I avoid this by allowing mappings to be cached in the DMA-buf attachment and so driver can optionally move over to the new interface one by one. > > This is also a prerequisite to my patchset enabling sharing of device memory with DMA-buf. Ok, with the discussions and thinking I think this design is solid and should work out. Bunch of api and documentation polishing still to do, to make sure we have really clear semantics and as little room as possible for misunderstanding - refactoring a mess in dma-buf is a lot more tricky than just ttm, there's a lot more users. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch