On Wed, Sep 14, 2011 at 2:57 AM, Thomas Hellstrom thomas@shipmail.org wrote:
ah, ok, I get your point
It is possible to create a device private CMA pool.. although OTOH it might be desirable to let some other drivers (like v4l2) use buffers from the same pool..
I'm not entirely sure what will happen w/ dma_alloc_coherent, etc, if the global CMA pool is exhausted.
Marek? I guess you know what would happen?
BR, -R
Thanks, Thomas
On Thu, Sep 15, 2011 at 6:53 AM, Rob Clark robdclark@gmail.com wrote:
That's the final goal. memory sharing among multimedia devices (v4l2), display(fimd, hdmi), and 3D (mali). currently mali drivers is tightly coupled with UMP and it's hard to use the CMA. it's need to solve this issue also.
In case of multimedia drivers, it has fixed memory area as scenario and display also has similar restriction. I don't expect DRI request the more memory than CMA pool has.
I'm not entirely sure what will happen w/ dma_alloc_coherent, etc, if the global CMA pool is exhausted.
The primary goal of CMA is guarantee the memory for multimedia. So if other device use the multimedia CMA pool, it should release the used memory. and it's hard to release the memory. it should has display CMA pool and don't share the other multimedia devices CMA pool.
CMA can share the same CMA pool and specify the device usage which CMA pool used.
Marek? I guess you know what would happen?
He will comeback when 21 Sep.
Thank you, Kyungmin Park
Hello,
On Wednesday, September 14, 2011 11:53 PM Rob Clark wrote:
On Wed, Sep 14, 2011 at 2:57 AM, Thomas Hellstrom thomas@shipmail.org wrote:
(snipped)
Creating a device private CMA pool doesn't prevent other drivers to access memory from it if there is a way to pass a buffer to them (i.e. using dma_buf method). However the driver must be able to address that memory. CMA private pools were designed mainly to resolve the problem that some weird hardware can access certain types of buffers only at particular memory address ranges which matches particular memory bank.
The allocation will simply fail and dma_alloc_coherent will return NULL.
Best regards
On Wed, Sep 21, 2011 at 7:41 AM, Marek Szyprowski m.szyprowski@samsung.com wrote:
Ok, so we should probably setup device private pools so that userspace cannot allocate so much buffer memory that dma_alloc_coherent fails for other devices..
This is what I've done so far for omapdrm driver, although it is part of the other patch that adds the platform-device..
Thx
BR, -R
linaro-mm-sig@lists.linaro.org