diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-10 14:46:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:53:06 -0500 |
commit | 9050d942b7dc55cd8e6d9b2c1ce260656021f0fb (patch) | |
tree | 6906a570d9519b7368c626704413a317dda3c7e5 /drivers/media | |
parent | f705e6e4940c4e803240b77c6c63fb2d47a97b59 (diff) |
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: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/bttv-cards.c | 10 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 21 |
2 files changed, 28 insertions, 3 deletions
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c index 21ffe1c8dde4..abfa6ad857a0 100644 --- a/drivers/media/video/bttv-cards.c +++ b/drivers/media/video/bttv-cards.c | |||
@@ -137,6 +137,8 @@ MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a li | |||
137 | MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)"); | 137 | MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)"); |
138 | MODULE_PARM_DESC(tuner,"specify installed tuner type"); | 138 | MODULE_PARM_DESC(tuner,"specify installed tuner type"); |
139 | MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)"); | 139 | MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)"); |
140 | MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)" | ||
141 | " [some VIA/SIS chipsets are known to have problem with overlay]"); | ||
140 | 142 | ||
141 | /* ----------------------------------------------------------------------- */ | 143 | /* ----------------------------------------------------------------------- */ |
142 | /* list of card IDs for bt878+ cards */ | 144 | /* list of card IDs for bt878+ cards */ |
@@ -4944,12 +4946,14 @@ void __devinit bttv_check_chipset(void) | |||
4944 | if (vsfx) | 4946 | if (vsfx) |
4945 | printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); | 4947 | printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); |
4946 | if (pcipci_fail) { | 4948 | if (pcipci_fail) { |
4947 | printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n"); | 4949 | printk(KERN_INFO "bttv: bttv and your chipset may not work " |
4950 | "together.\n"); | ||
4948 | if (!no_overlay) { | 4951 | if (!no_overlay) { |
4949 | printk(KERN_WARNING "bttv: overlay will be disabled.\n"); | 4952 | printk(KERN_INFO "bttv: overlay will be disabled.\n"); |
4950 | no_overlay = 1; | 4953 | no_overlay = 1; |
4951 | } else { | 4954 | } else { |
4952 | printk(KERN_WARNING "bttv: overlay forced. Use this option at your own risk.\n"); | 4955 | printk(KERN_INFO "bttv: overlay forced. Use this " |
4956 | "option at your own risk.\n"); | ||
4953 | } | 4957 | } |
4954 | } | 4958 | } |
4955 | if (UNSET != latency) | 4959 | if (UNSET != latency) |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index e7c30665739e..f5f2cf5d1507 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -66,6 +66,11 @@ static unsigned int latency = UNSET; | |||
66 | module_param(latency, int, 0444); | 66 | module_param(latency, int, 0444); |
67 | MODULE_PARM_DESC(latency,"pci latency timer"); | 67 | MODULE_PARM_DESC(latency,"pci latency timer"); |
68 | 68 | ||
69 | static int no_overlay=-1; | ||
70 | module_param(no_overlay, int, 0444); | ||
71 | MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)" | ||
72 | " [some VIA/SIS chipsets are known to have problem with overlay]"); | ||
73 | |||
69 | static unsigned int video_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; | 74 | static unsigned int video_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; |
70 | static unsigned int vbi_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; | 75 | static unsigned int vbi_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; |
71 | static unsigned int radio_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; | 76 | 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 | latency = 0x0A; | 840 | latency = 0x0A; |
836 | } | 841 | } |
837 | #endif | 842 | #endif |
843 | if (pci_pci_problems & PCIPCI_FAIL) { | ||
844 | printk(KERN_INFO "%s: quirk: this driver and your " | ||
845 | "chipset may not work together" | ||
846 | " in overlay mode.\n",dev->name); | ||
847 | if (!no_overlay) { | ||
848 | printk(KERN_INFO "%s: quirk: overlay " | ||
849 | "mode will be disabled.\n", | ||
850 | dev->name); | ||
851 | no_overlay = 1; | ||
852 | } else { | ||
853 | printk(KERN_INFO "%s: quirk: overlay " | ||
854 | "mode will be forced. Use this" | ||
855 | " option at your own risk.\n", | ||
856 | dev->name); | ||
857 | } | ||
858 | } | ||
838 | } | 859 | } |
839 | if (UNSET != latency) { | 860 | if (UNSET != latency) { |
840 | printk(KERN_INFO "%s: setting pci latency timer to %d\n", | 861 | printk(KERN_INFO "%s: setting pci latency timer to %d\n", |