meta-freescale.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: "Otavio Salvador" <otavio.salvador@ossystems.com.br>
To: Carlos Rafael Giani <crg7475@mailbox.org>
Cc: meta-freescale@lists.yoctoproject.org
Subject: Re: [meta-freescale] Enabling ION with CMA heap on imx6
Date: Tue, 20 Oct 2020 08:31:21 -0300	[thread overview]
Message-ID: <CAP9ODKqf_6Yz8avbhWPdFCNrgNDAM2_6=bpi20d3xN4bDnQzEA@mail.gmail.com> (raw)
In-Reply-To: <1ec795f6-53b7-52c7-f2dc-05c39c2f0d03@mailbox.org>

Hello Carlos,

Em ter., 20 de out. de 2020 às 05:19, Carlos Rafael Giani via
lists.yoctoproject.org <crg7475=mailbox.org@lists.yoctoproject.org>
escreveu:
> On i.MX6 machines, it is currently not possible to use the ION
> allocator. However, there is no hardware limitation that requires ION to
> be disabled.
>
> If ION were enabled, with a CMA heap, then it would be possible for
> userspace to allocate DMA-BUF buffers. I could then enable the ion
> packageconfig in the libimxdmabuffer recipe.
>
> The defconfig only needs these additions:
>
> CONFIG_ION=y
> CONFIG_ION_SYSTEM_HEAP=y
> CONFIG_ION_CMA_HEAP=y
>
> I tried it out, worked fine.
>
> Using DMA-BUF for allocating physically contiguous memory (via CMA) is
> preferable over using other allocators (like the ones from the VPU, IPU
> etc.) since it allows for proper buffer sharing, ownership transfer, is
> based on FDs (though physical address are accessible via an NXP
> extension), and there are extensions in OpenCL, OpenGL etc. for
> importing DMA-BUF. V4L2 also has DMA-BUF support.
>
> Opinions?

Please prepare the PR for it; also see if i.MX8 couldn't also benefit from it.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

  reply	other threads:[~2020-10-20 11:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  8:19 Enabling ION with CMA heap on imx6 Carlos Rafael Giani
2020-10-20 11:31 ` Otavio Salvador [this message]
2020-10-20 17:11   ` [meta-freescale] " Carlos Rafael Giani
2020-10-20 11:38 ` Andrey Zhizhikin
2020-10-20 17:13   ` Carlos Rafael Giani

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='CAP9ODKqf_6Yz8avbhWPdFCNrgNDAM2_6=bpi20d3xN4bDnQzEA@mail.gmail.com' \
    --to=otavio.salvador@ossystems.com.br \
    --cc=crg7475@mailbox.org \
    --cc=meta-freescale@lists.yoctoproject.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;
as well as URLs for NNTP newsgroup(s).