From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>,
"Andrew F . Davis" <afd@ti.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Liam Mark <lmark@codeaurora.org>,
Laura Abbott <labbott@redhat.com>,
Brian Starkey <Brian.Starkey@arm.com>,
Christian Koenig <christian.koenig@amd.com>,
linux-media@vger.kernel.org,
dri-devel <dri-devel@lists.freedesktop.org>,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@lists.linaro.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dma-buf: heaps: Introduce dma_heap_add_cma() for non-default CMA heap
Date: Fri, 31 Jul 2020 18:32:41 +0900 [thread overview]
Message-ID: <eacfc713-e98a-78fa-b316-3943600813d0@socionext.com> (raw)
In-Reply-To: <CALAqxLXuJQOCXcpyWwyBFZGFK_dEgG0edEEf2=vOpAw6Ng8mBQ@mail.gmail.com>
Hi John,
Thank you for your comment.
On 2020/07/29 4:17, John Stultz wrote:
> On Thu, Jul 16, 2020 at 6:10 PM Kunihiko Hayashi
> <hayashi.kunihiko@socionext.com> wrote:
>>
>> Current dma-buf heaps can handle only default CMA. This introduces
>> dma_heap_add_cma() function to attach CMA heaps that belongs to a device.
>>
>> At first, the driver calls of_reserved_mem_device_init() to set
>> memory-region property associated with reserved-memory defined as CMA
>> to the device. And when the driver calls this dma_heap_add_cma(),
>> the CMA will be added to dma-buf heaps.
>>
>> For example, prepare CMA node named "linux,cma@10000000" and
>> specify the node for memory-region property. After the above calls
>> in the driver, a device file "/dev/dma_heap/linux,cma@10000000"
>> associated with the CMA become available as dma-buf heaps.
>>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>> ---
>> drivers/dma-buf/heaps/cma_heap.c | 12 ++++++++++++
>> include/linux/dma-heap.h | 9 +++++++++
>> 2 files changed, 21 insertions(+)
>
> Hey! Sorry for the slow response on this! I just realized I never replied!
I waited but no problem.
>
>> diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c
>> index 626cf7f..5d2442e 100644
>> --- a/drivers/dma-buf/heaps/cma_heap.c
>> +++ b/drivers/dma-buf/heaps/cma_heap.c
[snip]
>> --
>> 2.7.4
>
> Looks sane to me. Being able to expose different multiple CMA heaps
> is needed, and I agree this way (as opposed to my earlier dts
> appraoch) is probably the best approach. The only bit I'm so-so on is
> adding the CMA heap specific call in the dma-heap.h, but at the same
> time I can't justify adding a whole new header for a single function.
I'm also a little worried about whether "CMA specific" call is in
the dma-heap.h, however I can't find another solution.
> Do you have a upstream driver that you plan to make use this new call?
Unfortunately I don't have an upstream driver using this call.
This call is called from dma-buf heaps "importer" or "customer",
and I only made an example (do nothing) importer driver
to test the call.
> We want to have in-tree users of code added.
I think this is a generic way to use non-default CMA heaps, however,
we need in-tree "importer" drivers to want to use non-default CMA heaps.
I don't find it from now.
> But if so, feel free to add my:
> Acked-by: John Stultz <john.stultz@linaro.org>
> To this patch when you submit the driver changes.
Thank you,
---
Best Regards
Kunihiko Hayashi
next prev parent reply other threads:[~2020-07-31 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 1:10 Kunihiko Hayashi
2020-07-28 19:17 ` John Stultz
2020-07-31 9:32 ` Kunihiko Hayashi [this message]
2020-07-31 19:38 ` John Stultz
2020-08-21 9:14 ` Kunihiko Hayashi
2020-08-21 18:32 ` John Stultz
2020-08-25 11:09 ` Kunihiko Hayashi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eacfc713-e98a-78fa-b316-3943600813d0@socionext.com \
--to=hayashi.kunihiko@socionext.com \
--cc=Brian.Starkey@arm.com \
--cc=afd@ti.com \
--cc=benjamin.gaignard@linaro.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=john.stultz@linaro.org \
--cc=labbott@redhat.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lmark@codeaurora.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®