drm/radeon/kms: fix agp mode setup on cards that use pcie bridges
authorAlex Deucher <alexdeucher@gmail.com>
Wed, 18 Aug 2010 17:34:11 +0000 (13:34 -0400)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Aug 2010 22:48:55 +0000 (08:48 +1000)
Asics that use an AGP to PCIE bridge don't have the AGP_STATUS
register so just use whatever mode the host side setup.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: Jerome Glisse <glisse@freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_agp.c

index f40dfb77f9b12cfa75c90c83ec608714f15ae423..bd2f33e5c91a695c2110af95397a6fa33cad0c10 100644 (file)
@@ -156,7 +156,13 @@ int radeon_agp_init(struct radeon_device *rdev)
        }
 
        mode.mode = info.mode;
-       agp_status = (RREG32(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode.mode;
+       /* chips with the agp to pcie bridge don't have the AGP_STATUS register
+        * Just use the whatever mode the host sets up.
+        */
+       if (rdev->family <= CHIP_RV350)
+               agp_status = (RREG32(RADEON_AGP_STATUS) | RADEON_AGPv3_MODE) & mode.mode;
+       else
+               agp_status = mode.mode;
        is_v3 = !!(agp_status & RADEON_AGPv3_MODE);
 
        if (is_v3) {