summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-07-27 17:53:25 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-07-29 18:14:38 -0400
commitb2d70917e4b9fc5bddfbd025bfb1f15185e74971 (patch)
treebea479c9e67cc991306e62b3eb8db58bf452398b /drivers/gpu
parent46348dc29bc936360057e9b41003274284ec0a47 (diff)
downloadop-kernel-dev-b2d70917e4b9fc5bddfbd025bfb1f15185e74971.zip
op-kernel-dev-b2d70917e4b9fc5bddfbd025bfb1f15185e74971.tar.gz
drm/radeon: properly handle cg on asics without UVD
Don't try and enable clockgating if the asic doesn't have UVD. Use rdev->has_uvd rather than using local checks. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/si.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index d325280..1d656f7 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -5215,14 +5215,12 @@ static void si_enable_mc_ls(struct radeon_device *rdev,
static void si_init_cg(struct radeon_device *rdev)
{
- bool has_uvd = true;
-
si_enable_mgcg(rdev, true);
si_enable_cgcg(rdev, true);
/* disable MC LS on Tahiti */
if (rdev->family == CHIP_TAHITI)
si_enable_mc_ls(rdev, false);
- if (has_uvd) {
+ if (rdev->has_uvd) {
si_enable_uvd_mgcg(rdev, true);
si_init_uvd_internal_cg(rdev);
}
@@ -5230,9 +5228,7 @@ static void si_init_cg(struct radeon_device *rdev)
static void si_fini_cg(struct radeon_device *rdev)
{
- bool has_uvd = true;
-
- if (has_uvd)
+ if (rdev->has_uvd)
si_enable_uvd_mgcg(rdev, false);
si_enable_cgcg(rdev, false);
si_enable_mgcg(rdev, false);
OpenPOWER on IntegriCloud