u32 last_load;
struct power_table *dyn_power_table;
int dyn_power_table_entries;
- get_static_t plat_get_static_power;
int *var_table;
int *var_coeff;
int *asv_coeff;
* @np: a valid struct device_node to the cooling device device tree node
* @clip_gpus: gpumask of gpus where the frequency constraints will happen.
* @capacitance: dynamic power coefficient for these gpus
- * @plat_static_func: function to calculate the static power consumed by these
- * gpus (optional)
*
* This interface function registers the gpufreq cooling device with the name
* "thermal-gpufreq-%x". This api can support multiple instances of gpufreq
*/
static struct thermal_cooling_device *
__gpufreq_cooling_register(struct device_node *np,
- const struct cpumask *clip_gpus, u32 capacitance,
- get_static_t plat_static_func)
+ const struct cpumask *clip_gpus, u32 capacitance)
{
struct thermal_cooling_device *cool_dev;
struct gpufreq_cooling_device *gpufreq_cdev = NULL;
struct thermal_cooling_device *
gpufreq_cooling_register(const struct cpumask *clip_gpus)
{
- return __gpufreq_cooling_register(NULL, clip_gpus, 0, NULL);
+ return __gpufreq_cooling_register(NULL, clip_gpus, 0);
}
EXPORT_SYMBOL_GPL(gpufreq_cooling_register);
if (!np)
return ERR_PTR(-EINVAL);
- return __gpufreq_cooling_register(np, clip_gpus, 0, NULL);
+ return __gpufreq_cooling_register(np, clip_gpus, 0);
}
EXPORT_SYMBOL_GPL(of_gpufreq_cooling_register);
* gpufreq_power_cooling_register() - create gpufreq cooling device with power extensions
* @clip_gpus: gpumask of gpus where the frequency constraints will happen
* @capacitance: dynamic power coefficient for these gpus
- * @plat_static_func: function to calculate the static power consumed by these
- * gpus (optional)
*
* This interface function registers the gpufreq cooling device with
* the name "thermal-gpufreq-%x". This api can support multiple
* simple gpu power model. The gpus must have registered their OPPs
* using the OPP library.
*
- * An optional @plat_static_func may be provided to calculate the
- * static power consumed by these gpus. If the platform's static
- * power consumption is unknown or negligible, make it NULL.
- *
* Return: a valid struct thermal_cooling_device pointer on success,
* on failure, it returns a corresponding ERR_PTR().
*/
struct thermal_cooling_device *
-gpufreq_power_cooling_register(const struct cpumask *clip_gpus, u32 capacitance,
- get_static_t plat_static_func)
+gpufreq_power_cooling_register(const struct cpumask *clip_gpus, u32 capacitance)
{
- return __gpufreq_cooling_register(NULL, clip_gpus, capacitance,
- plat_static_func);
+ return __gpufreq_cooling_register(NULL, clip_gpus, capacitance);
}
EXPORT_SYMBOL(gpufreq_power_cooling_register);
* @np: a valid struct device_node to the cooling device device tree node
* @clip_gpus: gpumask of gpus where the frequency constraints will happen
* @capacitance: dynamic power coefficient for these gpus
- * @plat_static_func: function to calculate the static power consumed by these
- * gpus (optional)
*
* This interface function registers the gpufreq cooling device with
* the name "thermal-gpufreq-%x". This api can support multiple
* extensions by using a simple gpu power model. The gpus must have
* registered their OPPs using the OPP library.
*
- * An optional @plat_static_func may be provided to calculate the
- * static power consumed by these gpus. If the platform's static
- * power consumption is unknown or negligible, make it NULL.
- *
* Return: a valid struct thermal_cooling_device pointer on success,
* on failure, it returns a corresponding ERR_PTR().
*/
struct thermal_cooling_device *
of_gpufreq_power_cooling_register(struct device_node *np,
const struct cpumask *clip_gpus,
- u32 capacitance,
- get_static_t plat_static_func)
+ u32 capacitance)
{
if (!np)
return ERR_PTR(-EINVAL);
- return __gpufreq_cooling_register(np, clip_gpus, capacitance,
- plat_static_func);
+ return __gpufreq_cooling_register(np, clip_gpus, capacitance);
}
EXPORT_SYMBOL(of_gpufreq_power_cooling_register);
}
regist:
- dev = __gpufreq_cooling_register(np, NULL, capacitance, NULL);
+ dev = __gpufreq_cooling_register(np, NULL, capacitance);
if (IS_ERR(dev)) {
pr_err("Fail to register gpufreq cooling\n");
#define GPU_TABLE_END ~1
-typedef int (*get_static_t)(cpumask_t *cpumask, int interval,
- unsigned long voltage, u32 *power);
-
#ifdef CONFIG_GPU_THERMAL
/**
* gpufreq_cooling_register - function to create gpufreq cooling device.
struct thermal_cooling_device *
gpufreq_power_cooling_register(const struct cpumask *clip_gpus,
- u32 capacitance, get_static_t plat_static_func);
+ u32 capacitance);
/**
* of_gpufreq_cooling_register - create gpufreq cooling device based on DT.
struct thermal_cooling_device *
of_gpufreq_power_cooling_register(struct device_node *np,
const struct cpumask *clip_gpus,
- u32 capacitance,
- get_static_t plat_static_func);
+ u32 capacitance);
#else
static inline struct thermal_cooling_device *
of_gpufreq_cooling_register(struct device_node *np,
static inline struct thermal_cooling_device *
of_gpufreq_power_cooling_register(struct device_node *np,
const struct cpumask *clip_gpus,
- u32 capacitance,
- get_static_t plat_static_func)
+ u32 capacitance);
{
return NULL;
}
static inline struct thermal_cooling_device *
gpufreq_power_cooling_register(const struct cpumask *clip_gpus,
- u32 capacitance, get_static_t plat_static_func)
+ u32 capacitance)
{
return NULL;
}
static inline struct thermal_cooling_device *
of_gpufreq_power_cooling_register(struct device_node *np,
const struct cpumask *clip_gpus,
- u32 capacitance,
- get_static_t plat_static_func)
+ u32 capacitance)
{
return NULL;
}