CMA area for I2C client driver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CMA area for I2C client driver

724件の閲覧回数
heinzhjb
Contributor V

I want to allocate memory for a cam driver by function dma_alloc_contiguous() which is using CMA internally.

I declare the cma region for my cam driver in device tree in kernel's cmdline. (cma=a=64M cma_map=mycam=a). The drivers name is "mycam". But this is field isn't set in init_name in device struct neither.

The problem is dma_alloc_contiguous needs struct device's field cma which is NULL when the probe function of mycam is called. Do I have to set this field on my own?

Im using i.MX8mp Kernel 5.10.35

0 件の賞賛
返信
1 返信

684件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @heinzhjb,

I hope you are doing well.

One can refer to the below documents to allocate and debug contiguous memory for the driver.

/Documentation/core-api/dma-api.rst

/Documentation/core-api/dma-api-howto.rst

How to work with reserved CMA memory?

Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛
返信