diff --git a/drivers/staging/media/rkisp1/TODO b/drivers/staging/media/rkisp1/TODO index 9de4e44225e6..e7c8398fc2ce 100644 --- a/drivers/staging/media/rkisp1/TODO +++ b/drivers/staging/media/rkisp1/TODO @@ -1,6 +1,5 @@ * Fix pad format size for statistics and parameters entities. * Fix checkpatch errors. -* Review and comment every lock * Add uapi docs. Remember to add documentation of how quantization is handled. * streaming paths (mainpath and selfpath) check if the other path is streaming in several places of the code, review this, specially that it doesn't seem it diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c index 4000f6c03d7e..b6f497ce3e95 100644 --- a/drivers/staging/media/rkisp1/rkisp1-capture.c +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c @@ -955,6 +955,7 @@ static void rkisp1_stream_start(struct rkisp1_capture *cap) cap->ops->config(cap); /* Setup a buffer for the next frame */ + spin_lock_irq(&cap->buf.lock); rkisp1_set_next_buf(cap); cap->ops->enable(cap); /* It's safe to config ACTIVE and SHADOW regs for the @@ -972,6 +973,7 @@ static void rkisp1_stream_start(struct rkisp1_capture *cap) RKISP1_CIF_MI_INIT_SOFT_UPD, RKISP1_CIF_MI_INIT); rkisp1_set_next_buf(cap); } + spin_unlock_irq(&cap->buf.lock); cap->is_streaming = true; }