Skip to content

Commit

Permalink
drm/radeon/kms: Fix R600/RV770 disable acceleration path
Browse files Browse the repository at this point in the history
When acceleration doesn't work we should free associated memory
and stop GPU block responsible for hardware acceleration so we
don't waste resource or let think one component of the driver that
a GPU feature is working/running while it doesn't actualy work.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Oct 1, 2009
1 parent a3c1945 commit 75c8129
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/radeon/r600.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,11 @@ int r600_init(struct radeon_device *rdev)
rdev->flags &= ~RADEON_IS_AGP;
return r600_init(rdev);
}
r600_suspend(rdev);
r600_wb_fini(rdev);
radeon_ib_pool_fini(rdev);
radeon_ring_fini(rdev);
r600_pcie_gart_fini(rdev);
rdev->accel_working = false;
}
if (rdev->accel_working) {
Expand Down
5 changes: 5 additions & 0 deletions drivers/gpu/drm/radeon/rv770.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,11 @@ int rv770_init(struct radeon_device *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;
}
if (rdev->accel_working) {
Expand Down

0 comments on commit 75c8129

Please sign in to comment.