How to reset IPU3 CSI0 interface on IMX.6

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

How to reset IPU3 CSI0 interface on IMX.6

845 Views
zohanlin
Contributor IV

Dear all,

I use Android 4.2.2 on iMX.6

I want to reset IPU3 CSI0 interface manually when CPU get an interrupt, 

and I run theses functions as below, but they don't work. 

----------------------------------------------------------------------------------------------------------

ipu_disable_csi(&ipu_bk_0, 0);

ipu_disable_channel(&ipu_bk_0, channel_bk_0, 1);

ipu_uninit_channel( &ipu_bk, // The function would initialize some parameters.
channel_bk);

ipu_csi_set_window_size(cam->ipu, cam->crop_current.width,
cam->crop_current.height, cam->csi);


ipu_csi_set_window_pos(cam->ipu, cam->crop_current.left,
cam->crop_current.top,
cam->csi);


ipu_csi_init_interface(cam->ipu, cam->crop_bounds.width,
cam->crop_bounds.height,
pixelformat_bk1, csi_param_bk1);

ipu_init_channel( &ipu_bk_0,
channel_bk_0,
params_bk_0_test);

ipu_init_channel_buffer( &ipu_bk_0,
channel_bk_0,
type_bk,
pixel_fmt_bk,
width_bk,
height_bk,
stride_bk,
rot_mode_bk,
phyaddr_0_bk,
phyaddr_1_bk,
phyaddr_2_bk,
u_bk,
v_bk);


ipu_enable_channel(&ipu_bk_0, channel_bk_0);

ipu_enable_csi(&ipu_bk_0, 0);//csi=0

----------------------------------------------------------------------------------------------------------

At first, there are video on display, but when I reset IPU3 CSI0 interface, 

there are no video on display and I got the message :

" imx-ipuv3 imx-ipuv3.0: Warning: channel already initialized 15 "

Could anyone tell me what happened?

Thanks for your reply,

zohan

Labels (1)
0 Kudos
3 Replies

552 Views
igorpadykov
NXP Employee
NXP Employee

Hi zohan

one can check examples of reinitializing ipu in splashscreen patches

https://community.freescale.com/docs/DOC-98109

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

552 Views
zohanlin
Contributor IV

Hello igor,

Thanks for your patch.

It seems that the patch would reset all ipu,

but we want to reset CSI only.

Is it possible to reset CSI only? 

Thanks,

zohan

0 Kudos

552 Views
igorpadykov
NXP Employee
NXP Employee

Hi zohan

I am afraid this is not possible

Best regards
igor

0 Kudos