Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202838

Re: [PATCH v2] staging: ion: Add a default struct device for cma heap

From Feng Tang <feng.tang@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] staging: ion: Add a default struct device for cma heap
Date 2015-08-07 17:50 +0200
Message-ID <pUS4a-3Sp-19@gated-at.bofh.it> (permalink)
References <pUGPn-4gu-5@gated-at.bofh.it> <pUHV8-5Oo-9@gated-at.bofh.it> <pUJtU-87W-13@gated-at.bofh.it> <pUR86-2r6-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 07, 2015 at 04:48:28PM +0200, Michal Nazarewicz wrote:
> On Fri, Aug 07 2015, Feng Tang wrote:
> > As I described above, the dummy struct device is only needed for
> > dma request, its lifetime is align with the cma_heap itself. 
> 
> Again, this is from perspective of someone who is unfamiliar with ION,
> but perhaps a viable solution is to bypass DMA API and just call
> cma_alloc directly?

For ion cma heap, the buffer allocation func ion_cma_allocate() will
call dma_alloc_coherent(dev, ...). And dma_alloc_coherent() is
implemented by each architeture(arm/m68k/x86 etc), and many Arch's
implementation doesn't use cma, but use alloc_pages() like APIs.
So I'm afraid we can't direcly call cma_alloc directly here.

Thanks,
Feng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] staging: ion: Add a default struct device for cma heap Feng Tang <feng.tang@intel.com> - 2015-08-07 05:50 +0200
  Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-08-07 07:00 +0200
    Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Feng Tang <feng.tang@intel.com> - 2015-08-07 08:40 +0200
      Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Michal Nazarewicz <mina86@mina86.com> - 2015-08-07 16:50 +0200
        Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Feng Tang <feng.tang@intel.com> - 2015-08-07 17:50 +0200
          Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-08-07 20:10 +0200
            Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Laura Abbott <labbott@redhat.com> - 2015-08-08 01:10 +0200
              Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-08-09 00:30 +0200
                Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Feng Tang <feng.tang@intel.com> - 2015-08-09 10:40 +0200
          Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Michal Nazarewicz <mina86@mina86.com> - 2015-08-08 12:50 +0200
            Re: [PATCH v2] staging: ion: Add a default struct device for cma heap Feng Tang <feng.tang@intel.com> - 2015-08-09 11:10 +0200

csiph-web