Commit 9050d942 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

V4L/DVB (3439): Added no_overlay option and quirks to saa7134

Some chipsets have several problems when pci to pci transfers are activated
on overlay mode. the option no_overlay allows disabling such feature of
the driver, in favor of keeping the system stable.
The default is to use pcipci_fail flag defined on drivers/pci/quirks.c.
It also allows the user to override it by forcing disable overlay or forcing
enable. Forcing enable may generate PCI transfer corruption, including disk
mass corruption, so should be used with care.
Added a text description to this option and make messages looks the same at
both bttv and saa7134 drivers.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f705e6e4
...@@ -137,6 +137,8 @@ MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a li ...@@ -137,6 +137,8 @@ MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a li
MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)"); MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
MODULE_PARM_DESC(tuner,"specify installed tuner type"); MODULE_PARM_DESC(tuner,"specify installed tuner type");
MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)"); MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
" [some VIA/SIS chipsets are known to have problem with overlay]");
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* list of card IDs for bt878+ cards */ /* list of card IDs for bt878+ cards */
...@@ -4944,12 +4946,14 @@ void __devinit bttv_check_chipset(void) ...@@ -4944,12 +4946,14 @@ void __devinit bttv_check_chipset(void)
if (vsfx) if (vsfx)
printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
if (pcipci_fail) { if (pcipci_fail) {
printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n"); printk(KERN_INFO "bttv: bttv and your chipset may not work "
"together.\n");
if (!no_overlay) { if (!no_overlay) {
printk(KERN_WARNING "bttv: overlay will be disabled.\n"); printk(KERN_INFO "bttv: overlay will be disabled.\n");
no_overlay = 1; no_overlay = 1;
} else { } else {
printk(KERN_WARNING "bttv: overlay forced. Use this option at your own risk.\n"); printk(KERN_INFO "bttv: overlay forced. Use this "
"option at your own risk.\n");
} }
} }
if (UNSET != latency) if (UNSET != latency)
......
...@@ -66,6 +66,11 @@ static unsigned int latency = UNSET; ...@@ -66,6 +66,11 @@ static unsigned int latency = UNSET;
module_param(latency, int, 0444); module_param(latency, int, 0444);
MODULE_PARM_DESC(latency,"pci latency timer"); MODULE_PARM_DESC(latency,"pci latency timer");
static int no_overlay=-1;
module_param(no_overlay, int, 0444);
MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
" [some VIA/SIS chipsets are known to have problem with overlay]");
static unsigned int video_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; static unsigned int video_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
static unsigned int vbi_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
static unsigned int radio_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
...@@ -835,6 +840,22 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, ...@@ -835,6 +840,22 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
latency = 0x0A; latency = 0x0A;
} }
#endif #endif
if (pci_pci_problems & PCIPCI_FAIL) {
printk(KERN_INFO "%s: quirk: this driver and your "
"chipset may not work together"
" in overlay mode.\n",dev->name);
if (!no_overlay) {
printk(KERN_INFO "%s: quirk: overlay "
"mode will be disabled.\n",
dev->name);
no_overlay = 1;
} else {
printk(KERN_INFO "%s: quirk: overlay "
"mode will be forced. Use this"
" option at your own risk.\n",
dev->name);
}
}
} }
if (UNSET != latency) { if (UNSET != latency) {
printk(KERN_INFO "%s: setting pci latency timer to %d\n", printk(KERN_INFO "%s: setting pci latency timer to %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment