* CMA usage in driver
@ 2016-01-02 21:23 Ran Shalit
2016-01-05 6:56 ` Ran Shalit
2016-01-11 10:43 ` Hans Verkuil
0 siblings, 2 replies; 3+ messages in thread
From: Ran Shalit @ 2016-01-02 21:23 UTC (permalink / raw)
To: linux-media
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 ?
Best Regards,
Ran
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: CMA usage in driver
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
1 sibling, 0 replies; 3+ messages in thread
From: Ran Shalit @ 2016-01-05 6:56 UTC (permalink / raw)
To: linux-media
On Sat, Jan 2, 2016 at 11:23 PM, Ran Shalit <ranshalit@gmail.com> 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 ?
>
Hi,
just to make the above question simpler:
from a v4l2 driver perspective, when need large contigious dma
allocations are required,
what should matter, and do we need to use CMA and how ?
Thank you for the time,
Ran
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: CMA usage in driver
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
1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2016-01-11 10:43 UTC (permalink / raw)
To: Ran Shalit, linux-media
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-11 10:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).