Why is access to V4L2 buffers slower than other memory?

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

Why is access to V4L2 buffers slower than other memory?

6,112 次查看
Philip_FSL
Contributor IV

The reason for this is that the memory that the HW blocks like IPU and VPU must be non-cached.  As a result, the CPU operations are very slow versus similar operations using cached memory areas.  One way that you could get around this would be to allocate the memory as cached and then be sure to use cache maintenance routines to ensure coherency.  

0 项奖励
回复
2 回复数

4,702 次查看
joëlesponde
Contributor III

Hi,

Here is an example of kernel driver that helps user space applications allocate cached buffers ready to use with V4L2 API (V4L2_MEMORY_USERPTR):

GitHub - ikwzm/udmabuf: User space mappable dma buffer device driver for Linux. 

Regards,

0 项奖励
回复

4,702 次查看
erezsteinberg
Contributor IV

Hi Philips,

Working on iMX6DL (Linux 3.14.28), I am try to pass user-space buffers to V4L2 for capture from a MIPI sensor (V4L2_BUFFER_USERPTR).

However, I am not able to get any video using this method (with MMAP buffers it works fine).

I started a another thread about this - V4L2_MEMORY_USERPTR Support

Do you have any suggestions?

Any other method except USERPTR ?

Regards,

Erez

0 项奖励
回复