All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Ran Shalit <ranshalit@gmail.com>, linux-media@vger.kernel.org
Subject: Re: CMA usage in driver
Date: Mon, 11 Jan 2016 11:43:53 +0100	[thread overview]
Message-ID: <56938769.308@xs4all.nl> (raw)
In-Reply-To: <CAJ2oMhK7f4kLYaTw874g4w2vjd5nw_FBET1JsjX9Us30Eve5GQ@mail.gmail.com>

On 01/02/2016 10:23 PM, Ran Shalit wrote:
> Hello,
> 
> I made some reading on CMA usage with device driver, nut not quite sure yet.
> Do we need to call dma_declare_contiguous or does it get called from
> within videobuf2 ?
> 
> Is there any example how to use CMA memory in v4l2 driver ?

You don't need to do anything. If the architecture supports cma (ARM does, but I'm
not sure if it is supported for x86_64) and it is enabled in the kernel, then you
have it. All you have to do is to add cma=<memsize> to the kernel options to
reserve CMA memory and when vb2 allocates buffer memory it will automatically use the
CMA memory for it.

Regards,

	Hans


      parent reply	other threads:[~2016-01-11 10:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02 21:23 CMA usage in driver Ran Shalit
2016-01-05  6:56 ` Ran Shalit
2016-01-11 10:43 ` Hans Verkuil [this message]

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=56938769.308@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=ranshalit@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.