drm/radeon: fix copy paste typos in fan control for si/ci
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Dec 2014 22:18:53 +0000 (17:18 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Dec 2014 23:26:51 +0000 (18:26 -0500)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/ci_dpm.c
drivers/gpu/drm/radeon/si_dpm.c

index 3f898d020ae691f9bc38b482fec6a77a05a44843..a42f0eceffc8af44f9ea9c2f105708f165ae0eb6 100644 (file)
@@ -937,7 +937,7 @@ static void ci_fan_ctrl_set_static_mode(struct radeon_device *rdev, u32 mode)
        tmp |= TMIN(0);
        WREG32_SMC(CG_FDO_CTRL2, tmp);
 
-       tmp = RREG32_SMC(CG_FDO_CTRL2) & FDO_PWM_MODE_MASK;
+       tmp = RREG32_SMC(CG_FDO_CTRL2) & ~FDO_PWM_MODE_MASK;
        tmp |= FDO_PWM_MODE(mode);
        WREG32_SMC(CG_FDO_CTRL2, tmp);
 }
@@ -1162,7 +1162,7 @@ static int ci_fan_ctrl_set_fan_speed_rpm(struct radeon_device *rdev,
        tmp |= TARGET_PERIOD(tach_period);
        WREG32_SMC(CG_TACH_CTRL, tmp);
 
-       ci_fan_ctrl_set_static_mode(rdev, FDO_PWM_MODE_STATIC);
+       ci_fan_ctrl_set_static_mode(rdev, FDO_PWM_MODE_STATIC_RPM);
 
        return 0;
 }
@@ -1178,7 +1178,7 @@ static void ci_fan_ctrl_set_default_mode(struct radeon_device *rdev)
                tmp |= FDO_PWM_MODE(pi->fan_ctrl_default_mode);
                WREG32_SMC(CG_FDO_CTRL2, tmp);
 
-               tmp = RREG32_SMC(CG_FDO_CTRL2) & TMIN_MASK;
+               tmp = RREG32_SMC(CG_FDO_CTRL2) & ~TMIN_MASK;
                tmp |= TMIN(pi->t_min);
                WREG32_SMC(CG_FDO_CTRL2, tmp);
                pi->fan_ctrl_is_in_default_mode = true;
index cf4c420b55727083696a589631b0ac405b5567fc..32e354b8b0aba6b96cfc8e94b1519b7fca4f47fb 100644 (file)
@@ -5893,7 +5893,7 @@ static void si_fan_ctrl_set_static_mode(struct radeon_device *rdev, u32 mode)
        tmp |= TMIN(0);
        WREG32(CG_FDO_CTRL2, tmp);
 
-       tmp = RREG32(CG_FDO_CTRL2) & FDO_PWM_MODE_MASK;
+       tmp = RREG32(CG_FDO_CTRL2) & ~FDO_PWM_MODE_MASK;
        tmp |= FDO_PWM_MODE(mode);
        WREG32(CG_FDO_CTRL2, tmp);
 }
@@ -6098,7 +6098,7 @@ static int si_fan_ctrl_set_fan_speed_rpm(struct radeon_device *rdev,
        tmp |= TARGET_PERIOD(tach_period);
        WREG32(CG_TACH_CTRL, tmp);
 
-       si_fan_ctrl_set_static_mode(rdev, FDO_PWM_MODE_STATIC);
+       si_fan_ctrl_set_static_mode(rdev, FDO_PWM_MODE_STATIC_RPM);
 
        return 0;
 }
@@ -6114,7 +6114,7 @@ static void si_fan_ctrl_set_default_mode(struct radeon_device *rdev)
                tmp |= FDO_PWM_MODE(si_pi->fan_ctrl_default_mode);
                WREG32(CG_FDO_CTRL2, tmp);
 
-               tmp = RREG32(CG_FDO_CTRL2) & TMIN_MASK;
+               tmp = RREG32(CG_FDO_CTRL2) & ~TMIN_MASK;
                tmp |= TMIN(si_pi->t_min);
                WREG32(CG_FDO_CTRL2, tmp);
                si_pi->fan_ctrl_is_in_default_mode = true;