Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=28af24bb8470c7d0573b703a2955548b73a6c066
Commit:     28af24bb8470c7d0573b703a2955548b73a6c066
Parent:     18088748d2a493ce9f6adf0be7f833b04041807e
Author:     Dave Jones <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 3 15:13:27 2006 -0500
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Fri Nov 3 15:13:27 2006 -0500

    [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 <[EMAIL PROTECTED]>
---
 drivers/char/agp/generic.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index c392001..ca4629f 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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to