Why does eglCreateContext allocate 9MB of video memory?

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

Why does eglCreateContext allocate 9MB of video memory?

Jump to solution
1,311 Views
stephenminutill
Contributor II

On i.MX6Q with Linux BSP 4.1.0 I am seeing 9MB of video memory allocated when eglCreateContext is called.  This is true in my own applications and in the SimpleTriangle example GLES2.0 program.  It is allocated in five 1MB chunks and then one 4MB chunk.  I can see this memory allocation by monitoring calls to gckVIDMEM_AllocateLinear.  What is the purpose of this memory allocation?  Is it possible to reduce or eliminate it?

Labels (3)
1 Solution
954 Views
asim_zaidi
NXP Employee
NXP Employee

I checked with the R & D team and they confirmed gpu-viv-bin-mx6q_4.0.0 will have the problem of using more memory just for creating context.

The latest driver(3.10.53_1.1.0 ) is 5.x based and supposed to take only 3MB.

Please test with the latest 5.x GPU driver

View solution in original post

4 Replies
954 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Please check the board file for the GPU reserved memory?

For example on sabreSD, the following code is used to reserve gpu memory which is limited under 1G address.

Arch/arm/mach-mx6/board-mx6q_sabresd.c

if (imx6q_gpu_pdata.reserved_mem_size) {

phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,

SZ_4K, SZ_1G);

memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);

imx6q_gpu_pdata.reserved_mem_base = phys;

}

FSL have some reserving memory for vpu and gpu in Android. Typically it should be 32M for VPU and 16-32M for gpu.

One thing to note is you have to set the size of pmem_gpu to be any size of order of 2. It should be 1M, 2M, 4M, 8M, 16M, 32M,….


Hope it helps!

0 Kudos
954 Views
stephenminutill
Contributor II

By default on the SabreSD board imx6q_gpu_pdata.reserved_mem_size is 128M.  When using Wayland to run multiple graphical applications, that 9MB per process adds up quickly.  I would like to know what the purpose of the 9MB allocation is, and if it can be reduced?

0 Kudos
954 Views
davebailey
Contributor I

HugoOsornio

Hugo,

Have you seen this issue and are you able to explain this allocation?  We are also see this on our design.

Thanks.

Dave

955 Views
asim_zaidi
NXP Employee
NXP Employee

I checked with the R & D team and they confirmed gpu-viv-bin-mx6q_4.0.0 will have the problem of using more memory just for creating context.

The latest driver(3.10.53_1.1.0 ) is 5.x based and supposed to take only 3MB.

Please test with the latest 5.x GPU driver