aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-14 10:47:55 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 11:30:36 -0400
commite355880b838c80ff53e6386a1caad10e6f719259 (patch)
treebb9400b4f6dc2d994bf4d428b2ec6c617af1f52f /drivers
parentd7e7a1567894146ca6c9442c824dded4f0f48dde (diff)
V4L/DVB (4632): Zoran: Implement pcipci failure check
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 'drivers')
-rw-r--r--drivers/media/video/zoran_card.c6
-rw-r--r--drivers/media/video/zoran_driver.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c
index f2249ed25273..aa80ddd317b0 100644
--- a/drivers/media/video/zoran_card.c
+++ b/drivers/media/video/zoran_card.c
@@ -1621,10 +1621,10 @@ init_dc10_cards (void)
1621 dprintk(5, KERN_DEBUG "Jotti is een held!\n"); 1621 dprintk(5, KERN_DEBUG "Jotti is een held!\n");
1622 1622
1623 /* some mainboards might not do PCI-PCI data transfer well */ 1623 /* some mainboards might not do PCI-PCI data transfer well */
1624 if (pci_pci_problems & PCIPCI_FAIL) { 1624 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL|PCIPCI_ALIMAGIK)) {
1625 dprintk(1, 1625 dprintk(1,
1626 KERN_WARNING 1626 KERN_WARNING
1627 "%s: chipset may not support reliable PCI-PCI DMA\n", 1627 "%s: chipset does not support reliable PCI-PCI DMA\n",
1628 ZORAN_NAME); 1628 ZORAN_NAME);
1629 } 1629 }
1630 1630
@@ -1632,7 +1632,7 @@ init_dc10_cards (void)
1632 for (i = 0; i < zoran_num; i++) { 1632 for (i = 0; i < zoran_num; i++) {
1633 struct zoran *zr = &zoran[i]; 1633 struct zoran *zr = &zoran[i];
1634 1634
1635 if (pci_pci_problems & PCIPCI_NATOMA && zr->revision <= 1) { 1635 if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) {
1636 zr->jpg_buffers.need_contiguous = 1; 1636 zr->jpg_buffers.need_contiguous = 1;
1637 dprintk(1, 1637 dprintk(1,
1638 KERN_INFO 1638 KERN_INFO
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index 5f90db27892b..862a984c2155 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -1512,6 +1512,13 @@ setup_fbuffer (struct file *file,
1512 if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RAWIO)) 1512 if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RAWIO))
1513 return -EPERM; 1513 return -EPERM;
1514 1514
1515 /* Don't allow frame buffer overlay if PCI or AGP is buggy, or on
1516 ALi Magik (that needs very low latency while the card needs a
1517 higher value always) */
1518
1519 if (pci_pci_problems & (PCIPCI_FAIL | PCIAGP_FAIL | PCIPCI_ALIMAGIK))
1520 return -ENXIO;
1521
1515 /* we need a bytesperline value, even if not given */ 1522 /* we need a bytesperline value, even if not given */
1516 if (!bytesperline) 1523 if (!bytesperline)
1517 bytesperline = width * ((fmt->depth + 7) & ~7) / 8; 1524 bytesperline = width * ((fmt->depth + 7) & ~7) / 8;