VPU memory reservation and debugging with Device Trees

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

VPU memory reservation and debugging with Device Trees

734 Views
erlend_eriksen
Contributor III

Are there any examples on how to configure how much memory is available / reserved for VPU and GPU, and what address range they use, using device tree files? I know that you can use the CONFIG_CMA_SIZE_MBYTES option in the kernel configuration, but as I understand it, the device tree would give finer control over contiguous memory allocation.

The root of the problem is that I want to be able to debug the memory allocation better. I know that I can do real time 30 FPS FHD transcoding on my i.MX6, but memory hungry processes make the VPU lag behind. I want not only to reserve memory for the VPU, but also to debug whether it actually gets access to all the memory I reserve, or if it gets used by other processes on the arm cores.

Labels (3)
0 Kudos
3 Replies

647 Views
joanxie
NXP TechSupport
NXP TechSupport
0 Kudos

647 Views
erlend_eriksen
Contributor III

Thank you for your answer Joan.

I'm apparantly unauthorized to view your first link.

The second seems interesting, but I couldn't see any mention of device trees. The post is old, so maybe this was before device trees were introduced. They refer to patches that should probably be implemented with device trees today. Not sure how though. They also use an outdated VPU wrapper for gstreamer. The new one is called gstreamer-imx: GitHub - Freescale/gstreamer-imx: GStreamer 1.0 plugins for i.MX platforms .

0 Kudos

647 Views
joanxie
NXP TechSupport
NXP TechSupport

if you need to know how to set this memory in the kernel, you can refer to the board dtsi file, for example, imx6q board, you can find the imx6q.dtsi:

reserved-memory {   
#address-cells = <1>;   
#size-cells = <1>;   
ranges;    
/* global autoconfigured region for contiguous allocations */   
linux,cma {    
compatible = "shared-dma-pool";    
reusable;    
size = <0x14000000>;    
linux,cma-default;   
};  
};
I got information about gpu settings: ”some continuous memory reserved for GPU, and the size can be changed rhrouhg u-boot arguments with "glacore.contiguousize=xxx" This memory can be accesses fast and cannot support cacheable attribute.“ for more detailed information about gpu memory, pls refer to the chapter Chapter 14 GPU Memory Introduction of i.MX Graphics User’s Guide
0 Kudos