diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-01-07 10:08:32 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-07 22:10:13 -0500 |
commit | d0269ed8580b492df75dafb011dc51a1390bf200 (patch) | |
tree | d1859b65eeb370fc12da5be63ca809503d0d7150 /drivers/gpu/drm/radeon | |
parent | cafe6609d6dc0a6a278f9fdbb59ce4d761a35ddd (diff) |
drm/radeon/kms: Make sure we release AGP device if we acquired it
In some case we weren't releasing the AGP device at module unloading.
This leaded to unfunctional AGP at next module load. This patch make
sure we release the AGP bus if we acquire it.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_agp.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 3 |
5 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 1a056b774eec..d2b789e67c39 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -3369,6 +3369,7 @@ void r100_fini(struct radeon_device *rdev) | |||
3369 | radeon_gem_fini(rdev); | 3369 | radeon_gem_fini(rdev); |
3370 | if (rdev->flags & RADEON_IS_PCI) | 3370 | if (rdev->flags & RADEON_IS_PCI) |
3371 | r100_pci_gart_fini(rdev); | 3371 | r100_pci_gart_fini(rdev); |
3372 | radeon_agp_fini(rdev); | ||
3372 | radeon_irq_kms_fini(rdev); | 3373 | radeon_irq_kms_fini(rdev); |
3373 | radeon_fence_driver_fini(rdev); | 3374 | radeon_fence_driver_fini(rdev); |
3374 | radeon_bo_fini(rdev); | 3375 | radeon_bo_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index b8623b734a27..0051d11b907c 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -1336,6 +1336,7 @@ void r300_fini(struct radeon_device *rdev) | |||
1336 | rv370_pcie_gart_fini(rdev); | 1336 | rv370_pcie_gart_fini(rdev); |
1337 | if (rdev->flags & RADEON_IS_PCI) | 1337 | if (rdev->flags & RADEON_IS_PCI) |
1338 | r100_pci_gart_fini(rdev); | 1338 | r100_pci_gart_fini(rdev); |
1339 | radeon_agp_fini(rdev); | ||
1339 | radeon_irq_kms_fini(rdev); | 1340 | radeon_irq_kms_fini(rdev); |
1340 | radeon_fence_driver_fini(rdev); | 1341 | radeon_fence_driver_fini(rdev); |
1341 | radeon_bo_fini(rdev); | 1342 | radeon_bo_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index e2f43c184aa9..0c065f425c84 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -2090,8 +2090,7 @@ void r600_fini(struct radeon_device *rdev) | |||
2090 | radeon_gem_fini(rdev); | 2090 | radeon_gem_fini(rdev); |
2091 | radeon_fence_driver_fini(rdev); | 2091 | radeon_fence_driver_fini(rdev); |
2092 | radeon_clocks_fini(rdev); | 2092 | radeon_clocks_fini(rdev); |
2093 | if (rdev->flags & RADEON_IS_AGP) | 2093 | radeon_agp_fini(rdev); |
2094 | radeon_agp_fini(rdev); | ||
2095 | radeon_bo_fini(rdev); | 2094 | radeon_bo_fini(rdev); |
2096 | radeon_atombios_fini(rdev); | 2095 | radeon_atombios_fini(rdev); |
2097 | kfree(rdev->bios); | 2096 | kfree(rdev->bios); |
diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c index 54bf49a6d676..220f454ea9fa 100644 --- a/drivers/gpu/drm/radeon/radeon_agp.c +++ b/drivers/gpu/drm/radeon/radeon_agp.c | |||
@@ -252,10 +252,8 @@ void radeon_agp_resume(struct radeon_device *rdev) | |||
252 | void radeon_agp_fini(struct radeon_device *rdev) | 252 | void radeon_agp_fini(struct radeon_device *rdev) |
253 | { | 253 | { |
254 | #if __OS_HAS_AGP | 254 | #if __OS_HAS_AGP |
255 | if (rdev->flags & RADEON_IS_AGP) { | 255 | if (rdev->ddev->agp && rdev->ddev->agp->acquired) { |
256 | if (rdev->ddev->agp && rdev->ddev->agp->acquired) { | 256 | drm_agp_release(rdev->ddev); |
257 | drm_agp_release(rdev->ddev); | ||
258 | } | ||
259 | } | 257 | } |
260 | #endif | 258 | #endif |
261 | } | 259 | } |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index f58dc6710802..16f7317fa1af 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -1096,8 +1096,7 @@ void rv770_fini(struct radeon_device *rdev) | |||
1096 | radeon_gem_fini(rdev); | 1096 | radeon_gem_fini(rdev); |
1097 | radeon_fence_driver_fini(rdev); | 1097 | radeon_fence_driver_fini(rdev); |
1098 | radeon_clocks_fini(rdev); | 1098 | radeon_clocks_fini(rdev); |
1099 | if (rdev->flags & RADEON_IS_AGP) | 1099 | radeon_agp_fini(rdev); |
1100 | radeon_agp_fini(rdev); | ||
1101 | radeon_bo_fini(rdev); | 1100 | radeon_bo_fini(rdev); |
1102 | radeon_atombios_fini(rdev); | 1101 | radeon_atombios_fini(rdev); |
1103 | kfree(rdev->bios); | 1102 | kfree(rdev->bios); |