imx8mp kernel 6.6 dma_heap rename of linux,cma to reserved

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

imx8mp kernel 6.6 dma_heap rename of linux,cma to reserved

1,967件の閲覧回数
MicMoba
Contributor V

After switching from Kernel 5.15.52 to Kernel 6.6 I recognized that the devices

/dev/dma_heap/linux,cma and /dev/dma_heap/linux,cma-uncached were renamed to /dev/dma_heap/reserved and /dev/dma_heap/reserved-uncached

Why? Where can I change this back?

ラベル(3)
0 件の賞賛
返信
2 返答(返信)

1,948件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

That is part of the Torvalds kernel works don't know why but the CMA works.

Regards

0 件の賞賛
返信

1,942件の閲覧回数
MicMoba
Contributor V

I found the reason for the renaming. If the kernel config CONFIG_CMA_SIZE_MBYTES is below the

given size of linux,cma item in the devicetree the new kernel rename the device to "reserved".
 
In my case the kernel config was:

 

CONFIG_CMA_SIZE_MBYTES=320

 

 
The devicetree (imx8mp.dtsi):

 

resmem: reserved-memory {
   #address-cells = <2>;
   #size-cells = <2>;
   ranges;

   ocram: ocram@900000 {
      no-map;
      reg = <0 0x900000 0 0x70000>;
   };

/*
*    Memory reserved for optee usage. Please do not use.
*    This will be automaticky added to dtb if OP-TEE is installed.
*    optee@56000000 {
*       reg = <0 0x56000000 0 0x2000000>;
*       no-map;
*    };
*/
   /* global autoconfigured region for contiguous allocations */
   linux,cma {
      compatible = "shared-dma-pool";
      reusable;
      size = <0 0x3C000000>;
      alloc-ranges = <0 0x40000000 0 0xC0000000>;
      linux,cma-default;
   };
...

 

0x3C000000 is 960MiB. So it was over the 320MiB from the kernel configuration. After I changed the size to 0x14000000 the device names in /dev/dma_heap were as expect with linux,cma and linux,cma-uncached.