From 28af24bb8470c7d0573b703a2955548b73a6c066 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 3 Nov 2006 15:13:27 -0500 Subject: [AGPGART] Fix up misprogrammed bridges with incorrect AGPv2 rates. Some dumb bridges are programmed to disobey the AGP2 spec. This is likely a BIOS misprogramming rather than poweron default, or it would be a lot more common. AGPv2 spec 6.1.9 states: "The RATE field indicates the data transfer rates supported by this device. A.G.P. devices must report all that apply." Fix them up as best we can. This will prevent errors like.. agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0. agpgart: req mode 1f000201 bridge_agpstat 1f000a14 vga_agpstat 2f000217. agpgart: Device is in legacy mode, falling back to 2.x agpgart: Putting AGP V2 device at 0000:00:00.0 into 0x mode agpgart: Putting AGP V2 device at 0000:01:00.0 into 0x mode agpgart: Putting AGP V2 device at 0000:01:00.1 into 0x mode https://bugs.freedesktop.org/show_bug.cgi?id=8816 Signed-off-by: Dave Jones --- drivers/char/agp/generic.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'drivers/char') diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index c39200161688..ca4629f66d17 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c @@ -419,6 +419,31 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_ *requested_mode &= ~AGP2_RESERVED_MASK; } + /* + * Some dumb bridges are programmed to disobey the AGP2 spec. + * This is likely a BIOS misprogramming rather than poweron default, or + * it would be a lot more common. + * https://bugs.freedesktop.org/show_bug.cgi?id=8816 + * AGPv2 spec 6.1.9 states: + * The RATE field indicates the data transfer rates supported by this + * device. A.G.P. devices must report all that apply. + * Fix them up as best we can. + */ + switch (*bridge_agpstat & 7) { + case 4: + *bridge_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X); + printk(KERN_INFO PFX "BIOS bug. AGP bridge claims to only support x4 rate" + "Fixing up support for x2 & x1\n"); + break; + case 2: + *bridge_agpstat |= AGPSTAT2_1X; + printk(KERN_INFO PFX "BIOS bug. AGP bridge claims to only support x2 rate" + "Fixing up support for x1\n"); + break; + default: + break; + } + /* Check the speed bits make sense. Only one should be set. */ tmp = *requested_mode & 7; switch (tmp) { -- cgit v1.2.2 From 0ac633b23db91e48210179e31dd88ad9e9a8aba9 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sun, 19 Nov 2006 18:52:28 -0800 Subject: [AGPGART] agp-amd64: section mismatches with HOTPLUG=n When CONFIG_HOTPLUG=n, agp_amd64_resume() calls nforce3_agp_init(), which is __devinit == __init, so has been discarded and is not usable for resume. WARNING: drivers/char/agp/amd64-agp.o - Section mismatch: reference to .init.text: from .text between 'agp_amd64_resume' (at offset 0x249) and 'amd64_tlbflush' Signed-off-by: Randy Dunlap Signed-off-by: Dave Jones --- drivers/char/agp/amd64-agp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 00b17ae39736..2f2c4efff8a3 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c @@ -459,7 +459,7 @@ static const struct aper_size_info_32 nforce3_sizes[5] = /* Handle shadow device of the Nvidia NForce3 */ /* CHECK-ME original 2.4 version set up some IORRs. Check if that is needed. */ -static int __devinit nforce3_agp_init(struct pci_dev *pdev) +static int nforce3_agp_init(struct pci_dev *pdev) { u32 tmp, apbase, apbar, aplimit; struct pci_dev *dev1; -- cgit v1.2.2 From 0cfea5dd98205f2fa318836da664a7d7df1afbc1 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Mon, 4 Dec 2006 03:43:14 -0700 Subject: [AGPGART] VIA and SiS AGP chipsets are x86-only There's no point in troubling the Alpha, IA-64, PowerPC and PARISC people with SiS and VIA options. Andrew thinks it helps find bugs, but there's no evidence of that. Signed-off-by: Matthew Wilcox Signed-off-by: Dave Jones --- drivers/char/agp/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig index 22f8cf218cc6..3d7cad7841de 100644 --- a/drivers/char/agp/Kconfig +++ b/drivers/char/agp/Kconfig @@ -86,7 +86,7 @@ config AGP_NVIDIA config AGP_SIS tristate "SiS chipset support" - depends on AGP + depends on AGP && X86 help This option gives you AGP support for the GLX component of X on Silicon Integrated Systems [SiS] chipsets. @@ -103,7 +103,7 @@ config AGP_SWORKS config AGP_VIA tristate "VIA chipset support" - depends on AGP + depends on AGP && X86 help This option gives you AGP support for the GLX component of X on VIA MVP3/Apollo Pro chipsets. -- cgit v1.2.2