Android 5.0 lollipop: How Highmem & reserved GPU mem is taken care in latest kernel 3.10+

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

Android 5.0 lollipop: How Highmem & reserved GPU mem is taken care in latest kernel 3.10+

1,019 次查看
amitfsl0
Contributor I

Hello All,

How Highmem & reserved GPU mem is taken care in latest kernel 3.10+

I am trying to port FSL android lollipop version on our imx6s custom board.

In boot params when we provide vmalloc= 400M, no change in high mem is observed ?

Also the GPU mem should be reserved (256-384M), but when we captured the memfinfo total ram space is available.

On Android 4.3 jelly bean which has linux kernel 3.0.35 the behavior was as expected

i.e. 400M goes to High mem

& 256M at the end of ram memory was reserved for GPU.

Can anyone explain How these two thing have been taken care in latest 3.10+ kernel.

With regards,

Amit

标签 (6)
0 项奖励
1 回复

395 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi amit,

The reserved GPU memory is from memblock in Linux 3.0.35 and 3.10.xx kernels, The size can be changed through UBoot argument by "gpumem=xxxM" on BSP.

The memory allocation is very fast, but cannot support cacheable, the attribute Virtual kernel memory layout is: vector : 0xffff0000 - 0xffff1000 ( 4 kB)

DMA : 0xf4600000 - 0xffe00000 ( 184 MB)

vmalloc : 0xea800000 - 0xf2000000 ( 120 MB)

modules : 0x7f000000 - 0x7fe00000 ( 14 MB)

The structures for the display do not change the DMA GPU memory allocation it is used for IPU and VPU mem.

In the Linux 3.10.y kernel, the memory is reserved from CMA implemented in the GPU kernel driver, the size can be changed through U-Boot args with "galcore.contiguoussize =xxx"

The memory allocation and lock very fast, but cannot support cacheable attribute

The contiguous memory is from CMA or Normal or Highmem with alloc_pages_exact. The GPU driver tries the CMA allocator for non-cacheable request first. If CMA memory is used up, it goes to system allocator

For Virtual memory pool. The contiguous memory is from Normal or Highmem with multiple page_alloc.

Hope this helps

0 项奖励