MALI: rockchip: adjust code about thermal for kernel 4.4

Change-Id: Ic5f3947b032deaaa800ee316636a8cc61259ba5d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
This commit is contained in:
chenzhen
2016-04-18 16:18:17 +08:00
committed by Gerrit Code Review
parent e6b6ba524b
commit c2ce740bf6
4 changed files with 8 additions and 10 deletions

View File

@@ -14,6 +14,9 @@
*/
#define ENABLE_DEBUG_LOG
#include "../../platform/rk/custom_log.h"
#include <mali_kbase.h>
#include <mali_kbase_config_defaults.h>
@@ -132,12 +135,6 @@ kbase_devfreq_status(struct device *dev, struct devfreq_dev_status *stat)
stat->private_data = NULL;
#ifdef CONFIG_DEVFREQ_THERMAL
if (kbdev->devfreq_cooling)
memcpy(&kbdev->devfreq_cooling->last_status, stat,
sizeof(*stat));
#endif
return 0;
}
@@ -256,6 +253,7 @@ int kbase_devfreq_init(struct kbase_device *kbdev)
} else {
err = 0;
}
I("success initing power_model_simple.");
#endif
return 0;

View File

@@ -36,7 +36,7 @@ static struct thermal_zone_device *gpu_tz;
static unsigned long model_static_power(unsigned long voltage)
{
unsigned long temperature, temp;
int temperature, temp;
unsigned long temp_squared, temp_cubed, temp_scaling_factor;
const unsigned long voltage_cubed = (voltage * voltage * voltage) >> 10;
@@ -85,7 +85,7 @@ static unsigned long model_dynamic_power(unsigned long freq,
return (dynamic_coefficient * v2 * f_mhz) / 1000000; /* mW */
}
struct devfreq_cooling_ops power_model_simple_ops = {
struct devfreq_cooling_power power_model_simple_ops = {
.get_static_power = model_static_power,
.get_dynamic_power = model_dynamic_power,
};

View File

@@ -38,6 +38,6 @@
*/
int kbase_power_model_simple_init(struct kbase_device *kbdev);
extern struct devfreq_cooling_ops power_model_simple_ops;
extern struct devfreq_cooling_power power_model_simple_ops;
#endif /* _BASE_POWER_MODEL_SIMPLE_H_ */

View File

@@ -944,7 +944,7 @@ struct kbase_device {
unsigned long current_freq;
unsigned long current_voltage;
#ifdef CONFIG_DEVFREQ_THERMAL
struct devfreq_cooling_device *devfreq_cooling;
struct thermal_cooling_device *devfreq_cooling;
#endif
#endif