[COMMON] theraml: gpu_cooling: Skip util normalize power
authorHyeonseong Gil <hs.gil@samsung.com>
Thu, 2 Jun 2016 00:54:08 +0000 (09:54 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:01 +0000 (17:13 +0900)
Resolved migration conflicts from kernel 4.9 to 4.14.
- rename gpufreq_device -> gpufreq_cdev

Change-Id: If0debb54d070a3c5797aa8fc4a7a46b0eaa51004
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/thermal/gpu_cooling.c

index 3ffa64192ac8bcf460637c850dc3bc958b31077f..671aef464aa8035a5e88bad414f088d2c6d644db 100644 (file)
@@ -726,7 +726,7 @@ static int gpufreq_power2state(struct thermal_cooling_device *cdev,
        unsigned int cur_freq, target_freq;
        int ret;
        s32 dyn_power;
-       u32 last_load, normalised_power, static_power;
+       u32 static_power;
        struct gpufreq_cooling_device *gpufreq_cdev = cdev->devdata;
 
        cur_freq = gpu_dvfs_get_cur_clock();
@@ -736,9 +736,7 @@ static int gpufreq_power2state(struct thermal_cooling_device *cdev,
 
        dyn_power = power - static_power;
        dyn_power = dyn_power > 0 ? dyn_power : 0;
-       last_load = gpufreq_cdev->last_load ?: 1;
-       normalised_power = (dyn_power * 100) / last_load;
-       target_freq = gpu_power_to_freq(gpufreq_cdev, normalised_power);
+       target_freq = gpu_power_to_freq(gpufreq_cdev, dyn_power);
 
        *state = gpufreq_cooling_get_level(0, target_freq * 1000);
        if (*state == THERMAL_CSTATE_INVALID) {
@@ -759,7 +757,6 @@ static struct thermal_cooling_device_ops gpufreq_cooling_ops = {
        .set_cur_temp = gpufreq_set_cur_temp,
 };
 
-
 int exynos_gpu_add_notifier(struct notifier_block *n)
 {
        return blocking_notifier_chain_register(&gpu_notifier, n);