From: Jerome Glisse Date: Thu, 1 Oct 2009 16:02:14 +0000 (+0200) Subject: drm/radeon/kms: Fix R600/RV770 disable acceleration path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=75c8129893d78fd0cbe5c26580cadd6001d904fc;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/radeon/kms: Fix R600/RV770 disable acceleration path 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 Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index cf4be70c5041..e74e7a748b31 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -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) { diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index a06e7497d49e..a04e6ee45947 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c @@ -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) {