]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
drm/radeon: properly handle cg on asics without UVD
authorAlex Deucher <alexander.deucher@amd.com>
Sat, 27 Jul 2013 21:53:25 +0000 (17:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jul 2013 22:14:38 +0000 (18:14 -0400)
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>
drivers/gpu/drm/radeon/si.c

index d325280e2f9ffcc94b2260e802f6533c242f6546..1d656f7b13f2c64e4ec98f655bffcc9880ecfcff 100644 (file)
@@ -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);