Change-Id: Ic5f3947b032deaaa800ee316636a8cc61259ba5d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
+#define ENABLE_DEBUG_LOG
+#include "../../platform/rk/custom_log.h"
+
#include <mali_kbase.h>
#include <mali_kbase_config_defaults.h>
#include <mali_kbase.h>
#include <mali_kbase_config_defaults.h>
stat->private_data = NULL;
stat->private_data = NULL;
-#ifdef CONFIG_DEVFREQ_THERMAL
- if (kbdev->devfreq_cooling)
- memcpy(&kbdev->devfreq_cooling->last_status, stat,
- sizeof(*stat));
-#endif
-
+ I("success initing power_model_simple.");
static unsigned long model_static_power(unsigned long voltage)
{
static unsigned long model_static_power(unsigned long voltage)
{
- unsigned long temperature, temp;
unsigned long temp_squared, temp_cubed, temp_scaling_factor;
const unsigned long voltage_cubed = (voltage * voltage * voltage) >> 10;
unsigned long temp_squared, temp_cubed, temp_scaling_factor;
const unsigned long voltage_cubed = (voltage * voltage * voltage) >> 10;
return (dynamic_coefficient * v2 * f_mhz) / 1000000; /* mW */
}
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,
};
.get_static_power = model_static_power,
.get_dynamic_power = model_dynamic_power,
};
*/
int kbase_power_model_simple_init(struct kbase_device *kbdev);
*/
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_ */
#endif /* _BASE_POWER_MODEL_SIMPLE_H_ */
unsigned long current_freq;
unsigned long current_voltage;
#ifdef CONFIG_DEVFREQ_THERMAL
unsigned long current_freq;
unsigned long current_voltage;
#ifdef CONFIG_DEVFREQ_THERMAL
- struct devfreq_cooling_device *devfreq_cooling;
+ struct thermal_cooling_device *devfreq_cooling;