Пример #1
0
/*
 * ispstat_buf_process - Process statistic buffers.
 * @buf_state: points out if buffer is ready to be processed. It's necessary
 *	       because histogram needs to copy the data from internal memory
 *	       before be able to process the buffer.
 */
static int ispstat_buf_process(struct ispstat *stat, int buf_state)
{
	int ret = STAT_NO_BUF;

	if (!atomic_add_unless(&stat->buf_err, -1, 0) &&
	    buf_state == STAT_BUF_DONE && stat->state == ISPSTAT_ENABLED) {
		ret = ispstat_buf_queue(stat);
		ispstat_buf_next(stat);
	}

	return ret;
}
Пример #2
0
/* This function will handle the AF buffer. */
int isp_af_buf_process(struct isp_af_device *isp_af)
{
	if (likely(!isp_af->buf_err && isp_af->config.af_config)) {
		int ret;

		ret = ispstat_buf_queue(&isp_af->stat);
		isp_af->buf_next = ispstat_buf_next(&isp_af->stat);
		return ret;
	} else {
		isp_af->buf_err = 0;
		return -1;
	}
}
Пример #3
0
/**
 * isph3a_aewb_buf_process - Process H3A AEWB buffer.
 */
int isph3a_aewb_buf_process(struct isp_h3a_device *isp_h3a)
{
	isph3a_update_wb(isp_h3a);
	if (likely(!isp_h3a->buf_err &&
				isp_h3a->aewb_config_local.aewb_enable)) {
		int ret;

		ret = ispstat_buf_queue(&isp_h3a->stat);
		isp_h3a->buf_next = ispstat_buf_next(&isp_h3a->stat);
		return ret;
	} else {
		isp_h3a->buf_err = 0;
		return -1;
	}
}