提交 13f1371e 编写于 作者: A Alan Cox 提交者: Mauro Carvalho Chehab

V4L/DVB (4634): Zr36120: implement pcipci checks

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: NAlan Cox <alan@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 e355880b
...@@ -987,6 +987,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg) ...@@ -987,6 +987,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
VID_TYPE_SCALES; VID_TYPE_SCALES;
if (ztv->have_tuner) if (ztv->have_tuner)
c.type |= VID_TYPE_TUNER; c.type |= VID_TYPE_TUNER;
if (pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
c.type &= ~VID_TYPE_OVERLAY;
if (ztv->have_decoder) { if (ztv->have_decoder) {
c.channels = ztv->card->video_inputs; c.channels = ztv->card->video_inputs;
c.audios = ztv->card->audio_inputs; c.audios = ztv->card->audio_inputs;
...@@ -1284,6 +1286,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg) ...@@ -1284,6 +1286,8 @@ int zoran_ioctl(struct video_device* dev, unsigned int cmd, void *arg)
struct video_buffer v; struct video_buffer v;
if(!capable(CAP_SYS_ADMIN)) if(!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
if (pcipci_problems & (PCIPCI_FAIL|PCIAGP_FAIL))
return -ENXIO;
if (copy_from_user(&v, arg,sizeof(v))) if (copy_from_user(&v, arg,sizeof(v)))
return -EFAULT; return -EFAULT;
DEBUG(printk(CARD_DEBUG "VIDIOCSFBUF(%p,%d,%d,%d,%d)\n",CARD,v.base, v.width,v.height,v.depth,v.bytesperline)); 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) ...@@ -2030,7 +2034,7 @@ void release_zoran(int max)
/* free it */ /* free it */
free_irq(ztv->dev->irq,ztv); free_irq(ztv->dev->irq,ztv);
/* unregister i2c_bus */ /* unregister i2c_bus */
i2c_unregister_bus((&ztv->i2c)); i2c_unregister_bus((&ztv->i2c));
/* unmap and free memory */ /* unmap and free memory */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册