Skip to content

Commit

Permalink
[media] ivtv: Make two ivtv_msleep_timeout calls uninterruptable
Browse files Browse the repository at this point in the history
Two ivtv_msleep_timeout() calls are incorrectly flagged as interruptable. The
first is in the init sequence for a capture and is required for stable
hardware setup. The second is at the end of the capture and used to handle the
last data transfer. Failure to wait for this last transfer can result in stale
data being read at the start of the next capture.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Ian Armstrong authored and Mauro Carvalho Chehab committed Jun 1, 2011
1 parent 21d2e93 commit 7700a0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/ivtv/ivtv-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ int ivtv_start_v4l2_encode_stream(struct ivtv_stream *s)
v4l2_subdev_call(itv->sd_audio, audio, s_stream, 1);
/* Avoid unpredictable PCI bus hang - disable video clocks */
v4l2_subdev_call(itv->sd_video, video, s_stream, 0);
ivtv_msleep_timeout(300, 1);
ivtv_msleep_timeout(300, 0);
ivtv_vapi(itv, CX2341X_ENC_INITIALIZE_INPUT, 0);
v4l2_subdev_call(itv->sd_video, video, s_stream, 1);
}
Expand Down Expand Up @@ -834,7 +834,7 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end)
}

/* Handle any pending interrupts */
ivtv_msleep_timeout(100, 1);
ivtv_msleep_timeout(100, 0);
}

atomic_dec(&itv->capturing);
Expand Down

0 comments on commit 7700a0d

Please sign in to comment.