diff options
author | Gerd Knorr <devnull@localhost> | 2004-08-31 14:46:49 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-08-31 14:46:49 +0000 |
commit | e2d71728bcc72b8dc1cb726c222756c14e113794 (patch) | |
tree | 22dd2404663f6642cc69a5f6f9891d769ceef1c1 | |
parent | b8ac86990345a27dcc3eecb71b18c79132e24cb1 (diff) | |
download | mediapointer-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.c | 8 |
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); |