AnsweredAssumed Answered

Is it safe to decrease the memory reserved for v4l2 video output?

Question asked by Robbie Jiang on Nov 1, 2015

We have a customized board (simular to Sabrelite) with MX6Q and 1GB DDR3 DRAM.

The Linux kernel is 3.0.35.

After booting, the 'free' command shows that the total available memory is 769712kB(768MB).

And the 'dmesg' shows:

......

Memory: 512MB 256MB = 768MB total

Memory: 769712k/769712k available, 278864k reserved, 0K highmem

......

 

Obviously,  256MB memory is reserved by kernel.

 

And in kernel code, arch/arm/mach-mx6/board-mx6q_sabrelite.c:

 

static void __init mx6q_sabrelite_reserve(void)

{

     phys_addr_t phys;

#if defined(CONFIG_MXC_GPU_VIV) || defined(CONFIG_MXC_GPU_VIV_MODULE)

 

     if (imx6q_gpu_pdata.reserved_mem_size) {//128MB

         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;

     }

#endif

 

     if (vout_mem.res_msize) {//128MB

         phys = memblock_alloc_base(vout_mem.res_msize,

                        SZ_4K, SZ_1G);

         memblock_remove(phys, vout_mem.res_msize);

         vout_mem.res_mbase = phys;

     }

}

 

 

Here we can see 128MB is reserved for GPU, and 128MB is reserved for v4l2 output.

 

As GPU is not used in my project, so it is safe to release the 128MB memory reserved for GPU.

But I'm not sure if it is safe to release the 128MB reserved memory for v4l2 video output.

Why should such a large memory be reserved for v4l2 video output?

What will happen if setting v4l2 video output reserved memory to 0MB?

Is it safe?

 

Robbie

Outcomes