Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295112
b: refs/heads/master
c: 482d35c
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet authored and Mauro Carvalho Chehab committed Mar 20, 2012
1 parent 3921389 commit dd2311d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0770d07f7b33081f68f8d7a291395005d7044c6b
refs/heads/master: 482d35c41f2efb0408624e222bbc9efc0b3518eb
10 changes: 9 additions & 1 deletion trunk/drivers/media/video/marvell-ccic/mcam-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,14 @@ static void mcam_ctlr_stop_dma(struct mcam_camera *cam)
mcam_ctlr_stop(cam);
cam->state = S_IDLE;
spin_unlock_irqrestore(&cam->dev_lock, flags);
msleep(40);
/*
* This is a brutally long sleep, but experience shows that
* it can take the controller a while to get the message that
* it needs to stop grabbing frames. In particular, we can
* sometimes (on mmp) get a frame at the end WITHOUT the
* start-of-frame indication.
*/
msleep(150);
if (test_bit(CF_DMA_ACTIVE, &cam->flags))
cam_err(cam, "Timeout waiting for DMA to end\n");
/* This would be bad news - what now? */
Expand Down Expand Up @@ -885,6 +892,7 @@ static int mcam_read_setup(struct mcam_camera *cam)
* Turn it loose.
*/
spin_lock_irqsave(&cam->dev_lock, flags);
clear_bit(CF_DMA_ACTIVE, &cam->flags);
mcam_reset_buffers(cam);
mcam_ctlr_irq_enable(cam);
cam->state = S_STREAMING;
Expand Down

0 comments on commit dd2311d

Please sign in to comment.