forked from rubenslte/android_kernel_samsung_msm8226
PM / devfreq: Allow the governors to set the target flag
The devfreq framework calls a frequency targeting function with a flag parameter. Allow the governors to influence that parameter. Change-Id: I4058bd9dcd027dd246ccdb90d25c68f1dc055901 Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
This commit is contained in:
@@ -187,7 +187,7 @@ int update_devfreq(struct devfreq *devfreq)
|
||||
return -EINVAL;
|
||||
|
||||
/* Reevaluate the proper frequency */
|
||||
err = devfreq->governor->get_target_freq(devfreq, &freq);
|
||||
err = devfreq->governor->get_target_freq(devfreq, &freq, &flags);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
@@ -64,7 +64,8 @@ static int __secure_tz_entry3(u32 cmd, u32 val1, u32 val2, u32 val3)
|
||||
}
|
||||
|
||||
|
||||
static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq)
|
||||
static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq,
|
||||
u32 *flag)
|
||||
{
|
||||
int result = 0;
|
||||
struct devfreq_msm_adreno_tz_data *priv = devfreq->data;
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
#include "governor.h"
|
||||
|
||||
static int devfreq_performance_func(struct devfreq *df,
|
||||
unsigned long *freq)
|
||||
unsigned long *freq,
|
||||
u32 *flag)
|
||||
{
|
||||
/*
|
||||
* target callback should be able to get floor value as
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
#include "governor.h"
|
||||
|
||||
static int devfreq_powersave_func(struct devfreq *df,
|
||||
unsigned long *freq)
|
||||
unsigned long *freq,
|
||||
u32 *flag)
|
||||
{
|
||||
/*
|
||||
* target callback should be able to get ceiling value as
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
#define DFSO_UPTHRESHOLD (90)
|
||||
#define DFSO_DOWNDIFFERENCTIAL (5)
|
||||
static int devfreq_simple_ondemand_func(struct devfreq *df,
|
||||
unsigned long *freq)
|
||||
unsigned long *freq,
|
||||
u32 *flag)
|
||||
{
|
||||
struct devfreq_dev_status stat;
|
||||
int err = df->profile->get_dev_status(df->dev.parent, &stat);
|
||||
|
||||
@@ -22,7 +22,8 @@ struct userspace_data {
|
||||
bool valid;
|
||||
};
|
||||
|
||||
static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq)
|
||||
static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq,
|
||||
u32 *flag)
|
||||
{
|
||||
struct userspace_data *data = df->data;
|
||||
|
||||
|
||||
@@ -132,7 +132,8 @@ struct devfreq_governor {
|
||||
struct list_head node;
|
||||
|
||||
const char name[DEVFREQ_NAME_LEN];
|
||||
int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
|
||||
int (*get_target_freq)(struct devfreq *this, unsigned long *freq,
|
||||
u32 *flag);
|
||||
int (*event_handler)(struct devfreq *devfreq,
|
||||
unsigned int event, void *data);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user