From: Hyeonseong Gil Date: Thu, 2 Jun 2016 00:54:08 +0000 (+0900) Subject: [COMMON] theraml: gpu_cooling: Skip util normalize power X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=461e53048b5ce5487bb84da6f6802af7a60441ca;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] theraml: gpu_cooling: Skip util normalize power Resolved migration conflicts from kernel 4.9 to 4.14. - rename gpufreq_device -> gpufreq_cdev Change-Id: If0debb54d070a3c5797aa8fc4a7a46b0eaa51004 Signed-off-by: Hyeonseong Gil --- diff --git a/drivers/thermal/gpu_cooling.c b/drivers/thermal/gpu_cooling.c index 3ffa64192ac8..671aef464aa8 100644 --- a/drivers/thermal/gpu_cooling.c +++ b/drivers/thermal/gpu_cooling.c @@ -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);