summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/zoran_driver.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-09-14 11:47:55 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-14 11:47:55 -0300
commitfaac37cf5aafefe1012e80b7ca37419271e5fb3d (patch)
tree8dc066effec4ce86487421aea76fd66a31a01707 /linux/drivers/media/video/zoran_driver.c
parent0e2b8e3813b0206ac4624d3c6ac4ad8ff05f17b5 (diff)
downloadmediapointer-dvb-s2-faac37cf5aafefe1012e80b7ca37419271e5fb3d.tar.gz
mediapointer-dvb-s2-faac37cf5aafefe1012e80b7ca37419271e5fb3d.tar.bz2
Zoran: Implement pcipci failure check
From: Alan Cox <alan@lxorguk.ukuu.org.uk> We should be doing this on all devices doing PCI<->PCI DMA. We only set the _FAIL ones when the DMA will fail or may cause crashes. This relies on the PCIAGP_FAIL patch I sent to Andrew already Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/zoran_driver.c')
-rw-r--r--linux/drivers/media/video/zoran_driver.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c
index e1e640c2c..2c282b9ef 100644
--- a/linux/drivers/media/video/zoran_driver.c
+++ b/linux/drivers/media/video/zoran_driver.c
@@ -1515,6 +1515,13 @@ setup_fbuffer (struct file *file,
if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RAWIO))
return -EPERM;
+ /* Don't allow frame buffer overlay if PCI or AGP is buggy, or on
+ ALi Magik (that needs very low latency while the card needs a
+ higher value always) */
+
+ if (pci_pci_problems & (PCIPCI_FAIL | PCIAGP_FAIL | PCIPCI_ALIMAGIK))
+ return -ENXIO;
+
/* we need a bytesperline value, even if not given */
if (!bytesperline)
bytesperline = width * ((fmt->depth + 7) & ~7) / 8;