]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/gpu/drm/radeon/si_dpm.c
drm/radeon/dpm: adjust thermal protection requirements
[linux-imx.git] / drivers / gpu / drm / radeon / si_dpm.c
index 7ad22e87cd62aab0e4d990de3a72641c29310e55..dc06e433048a6a99dcc3bd71110634ee15c8e8c2 100644 (file)
@@ -1767,7 +1767,7 @@ static void si_calculate_leakage_for_v_and_t_formula(const struct ni_leakage_coe
        s64 temperature, t_slope, t_intercept, av, bv, t_ref;
        s64 tmp;
 
-       i_leakage = drm_int2fixp(ileakage) / 100;
+       i_leakage = div64_s64(drm_int2fixp(ileakage), 100);
        vddc = div64_s64(drm_int2fixp(v), 1000);
        temperature = div64_s64(drm_int2fixp(t), 1000);
 
@@ -6366,8 +6366,7 @@ int si_dpm_init(struct radeon_device *rdev)
        eg_pi->sclk_deep_sleep = true;
        si_pi->sclk_deep_sleep_above_low = false;
 
-       if (pi->gfx_clock_gating &&
-           (rdev->pm.int_thermal_type != THERMAL_TYPE_NONE))
+       if (rdev->pm.int_thermal_type != THERMAL_TYPE_NONE)
                pi->thermal_protection = true;
        else
                pi->thermal_protection = false;