summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-08-31 14:46:49 +0000
committerGerd Knorr <devnull@localhost>2004-08-31 14:46:49 +0000
commite2d71728bcc72b8dc1cb726c222756c14e113794 (patch)
tree22dd2404663f6642cc69a5f6f9891d769ceef1c1
parentb8ac86990345a27dcc3eecb71b18c79132e24cb1 (diff)
downloadmediapointer-dvb-s2-e2d71728bcc72b8dc1cb726c222756c14e113794.tar.gz
mediapointer-dvb-s2-e2d71728bcc72b8dc1cb726c222756c14e113794.tar.bz2
- cx88: make cx88_wakeup() work correctly after waking 2^16 buffers.
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index eaee42b9d..935234201 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -592,8 +592,16 @@ void cx88_wakeup(struct cx88_core *core,
break;
buf = list_entry(q->active.next,
struct cx88_buffer, vb.queue);
+#if 0
if (buf->count > count)
break;
+#else
+ /* count comes from the hw and is is 16bit wide --
+ * this trick is taken from the time_after() macro and
+ * hopefully handles wrap-arounds correctly ... */
+ if ((s16)count - (s16)buf->count < 0)
+ break;
+#endif
do_gettimeofday(&buf->vb.ts);
dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i,
count, buf->count);