power: Restore SPM compatibility between the implementations
We need to move our SPM implementation into the switch statement to allow it to co-exist with QC's SPM implementation which is used for msm8998 only as of now. Change-Id: I419afefe714d6b464824be397bbe949b6c8a6470 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
This commit is contained in:
parent
cabbaa5aff
commit
390170a7d5
|
@ -212,22 +212,13 @@ int __attribute__ ((weak)) power_hint_override(struct power_module *module, powe
|
|||
* for Sustained performance mode.
|
||||
*/
|
||||
void __attribute__ ((weak)) toggle_sustained_performance(bool request_enable)
|
||||
{}
|
||||
{
|
||||
ALOGI("Sustained perf power hint not handled in power_hint_override");
|
||||
}
|
||||
|
||||
static void power_hint(struct power_module *module, power_hint_t hint,
|
||||
void *data)
|
||||
{
|
||||
/* Sustained performance mode */
|
||||
if (hint == POWER_HINT_SUSTAINED_PERFORMANCE) {
|
||||
pthread_mutex_lock(&sustained_performance_toggle_lock);
|
||||
|
||||
/* Execute the change in SPM mode */
|
||||
toggle_sustained_performance(data);
|
||||
sustained_performance_mode = data;
|
||||
|
||||
pthread_mutex_unlock(&sustained_performance_toggle_lock);
|
||||
}
|
||||
|
||||
/* Check if this hint has been overridden. */
|
||||
if (power_hint_override(module, hint, data) == HINT_HANDLED) {
|
||||
/* The power_hint has been handled. We can skip the rest. */
|
||||
|
@ -237,9 +228,16 @@ static void power_hint(struct power_module *module, power_hint_t hint,
|
|||
switch(hint) {
|
||||
case POWER_HINT_VSYNC:
|
||||
break;
|
||||
case POWER_HINT_SUSTAINED_PERFORMANCE:
|
||||
ALOGI("Sustained perf power hint not handled in power_hint_override");
|
||||
case POWER_HINT_SUSTAINED_PERFORMANCE: {
|
||||
pthread_mutex_lock(&sustained_performance_toggle_lock);
|
||||
|
||||
/* Execute the change in SPM mode */
|
||||
toggle_sustained_performance(data);
|
||||
sustained_performance_mode = data;
|
||||
|
||||
pthread_mutex_unlock(&sustained_performance_toggle_lock);
|
||||
break;
|
||||
}
|
||||
case POWER_HINT_VR_MODE:
|
||||
ALOGI("VR mode power hint not handled in power_hint_override");
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue