i.MX28 - Use OCRAM (iRAM) for DMA buffer allocation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX28 - Use OCRAM (iRAM) for DMA buffer allocation

1,605 Views
jörg_krause
Contributor III

Hi,

 

ALSA supports using internal RAM (iRAM) for DMA buffer allocation: http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067628.html.

 

As i.MX28 uses the SoC generic DMA engine, this module tries to preallocate buffer from the iRAM: http://lxr.free-electrons.com/source/sound/soc/soc-generic-dmaengine-pcm.c#L294. However, this allocation fails, because it is has not been defined by default in the i.MX28 device tree.

 

I wonder, if it might have some benefits to use the OCRAM for ALSA DMA buffer allocation instead of SDRAM? At least, the OCRAM runs at 200 MHz (connected to the AHB bus). SDRAM can, depending on the DDR chip, run at 133 MHz or 200 MHz, right?

 

I attached two patches to enable iRAM support for ALSA DMA buffer allocation.

 

Any feedback is welcome!

Original Attachment has been moved to: 0001-ARM-dts-imx28-Add-OCRAM-support.patch.zip

Original Attachment has been moved to: 0002-ARM-dts-imx28-Use-iRAM-for-DMA-buffer-allocation.patch.zip

Labels (3)
Tags (5)
5 Replies

879 Views
Yuri
NXP Employee
NXP Employee

Hello,

IRAM has two advantages :

1) it always present and ready - so, may be used for boot ;

2) it may be used in parallel with DRAM for external memory

    bandwidth reduction.

Regards,

Yuri.

0 Kudos

879 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Internal memory of i.MX devices mainly is intended for boot

purposes and here memory performance is not very critical.

Usually DRAM is more preferable because of high throughput,

when using burst accesses.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

879 Views
jörg_krause
Contributor III

Hello Yuri,

is it true only for i.MX28 as for example i.MX27, i.MX53 and i.MX6QDL kernel device trees are using iRAM for their VPU (video processing unit) which does really sound like a lot of burst accesses?

Best regards

Jörg Krause

0 Kudos

879 Views
Yuri
NXP Employee
NXP Employee

Hello,

  You may look at the following discussion regarding OCRAM performance,

which can clarify the issue in general.

i.MX53 i.RAM (OCRAM) seems very slow, test code included. 

Regards,

Yuri.

0 Kudos

879 Views
jörg_krause
Contributor III

I've tested the memio tool and I get a result which is about a fifths of the values the user has measured for i.MX53: ~27k us. This leads to several questions:

1) Why is i.MX53 iRAM is so slow compared to i.MX28? Is it buggy?

2) If iRAM has such a bad performance, why is it still used on i.MX cpus for the VPU in the Linux kernel?

Best regards

Jörg Krause

0 Kudos