Ejemplo n.º 1
0
static inline void fimc_irq_cap(struct fimc_control *ctrl)
{
	struct fimc_capinfo *cap = ctrl->cap;
	int pp;

	fimc_hwset_clear_irq(ctrl);
	fimc_hwget_overflow_state(ctrl);
	pp = ((fimc_hwget_frame_count(ctrl) + 2) % 4);
	if (cap->fmt.field == V4L2_FIELD_INTERLACED_TB) {
		/* odd value of pp means one frame is made with top/bottom */
		if (pp & 0x1) {	
			cap->irq = 1;
			wake_up(&ctrl->wq);
		}
	}
	else {
		cap->irq = 1;
		wake_up(&ctrl->wq);
	}	
	
}
Ejemplo n.º 2
0
static inline void fimc_irq_cap(struct fimc_control *ctrl)
{
	struct fimc_capinfo *cap = ctrl->cap;
	int pp;
#ifdef VIEW_FUNCTION_CALL
	printk("[FIMC_DEV] %s(%d)\n", __func__, __LINE__);
#endif

	fimc_hwset_clear_irq(ctrl);
	fimc_hwget_overflow_state(ctrl);
	pp = ((fimc_hwget_frame_count(ctrl) + 2) % 4);
	if (cap->fmt.field == V4L2_FIELD_INTERLACED_TB) {
		/* odd value of pp means one frame is made with top/bottom */
		if (pp & 0x1) {	
			cap->irq = 1;
			wake_up_interruptible(&ctrl->wq);
		}
	}
	else {
#ifdef S5K4CA_SKIP_FRAMES
		if (unlikely(s5k4ca_skip_green_frame < FRAMES_TO_SKIP)) {
			s5k4ca_skip_green_frame++;
			if(s5k4ca_skip_green_frame == 7)
			{
				printk("s5k4ca_skip_green_frame = %d\n", s5k4ca_skip_green_frame);			
			}
		} else {
			cap->irq = 1;
			wake_up_interruptible(&ctrl->wq);
		}
#else
		cap->irq = 1;
		wake_up_interruptible(&ctrl->wq);
#endif
	}	
	
}