Accessing camera frame buffer in iMX8M plus kernel.

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

Accessing camera frame buffer in iMX8M plus kernel.

1,061 次查看
koilarulraj
Contributor III

Hi,

We are trying to modify first few bytes of camera frame buffer with custom header data for our use.

We are using Variscite DART-MX8MPLUS kit which is having binaries corresponding to following kernel source.
Git        : https://github.com/varigit/linux-imx.git
Branch : lf-5.10.y_var03

We found that, following two functions are continuously called during streaming.
    i) mxc_isi_cap_frame_write_done function in "drivers/staging/media/imx/imx8-isi-cap.c" &
   ii) vb2_core_dqbuf function in "drivers/media/common/videobuf2/videobuf2-core.c"

And we could get the frame pointer address by adding following codes inside mxc_isi_cap_frame_write_done function.

              void *ptr;
              unsigned int buf_size = 0;

              ptr = (__u32 *)vb2_plane_vaddr(vb2, 0);
              buf_size = vb2_plane_size(vb2, 0);


But if we try to access the memory pointed by ptr using memcpy function, the whole kit blocks and reboots after few seconds.
Could you please guide us on how to access the camera buffer in kernel space properly?

Thanks.

标记 (2)
0 项奖励
回复
1 回复

1,034 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

Please try to refer function mxc_isi_channel_set_m2m_src_addr to get address

0 项奖励
回复