summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-10-11 14:53:12 +0000
committerGerd Knorr <devnull@localhost>2004-10-11 14:53:12 +0000
commit3de5a0bda8a7e0289857223e3b645c0782aee2b7 (patch)
treee8d872427c5bcf1f84d7c88a8510f6d08e24e4a9
parent10a75fb37fbb1ab822371d834328d87a8409ff23 (diff)
downloadmediapointer-dvb-s2-3de5a0bda8a7e0289857223e3b645c0782aee2b7.tar.gz
mediapointer-dvb-s2-3de5a0bda8a7e0289857223e3b645c0782aee2b7.tar.bz2
- fix poll/select oops.
-rw-r--r--linux/drivers/media/video/bttv-driver.c7
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c5
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c10
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-ts.c5
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c5
-rw-r--r--linux/drivers/media/video/video-buf.c7
-rw-r--r--linux/include/media/video-buf.h4
-rw-r--r--v4l/scripts/update6
8 files changed, 30 insertions, 19 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index f432cad03..57a54b0ba 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,6 +1,6 @@
/*
- $Id: bttv-driver.c,v 1.20 2004/10/11 13:45:51 kraxel Exp $
+ $Id: bttv-driver.c,v 1.21 2004/10/11 14:53:12 kraxel Exp $
bttv - Bt848 frame grabber driver
@@ -2873,8 +2873,9 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
if (!check_alloc_btres(fh->btv,fh,RESOURCE_VBI))
- return -EBUSY;
- return videobuf_poll_stream(file->private_data, &fh->vbi, wait);
+ return POLLERR;
+ return videobuf_poll_stream(file, file->private_data,
+ &fh->vbi, wait);
}
if (check_btres(fh,RESOURCE_VIDEO)) {
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index e23284cb3..c85172170 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.12 2004/10/07 12:29:56 kraxel Exp $
+ * $Id: cx88-blackbird.c,v 1.13 2004/10/11 14:53:13 kraxel Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -734,7 +734,8 @@ mpeg_poll(struct file *file, struct poll_table_struct *wait)
{
struct cx8802_fh *fh = file->private_data;
- return videobuf_poll_stream(file->private_data, &fh->mpegq, wait);
+ return videobuf_poll_stream(file, file->private_data,
+ &fh->mpegq, wait);
}
static int
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 14d2cb074..eeccdb29b 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.38 2004/10/11 13:45:51 kraxel Exp $
+ * $Id: cx88-video.c,v 1.39 2004/10/11 14:53:13 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -1033,8 +1033,12 @@ video_poll(struct file *file, struct poll_table_struct *wait)
{
struct cx8800_fh *fh = file->private_data;
- if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type)
- return videobuf_poll_stream(file->private_data, &fh->vbiq, wait);
+ if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
+ if (!res_get(fh->dev,fh,RESOURCE_VBI))
+ return POLLERR;
+ return videobuf_poll_stream(file, file->private_data,
+ &fh->vbiq, wait);
+ }
/* FIXME */
return POLLERR;
diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c
index 2df96839a..3c36c3cc9 100644
--- a/linux/drivers/media/video/saa7134/saa7134-ts.c
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-ts.c,v 1.8 2004/09/23 13:58:19 kraxel Exp $
+ * $Id: saa7134-ts.c,v 1.9 2004/10/11 14:53:13 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -265,7 +265,8 @@ ts_poll(struct file *file, struct poll_table_struct *wait)
{
struct saa7134_dev *dev = file->private_data;
- return videobuf_poll_stream(file->private_data, &dev->ts.ts, wait);
+ return videobuf_poll_stream(file, file->private_data,
+ &dev->ts.ts, wait);
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 14cfff8d7..4d79c3dc6 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-video.c,v 1.14 2004/09/23 13:58:19 kraxel Exp $
+ * $Id: saa7134-video.c,v 1.15 2004/10/11 14:53:13 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -1294,7 +1294,8 @@ video_poll(struct file *file, struct poll_table_struct *wait)
struct videobuf_buffer *buf = NULL;
if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type)
- return videobuf_poll_stream(file->private_data, &fh->vbi, wait);
+ return videobuf_poll_stream(file, file->private_data,
+ &fh->vbi, wait);
if (res_check(fh,RESOURCE_VIDEO)) {
if (!list_empty(&fh->cap.stream))
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 0758b1daf..219143d0a 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.c,v 1.11 2004/09/23 13:58:19 kraxel Exp $
+ * $Id: video-buf.c,v 1.12 2004/10/11 14:53:13 kraxel Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -921,6 +921,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
int err, retval;
unsigned long flags;
+ dprintk(2,"%s\n",__FUNCTION__);
down(&q->lock);
retval = -EBUSY;
if (q->streaming)
@@ -999,7 +1000,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
return retval;
}
-unsigned int videobuf_poll_stream(void *priv,
+unsigned int videobuf_poll_stream(struct file *file, void *priv,
struct videobuf_queue *q,
poll_table *wait)
{
@@ -1029,7 +1030,7 @@ unsigned int videobuf_poll_stream(void *priv,
rc = POLLERR;
if (0 == rc) {
- poll_wait(priv, &buf->done, wait);
+ poll_wait(file, &buf->done, wait);
if (buf->state == STATE_DONE ||
buf->state == STATE_ERROR)
rc = POLLIN|POLLRDNORM;
diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h
index 26fcde3eb..3fd4d7db1 100644
--- a/linux/include/media/video-buf.h
+++ b/linux/include/media/video-buf.h
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.h,v 1.6 2004/09/23 13:58:19 kraxel Exp $
+ * $Id: video-buf.h,v 1.7 2004/10/11 14:53:13 kraxel Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -233,7 +233,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
ssize_t videobuf_read_one(void *priv, struct videobuf_queue *q,
char __user *data, size_t count, loff_t *ppos,
int nonblocking);
-unsigned int videobuf_poll_stream(void *priv,
+unsigned int videobuf_poll_stream(struct file *file, void *priv,
struct videobuf_queue *q,
poll_table *wait);
diff --git a/v4l/scripts/update b/v4l/scripts/update
index da75ec8bc..d658c9165 100644
--- a/v4l/scripts/update
+++ b/v4l/scripts/update
@@ -56,6 +56,8 @@ sync; sleep 1;
# common
v4l2basic
+xrmmod video-buf
+xinsmod video-buf debug=2
xinsmod btcx-risc debug=0
xinsmod ir-common debug=0 repeat=0
xinsmod tuner debug=1
@@ -70,8 +72,8 @@ test -f ir-kbd-gpio.ko && xinsmod ir-kbd-gpio debug=0
# cx88
xinsmod cx22702 debug=0
-xinsmod cx88xx core_debug=0 audio_debug=1 i2c_debug=1 i2c_scan=1
-xinsmod cx8800 video_debug=0
+xinsmod cx88xx core_debug=1 audio_debug=1 i2c_debug=1 i2c_scan=1
+xinsmod cx8800 video_debug=1 vbi_debug=1
xinsmod cx8801
xinsmod cx8802
xinsmod cx88-blackbird