int frame_inval; /* ddl@rock-chips.com : The first frames is invalidate */
unsigned int irq;
unsigned int fps;
+ unsigned int last_fps;
unsigned int pixfmt;
//for ipp
unsigned int vipmem_phybase;
/* ddl@rock-chips.com: sensor init code transmit in here after open */
if (pcdev->icd_init == 0) {
- v4l2_subdev_call(sd,core, init, 0);
+ v4l2_subdev_call(sd,core, init, 0);
pcdev->icd_init = 1;
}
stream_on = read_cif_reg(pcdev->base,CIF_CIF_CTRL);
mf.colorspace = pix->colorspace;
mf.code = xlate->code;
ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf);
-
if (mf.code != xlate->code)
return -EINVAL;
#ifdef CONFIG_VIDEO_RK29_WORK_IPP
unsigned long flags = 0;
sd = soc_camera_to_subdev(pcdev->icd);
tmp_soc_cam_link = to_soc_camera_link(pcdev->icd);
+ // return;
//dump regs
{
RKCAMERA_DG("CIF_CIF_CTRL = 0x%x\n",read_cif_reg(pcdev->base,CIF_CIF_CTRL));
struct rk_camera_timer *fps_timer = container_of(timer, struct rk_camera_timer, timer);
struct rk_camera_dev *pcdev = fps_timer->pcdev;
int rec_flag,i;
- static unsigned int last_fps = 0;
+ // static unsigned int last_fps = 0;
struct soc_camera_link *tmp_soc_cam_link;
tmp_soc_cam_link = to_soc_camera_link(pcdev->icd);
RKCAMERA_DG("rk_camera_fps_func fps:0x%x\n",pcdev->fps);
- if ((pcdev->fps < 2) || (last_fps == pcdev->fps)) {
- RKCAMERA_TR("Camera host haven't recevie data from sensor,Reinit sensor delay!\n");
+ if ((pcdev->fps < 2) || (pcdev->last_fps == pcdev->fps)) {
+ RKCAMERA_TR("Camera host haven't recevie data from sensor,Reinit sensor delay,last fps = %d!\n",pcdev->last_fps);
pcdev->camera_reinit_work.pcdev = pcdev;
//INIT_WORK(&(pcdev->camera_reinit_work.work), rk_camera_reinit_work);
queue_work(pcdev->camera_wq,&(pcdev->camera_reinit_work.work));
}
}
}
- last_fps = pcdev->fps ;
+ pcdev->last_fps = pcdev->fps ;
pcdev->fps_timer.timer.node.expires= ktime_add_us(pcdev->fps_timer.timer.node.expires, ktime_to_us(ktime_set(1, 0)));
//return HRTIMER_NORESTART;
return HRTIMER_RESTART;
cif_ctrl_val = read_cif_reg(pcdev->base,CIF_CIF_CTRL);
if (enable) {
pcdev->fps = 0;
+ pcdev->last_fps = 0;
hrtimer_cancel(&(pcdev->fps_timer.timer));
pcdev->fps_timer.pcdev = pcdev;
pcdev->timer_get_fps = false;
// hrtimer_start(&(pcdev->fps_timer.timer),ktime_set(3, 0),HRTIMER_MODE_REL);
cif_ctrl_val |= ENABLE_CAPTURE;
write_cif_reg(pcdev->base,CIF_CIF_CTRL, cif_ctrl_val);
- hrtimer_start(&(pcdev->fps_timer.timer),ktime_set(1, 0),HRTIMER_MODE_REL);
+ hrtimer_start(&(pcdev->fps_timer.timer),ktime_set(10, 0),HRTIMER_MODE_REL);
} else {
cif_ctrl_val &= ~ENABLE_CAPTURE;
write_cif_reg(pcdev->base,CIF_CIF_CTRL, cif_ctrl_val);