diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-10-06 13:04:29 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-10-07 19:40:04 -0400 |
commit | b574f251f787c5b163da5ea345525569e51775bc (patch) | |
tree | 8adad6a3934898d8c71567729db0005e2189cd26 /drivers/gpu/drm/radeon/r600.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/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 9f7eb08b30aa..2cef638fa069 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -1560,15 +1560,8 @@ int r600_init(struct radeon_device *rdev) | |||
1560 | if (r) | 1560 | if (r) |
1561 | return r; | 1561 | return r; |
1562 | r = r600_mc_init(rdev); | 1562 | r = r600_mc_init(rdev); |
1563 | if (r) { | 1563 | if (r) |
1564 | if (rdev->flags & RADEON_IS_AGP) { | ||
1565 | /* Retry with disabling AGP */ | ||
1566 | r600_fini(rdev); | ||
1567 | rdev->flags &= ~RADEON_IS_AGP; | ||
1568 | return r600_init(rdev); | ||
1569 | } | ||
1570 | return r; | 1564 | return r; |
1571 | } | ||
1572 | /* Memory manager */ | 1565 | /* Memory manager */ |
1573 | r = radeon_object_init(rdev); | 1566 | r = radeon_object_init(rdev); |
1574 | if (r) | 1567 | if (r) |
@@ -1597,15 +1590,8 @@ int r600_init(struct radeon_device *rdev) | |||
1597 | 1590 | ||
1598 | r = r600_startup(rdev); | 1591 | r = r600_startup(rdev); |
1599 | if (r) { | 1592 | if (r) { |
1600 | if (rdev->flags & RADEON_IS_AGP) { | ||
1601 | /* Retry with disabling AGP */ | ||
1602 | r600_fini(rdev); | ||
1603 | rdev->flags &= ~RADEON_IS_AGP; | ||
1604 | return r600_init(rdev); | ||
1605 | } | ||
1606 | r600_suspend(rdev); | 1593 | r600_suspend(rdev); |
1607 | r600_wb_fini(rdev); | 1594 | r600_wb_fini(rdev); |
1608 | radeon_ib_pool_fini(rdev); | ||
1609 | radeon_ring_fini(rdev); | 1595 | radeon_ring_fini(rdev); |
1610 | r600_pcie_gart_fini(rdev); | 1596 | r600_pcie_gart_fini(rdev); |
1611 | rdev->accel_working = false; | 1597 | rdev->accel_working = false; |
@@ -1637,10 +1623,8 @@ void r600_fini(struct radeon_device *rdev) | |||
1637 | radeon_gem_fini(rdev); | 1623 | radeon_gem_fini(rdev); |
1638 | radeon_fence_driver_fini(rdev); | 1624 | radeon_fence_driver_fini(rdev); |
1639 | radeon_clocks_fini(rdev); | 1625 | radeon_clocks_fini(rdev); |
1640 | #if __OS_HAS_AGP | ||
1641 | if (rdev->flags & RADEON_IS_AGP) | 1626 | if (rdev->flags & RADEON_IS_AGP) |
1642 | radeon_agp_fini(rdev); | 1627 | radeon_agp_fini(rdev); |
1643 | #endif | ||
1644 | radeon_object_fini(rdev); | 1628 | radeon_object_fini(rdev); |
1645 | radeon_atombios_fini(rdev); | 1629 | radeon_atombios_fini(rdev); |
1646 | kfree(rdev->bios); | 1630 | kfree(rdev->bios); |