Why is access to V4L2 buffers slower than other memory?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Why is access to V4L2 buffers slower than other memory?

6,111件の閲覧回数
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,701件の閲覧回数
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,701件の閲覧回数
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 件の賞賛
返信