Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5334396ybg; Tue, 22 Oct 2019 01:24:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR5K75RXRAcWuWAl6NUTp6/uRyBbK6JwGaBRPIKI6SjtVRpwnB0YobxUvd54XpvrL5otw3 X-Received: by 2002:aa7:d145:: with SMTP id r5mr29118171edo.275.1571732672847; Tue, 22 Oct 2019 01:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571732672; cv=none; d=google.com; s=arc-20160816; b=kx5sViWk/bn5Xe4Z1UVq7OhymmWqwx449hpwVaoAdB2LJr6klOzXiDv3KlLASleAWa yALPREwK8Fpn5n/0FryNJ+8WocpxqzXYZDbANH2sN8C8Lndl+8VLJmKnYwNrWfEHOjh5 Lu39cEdMMEWkJXSlN/XIbOfGcnec/eIsuQgXL4wTrt7wpokEaeV8ebqfX+bHDGoq1cGS zeGARsdrZl2mI37Jhb+/tuFn5iyI8swde+Ud1iefKySCY34hLMAP/pAIUPZDx15f5Mdm PsVou7MFjidmwIA58V76+WDLZNq0lF2d8+p8B7McYyIJYxW2I68sFR3I1lCNnwLsasLT 7SFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject:dkim-signature; bh=OhWXqjZFGul0Y9WPl0eKMSzqvJtHpXLtVgm8/UlIeMU=; b=fIVyG8MaFpgDrd+f8klrao9MHzftUM4nJFU3fpqsKyYa4k8nffXD5h88l3gbNvXM6x 6mpEnGkRPfwMOU/JYPV7G3K8IMgT3sS5njgynIgiptlDlsGSJfJe+H5IP3PTVajMovqE l/UEUsKyOjMrMV3e2toUgaPfhqV+lTpIHIDuY2Rxr0SNctpWckxrOhYbdd7V6zZ/Mg4j RJLPH1DeZFJagV/6zMieZZPtH1oE1gBwBpidhxiDTJfmEYD62Zf6JTEpUorHJMhMcLl3 VOiijlDXtajIRMDkpoGNj5J3WqFltcKxbxKYUZBbBQyVGzECmztDzZH8amNwHPiUmnUZ vaOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JYgsbWzs; 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 qp23si3229973ejb.185.2019.10.22.01.24.08; Tue, 22 Oct 2019 01:24:32 -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=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JYgsbWzs; 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 S2388341AbfJVIVX (ORCPT + 99 others); Tue, 22 Oct 2019 04:21:23 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53363 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388011AbfJVIVX (ORCPT ); Tue, 22 Oct 2019 04:21:23 -0400 Received: by mail-wm1-f68.google.com with SMTP id i13so828435wmd.3 for ; Tue, 22 Oct 2019 01:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=OhWXqjZFGul0Y9WPl0eKMSzqvJtHpXLtVgm8/UlIeMU=; b=JYgsbWzsO3Mnj941evHc34tBW1YqqvGdSM0WY5THKUaHvid+Q+Tjh5KXE2e/b6Y3cv 1zBQoqtdDJppxBbFpRZBUgaMO0Yj50p2TpiSSmtaA8AjRrjnchftCv5RkrapFqmf4YNn O4cVXQVtAw4yrN/cUVEPJGkRSRXuj4q6Ps0QsW77956gaN7wcsonJPOxImQUNZjdvPIS 5a7js7NDLLOeZtjEDGXgPGsDQK7IzMvzwDBavkQDm82Et1x0gR+hUoWLwdyTBKMew8xD 6LwmicTi5YH07ifV3+v0Gxelu2zwb3afWmI1OqwnIJbfYCfx2c68ZkAaqxUPu7Jz1Ord LpcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=OhWXqjZFGul0Y9WPl0eKMSzqvJtHpXLtVgm8/UlIeMU=; b=WCyU4HILQlHMtcaiIfYEtPk3NYhbj0oCVua4kZU2JdepNADftSOdEjhc1dYWK+t2Ri Ahx9p6+ouiKSRiPp6DMMr4x8aZ9YIIx6xsYWZMtRKKJEyt3XvXC6gHEk0grxSj2TNlTS RF4aiz7bd5juGSrzGnVZfivgs/tHVMqQod1F+qjUScnSFvPlb+4ygK/Z8yt3ynLg1Idt /BtX0L/em3yap2Ap8zYTLN/cdbRkXVCpzJ1h/WoiMFIF2CxElm3qHNViEQUcgqmydIbg 1Z9iWfMek/a4C2BTkNgwsWXRlpxrSsxH4PqAt/0JEG8UHZr5akiKp3fhHWwV/tfMRRBn 1tNQ== X-Gm-Message-State: APjAAAWYYIyV4jTVxloThYSoDoqvQjztXYIvkuW1iWKjGeeFrtEotZpc T0onGSjge7YJNKSa+0EcEwhiSg== X-Received: by 2002:a1c:610b:: with SMTP id v11mr1787475wmb.156.1571732480604; Tue, 22 Oct 2019 01:21:20 -0700 (PDT) Received: from [10.1.2.12] (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id t10sm21265329wrw.23.2019.10.22.01.21.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Oct 2019 01:21:20 -0700 (PDT) Subject: Re: [PATCH v13 0/5] DMA-BUF Heaps (destaging ION) To: John Stultz , lkml Cc: Hillf Danton , Sudipto Paul , Vincent Donnefort , Chenbo Feng , Alistair Strachan , Liam Mark , Christoph Hellwig , dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Hridya Valsaraju , Pratik Patel References: <20191021190310.85221-1-john.stultz@linaro.org> From: Neil Armstrong Openpgp: preference=signencrypt Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= mQENBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAG0KE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheWxpYnJlLmNvbT6JATsEEwEKACUC GyMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJXDO2CAhkBAAoJEBaat7Gkz/iubGIH/iyk RqvgB62oKOFlgOTYCMkYpm2aAOZZLf6VKHKc7DoVwuUkjHfIRXdslbrxi4pk5VKU6ZP9AKsN NtMZntB8WrBTtkAZfZbTF7850uwd3eU5cN/7N1Q6g0JQihE7w4GlIkEpQ8vwSg5W7h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YLSHfFXywdlbGrY9+TqiJ+ZVW4trmui NIJCOku8SYansq34QzYM0x3UFRwff+45zNBEVzctSnremg1mVgrzOfXU8rt+4N1b2MxorPF8 619aCwVP7U16qNSBaqiAJr4e5SNEnoAq18+1Gp8QsFG0ARY8xp+qaKBByWES7lRi3QbqAKZf yOHS6gmYo9gBmuAhc65/VtHMJtxwjpUeN4Bcs9HUpDMDVHdfeRa73wM+wY5potfQ5zkSp0Jp bxnv/cRBH6+c43stTffprd//4Hgz+nJcCgZKtCYIAPkUxABC85ID2CidzbraErVACmRoizhT KR2OiqSLW2x4xdmSiFNcIWkWJB6Qdri0Fzs2dHe8etD1HYaht1ZhZ810s7QOL7JwypO8dscN KTEkyoTGn6cWj0CX+PeP4xp8AR8ot4d0BhtUY34UPzjE1/xyrQFAdnLd0PP4wXxdIUuRs0+n WLY9Aou/vC1LAdlaGsoTVzJ2gX4fkKQIWhX0WVk41BSFeDKQ3RQ2pnuzwedLO94Bf6X0G48O VsbXrP9BZ6snXyHfebPnno/te5XRqZTL9aJOytB/1iUna+1MAwBxGFPvqeEUUyT+gx1l3Acl ZaTUOEkgIor5losDrePdPgE= Organization: Baylibre Message-ID: Date: Tue, 22 Oct 2019 10:21:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191021190310.85221-1-john.stultz@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On 21/10/2019 21:03, John Stultz wrote: > Lucky number 13! :) > > Last week in v12 I had re-added some symbol exports to support > later patches I have pending to enable loading heaps from > modules. He reminded me that back around v3 (its been awhile!) I > had removed those exports due to concerns about the fact that we > don't support module removal. > > So I'm respinning the patches, removing the exports again. I'll > submit a patch to re-add them in a later series enabling moduels > which can be reviewed indepently. > > With that done, lets get on to the boilerplate! > > The patchset implements per-heap devices which can be opened > directly and then an ioctl is used to allocate a dmabuf from the > heap. > > The interface is similar, but much simpler then IONs, only > providing an ALLOC ioctl. > > Also, I've provided relatively simple system and cma heaps. > > I've booted and tested these patches with AOSP on the HiKey960 > using the kernel tree here: > https://git.linaro.org/people/john.stultz/android-dev.git/log/?h=dev/dma-buf-heap Do you have a 4.19 tree with the changes ? I tried but the xarray idr replacement is missing... so I can't test with our android-amlogic-bmeson-4.19 tree. If you can provide, I'll be happy to test the serie and the gralloc changes. Neil > > And the userspace changes here: > https://android-review.googlesource.com/c/device/linaro/hikey/+/909436 > > Compared to ION, this patchset is missing the system-contig, > carveout and chunk heaps, as I don't have a device that uses > those, so I'm unable to do much useful validation there. > Additionally we have no upstream users of chunk or carveout, > and the system-contig has been deprecated in the common/andoid-* > kernels, so this should be ok. > > I've also removed the stats accounting, since any such > accounting should be implemented by dma-buf core or the heaps > themselves. > > New in v13: > * Re-remove symbol exports, per discussion with Brian. I'll > resubmit these separately in a later patch so they can be > independently reviewed > > thanks > -john > > Cc: Laura Abbott > Cc: Benjamin Gaignard > Cc: Sumit Semwal > Cc: Liam Mark > Cc: Pratik Patel > Cc: Brian Starkey > Cc: Vincent Donnefort > Cc: Sudipto Paul > Cc: Andrew F. Davis > Cc: Christoph Hellwig > Cc: Chenbo Feng > Cc: Alistair Strachan > Cc: Hridya Valsaraju > Cc: Hillf Danton > Cc: dri-devel@lists.freedesktop.org > > > > Andrew F. Davis (1): > dma-buf: Add dma-buf heaps framework > > John Stultz (4): > dma-buf: heaps: Add heap helpers > dma-buf: heaps: Add system heap to dmabuf heaps > dma-buf: heaps: Add CMA heap to dmabuf heaps > kselftests: Add dma-heap test > > MAINTAINERS | 18 ++ > drivers/dma-buf/Kconfig | 11 + > drivers/dma-buf/Makefile | 2 + > drivers/dma-buf/dma-heap.c | 269 ++++++++++++++++++ > drivers/dma-buf/heaps/Kconfig | 14 + > drivers/dma-buf/heaps/Makefile | 4 + > drivers/dma-buf/heaps/cma_heap.c | 178 ++++++++++++ > drivers/dma-buf/heaps/heap-helpers.c | 268 +++++++++++++++++ > drivers/dma-buf/heaps/heap-helpers.h | 55 ++++ > drivers/dma-buf/heaps/system_heap.c | 124 ++++++++ > include/linux/dma-heap.h | 59 ++++ > include/uapi/linux/dma-heap.h | 55 ++++ > tools/testing/selftests/dmabuf-heaps/Makefile | 9 + > .../selftests/dmabuf-heaps/dmabuf-heap.c | 238 ++++++++++++++++ > 14 files changed, 1304 insertions(+) > create mode 100644 drivers/dma-buf/dma-heap.c > create mode 100644 drivers/dma-buf/heaps/Kconfig > create mode 100644 drivers/dma-buf/heaps/Makefile > create mode 100644 drivers/dma-buf/heaps/cma_heap.c > create mode 100644 drivers/dma-buf/heaps/heap-helpers.c > create mode 100644 drivers/dma-buf/heaps/heap-helpers.h > create mode 100644 drivers/dma-buf/heaps/system_heap.c > create mode 100644 include/linux/dma-heap.h > create mode 100644 include/uapi/linux/dma-heap.h > create mode 100644 tools/testing/selftests/dmabuf-heaps/Makefile > create mode 100644 tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c >