{
struct rkisp1_isp *isp = &cap->rkisp1->isp;
struct rkisp1_buffer *curr_buf;
- unsigned long flags;
- spin_lock_irqsave(&cap->buf.lock, flags);
+ spin_lock(&cap->buf.lock);
curr_buf = cap->buf.curr;
if (curr_buf) {
}
rkisp1_set_next_buf(cap);
- spin_unlock_irqrestore(&cap->buf.lock, flags);
+ spin_unlock(&cap->buf.lock);
}
void rkisp1_capture_isr(struct rkisp1_device *rkisp1)
container_of(vbuf, struct rkisp1_buffer, vb);
struct rkisp1_capture *cap = vb->vb2_queue->drv_priv;
const struct v4l2_pix_format_mplane *pixm = &cap->pix.fmt;
- unsigned long flags;
unsigned int i;
memset(ispbuf->buff_addr, 0, sizeof(ispbuf->buff_addr));
swap(ispbuf->buff_addr[RKISP1_PLANE_CR],
ispbuf->buff_addr[RKISP1_PLANE_CB]);
- spin_lock_irqsave(&cap->buf.lock, flags);
+ spin_lock_irq(&cap->buf.lock);
list_add_tail(&ispbuf->queue, &cap->buf.queue);
- spin_unlock_irqrestore(&cap->buf.lock, flags);
+ spin_unlock_irq(&cap->buf.lock);
}
static int rkisp1_vb2_buf_prepare(struct vb2_buffer *vb)
static void rkisp1_return_all_buffers(struct rkisp1_capture *cap,
enum vb2_buffer_state state)
{
- unsigned long flags;
struct rkisp1_buffer *buf;
- spin_lock_irqsave(&cap->buf.lock, flags);
+ spin_lock_irq(&cap->buf.lock);
if (cap->buf.curr) {
vb2_buffer_done(&cap->buf.curr->vb.vb2_buf, state);
cap->buf.curr = NULL;
list_del(&buf->queue);
vb2_buffer_done(&buf->vb.vb2_buf, state);
}
- spin_unlock_irqrestore(&cap->buf.lock, flags);
+ spin_unlock_irq(&cap->buf.lock);
}
/*
else
rkisp1_csm_config(params, false);
- spin_lock(¶ms->config_lock);
+ spin_lock_irq(¶ms->config_lock);
/* apply the first buffer if there is one already */
if (params->is_streaming)
rkisp1_params_apply_params_cfg(params, 0);
- spin_unlock(¶ms->config_lock);
+ spin_unlock_irq(¶ms->config_lock);
}
-/* Not called when the camera active, thus not isr protection. */
void rkisp1_params_configure(struct rkisp1_params *params,
enum rkisp1_fmt_raw_pat_type bayer_pat,
enum v4l2_quantization quantization)
container_of(vbuf, struct rkisp1_buffer, vb);
struct vb2_queue *vq = vb->vb2_queue;
struct rkisp1_params *params = vq->drv_priv;
- unsigned long flags;
params_buf->vaddr = vb2_plane_vaddr(vb, 0);
- spin_lock_irqsave(¶ms->config_lock, flags);
+ spin_lock_irq(¶ms->config_lock);
list_add_tail(¶ms_buf->queue, ¶ms->params);
- spin_unlock_irqrestore(¶ms->config_lock, flags);
+ spin_unlock_irq(¶ms->config_lock);
}
static int rkisp1_params_vb2_buf_prepare(struct vb2_buffer *vb)
struct rkisp1_params *params = vq->drv_priv;
struct rkisp1_buffer *buf;
struct list_head tmp_list;
- unsigned long flags;
INIT_LIST_HEAD(&tmp_list);
* and then we can iterate it and call vb2_buffer_done
* without holding the lock
*/
- spin_lock_irqsave(¶ms->config_lock, flags);
+ spin_lock_irq(¶ms->config_lock);
params->is_streaming = false;
list_cut_position(&tmp_list, ¶ms->params, params->params.prev);
- spin_unlock_irqrestore(¶ms->config_lock, flags);
+ spin_unlock_irq(¶ms->config_lock);
list_for_each_entry(buf, &tmp_list, queue)
vb2_buffer_done(&buf->vb.vb2_buf, VB2_BUF_STATE_ERROR);
rkisp1_params_vb2_start_streaming(struct vb2_queue *queue, unsigned int count)
{
struct rkisp1_params *params = queue->drv_priv;
- unsigned long flags;
- spin_lock_irqsave(¶ms->config_lock, flags);
+ spin_lock_irq(¶ms->config_lock);
params->is_streaming = true;
- spin_unlock_irqrestore(¶ms->config_lock, flags);
+ spin_unlock_irq(¶ms->config_lock);
return 0;
}