diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-10-06 19:04:29 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-10-08 09:40:04 +1000 |
commit | b574f251f787c5b163da5ea345525569e51775bc (patch) | |
tree | 8adad6a3934898d8c71567729db0005e2189cd26 /drivers/gpu/drm/radeon/rv770.c | |
parent | 01ceae8edd7a0a6d8588dc103ad9f55e2c52cae9 (diff) |
drm/radeon/kms: Fallback to non AGP when acceleration fails to initialize (v2)
When GPU acceleration is not working with AGP try to fallback to non
AGP GART (either PCI or PCIE GART). This should make KMS failure on
AGP less painfull. We still need to find out what is wrong when AGP
fails but at least user have a lot of more chances to get a working
configuration with acceleration. This patch also cleanup R600/RV770
fallback path so they use same code as others asics. Version 2
factorize agp disabling logic to avoid code duplication and bugs.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rv770.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 295cf14e3c5..5c597dfa5d4 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c @@ -923,15 +923,8 @@ int rv770_init(struct radeon_device *rdev) if (r) return r; r = rv770_mc_init(rdev); - if (r) { - if (rdev->flags & RADEON_IS_AGP) { - /* Retry with disabling AGP */ - rv770_fini(rdev); - rdev->flags &= ~RADEON_IS_AGP; - return rv770_init(rdev); - } + if (r) return r; - } /* Memory manager */ r = radeon_object_init(rdev); if (r) @@ -960,15 +953,8 @@ int rv770_init(struct radeon_device *rdev) r = rv770_startup(rdev); if (r) { - if (rdev->flags & RADEON_IS_AGP) { - /* Retry with disabling AGP */ - rv770_fini(rdev); - rdev->flags &= ~RADEON_IS_AGP; - return rv770_init(rdev); - } rv770_suspend(rdev); r600_wb_fini(rdev); - radeon_ib_pool_fini(rdev); radeon_ring_fini(rdev); rv770_pcie_gart_fini(rdev); rdev->accel_working = false; @@ -999,10 +985,8 @@ void rv770_fini(struct radeon_device *rdev) radeon_gem_fini(rdev); radeon_fence_driver_fini(rdev); radeon_clocks_fini(rdev); -#if __OS_HAS_AGP if (rdev->flags & RADEON_IS_AGP) radeon_agp_fini(rdev); -#endif radeon_object_fini(rdev); radeon_atombios_fini(rdev); kfree(rdev->bios); |