drm/radeon/kms: Disable agp only if we are dealing with an AGP GPU
authorJerome Glisse <jglisse@redhat.com>
Mon, 30 Nov 2009 16:47:59 +0000 (17:47 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 2 Dec 2009 01:37:14 +0000 (11:37 +1000)
On IGP if you pass option agpmode=-1 you would overwrite the set_page
function callback with improper function which endup in non functioning
hw. This patch will disable agp when giving agpmode=-1 parameter only
if we are dealing with an AGP GPU.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_device.c

index 41bb76fbe734f282dadbfee6d70ba1e046e6ecee..db0835d9a537fd3dcdca7b4aa28a428150bac489 100644 (file)
@@ -553,7 +553,7 @@ int radeon_device_init(struct radeon_device *rdev,
                return r;
        }
 
-       if (radeon_agpmode == -1) {
+       if (rdev->flags & RADEON_IS_AGP && radeon_agpmode == -1) {
                radeon_agp_disable(rdev);
        }