diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-14 11:53:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-14 11:53:09 -0300 |
commit | 2baeb6d827893b4f6fe76ad9ade9000a8c41fdef (patch) | |
tree | 346df3d748c154a38f9ed02b76a0d39a13784ae2 /linux/drivers | |
parent | 33139a806cec2b36dcd65ef7ad310fbe0ddd2998 (diff) | |
download | mediapointer-dvb-s2-2baeb6d827893b4f6fe76ad9ade9000a8c41fdef.tar.gz mediapointer-dvb-s2-2baeb6d827893b4f6fe76ad9ade9000a8c41fdef.tar.bz2 |
Zr36120: implement pcipci checks
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Again depends on the PCIAGP_FAIL patch for a define. Someone with more
card knowledge should look at the ALIMAGIK case and whether latency can
be safely to set to 0xA or so.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/zr36120.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/drivers/media/video/zr36120.c b/linux/drivers/media/video/zr36120.c index 50437383e..9240638a0 100644 --- a/linux/drivers/media/video/zr36120.c +++ b/linux/drivers/media/video/zr36120.c @@ -987,6 +987,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg) VID_TYPE_SCALES; if (ztv->have_tuner) c.type |= VID_TYPE_TUNER; + if (pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) + c.type &= ~VID_TYPE_OVERLAY; if (ztv->have_decoder) { c.channels = ztv->card->video_inputs; c.audios = ztv->card->audio_inputs; @@ -1284,6 +1286,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg) struct video_buffer v; if(!capable(CAP_SYS_ADMIN)) return -EPERM; + if (pcipci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) + return -ENXIO; if (copy_from_user(&v, arg,sizeof(v))) return -EFAULT; DEBUG(printk(CARD_DEBUG "VIDIOCSFBUF(%p,%d,%d,%d,%d)\n",CARD,v.base, v.width,v.height,v.depth,v.bytesperline)); @@ -2030,7 +2034,7 @@ void release_zoran(int max) /* free it */ free_irq(ztv->dev->irq,ztv); - /* unregister i2c_bus */ + /* unregister i2c_bus */ i2c_unregister_bus((&ztv->i2c)); /* unmap and free memory */ |