VPU memory reservation and debugging with Device Trees

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

VPU memory reservation and debugging with Device Trees

1,778 次查看
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.

标签 (3)
0 项奖励
回复
3 回复数

1,691 次查看
joanxie
NXP TechSupport
NXP TechSupport
0 项奖励
回复

1,691 次查看
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 项奖励
回复

1,691 次查看
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 项奖励
回复