power: Use declared enums where possible
Change-Id: I079490f8ff61bf278dd69eb89b9dae5ce42e6052
This commit is contained in:
22
power-660.c
22
power-660.c
@@ -100,8 +100,10 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
2. BusDCVS V2 params
|
2. BusDCVS V2 params
|
||||||
- Sample_ms of 10ms
|
- Sample_ms of 10ms
|
||||||
*/
|
*/
|
||||||
int resource_values[] = {0x41414000, 0x459, 0x41410000, 0x5F, 0x41400000, 0x4,
|
int resource_values[] = {
|
||||||
0x41420000, 0x5F, 0x40C2C000, 0X5, 0x41820000, 0xA};
|
HISPEED_FREQ_BIG, 0x459, GO_HISPEED_LOAD_BIG, 0x5F,
|
||||||
|
ABOVE_HISPEED_DELAY_BIG, 0x4, TARGET_LOADS_BIG, 0x5F,
|
||||||
|
SCHED_SPILL_NR_RUN, 0X5, CPUBW_HWMON_SAMPLE_MS, 0xA};
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
@@ -117,8 +119,9 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
2. BusDCVS V2 params
|
2. BusDCVS V2 params
|
||||||
- Sample_ms of 10ms
|
- Sample_ms of 10ms
|
||||||
*/
|
*/
|
||||||
int resource_values[] = {0x41414100, 0x386, 0x41410100, 0x5F,
|
int resource_values[] = {
|
||||||
0x41400100, 0x4, 0x41820000, 0xA};
|
HISPEED_FREQ_LITTLE, 0x386, GO_HISPEED_LOAD_LITTLE, 0x5F,
|
||||||
|
ABOVE_HISPEED_DELAY_LITTLE, 0x4, CPUBW_HWMON_SAMPLE_MS, 0xA};
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
@@ -169,8 +172,9 @@ int set_interactive_override(int on) {
|
|||||||
2. BusDCVS V2 params
|
2. BusDCVS V2 params
|
||||||
- Sample_ms of 10ms
|
- Sample_ms of 10ms
|
||||||
*/
|
*/
|
||||||
int resource_values[] = {0x41414000, 0x459, 0x41410000, 0x5F,
|
int resource_values[] = {
|
||||||
0x41400000, 0x4, 0x41820000, 0xA};
|
HISPEED_FREQ_BIG, 0x459, GO_HISPEED_LOAD_BIG, 0x5F,
|
||||||
|
ABOVE_HISPEED_DELAY_BIG, 0x4, CPUBW_HWMON_SAMPLE_MS, 0xA};
|
||||||
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
|
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
} else {
|
} else {
|
||||||
@@ -183,8 +187,10 @@ int set_interactive_override(int on) {
|
|||||||
- Sample_ms of 10ms
|
- Sample_ms of 10ms
|
||||||
3. Sched group upmigrate - 500
|
3. Sched group upmigrate - 500
|
||||||
*/
|
*/
|
||||||
int resource_values[] = {0x41414100, 0x386, 0x41410100, 0x5F, 0x41400100,
|
int resource_values[] = {
|
||||||
0x4, 0x41820000, 0xA, 0x40C54000, 0x1F4};
|
HISPEED_FREQ_LITTLE, 0x386, GO_HISPEED_LOAD_LITTLE, 0x5F,
|
||||||
|
ABOVE_HISPEED_DELAY_LITTLE, 0x4, CPUBW_HWMON_SAMPLE_MS, 0xA,
|
||||||
|
SCHED_GROUP_UP_MIGRATE, 0x1F4};
|
||||||
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
|
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ int power_hint_override(power_hint_t hint, void* data) {
|
|||||||
ret_val = process_perf_hint(data, VR_MODE);
|
ret_val = process_perf_hint(data, VR_MODE);
|
||||||
break;
|
break;
|
||||||
case POWER_HINT_INTERACTION: {
|
case POWER_HINT_INTERACTION: {
|
||||||
int resources[] = {0x40800100, 0x514};
|
int resources[] = {MIN_FREQ_LITTLE_CORE_0, 0x514};
|
||||||
int duration = 100;
|
int duration = 100;
|
||||||
interaction(duration, ARRAY_SIZE(resources), resources);
|
interaction(duration, ARRAY_SIZE(resources), resources);
|
||||||
ret_val = HINT_HANDLED;
|
ret_val = HINT_HANDLED;
|
||||||
|
|||||||
24
power-8937.c
24
power-8937.c
@@ -97,11 +97,20 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
* SLB for Core3 = -6
|
* SLB for Core3 = -6
|
||||||
* hispeed load = 95
|
* hispeed load = 95
|
||||||
* hispeed freq = 998Mhz */
|
* hispeed freq = 998Mhz */
|
||||||
int resource_values[] = {
|
int resource_values[] = {CPUBW_HWMON_SAMPLE_MS,
|
||||||
0x41820000, 0xa, 0x40c68100, 0xfffffffa, 0x40c68110,
|
0xa,
|
||||||
0xfffffffa, 0x40c68120, 0xfffffffa, 0x40c68130, 0xfffffffa,
|
0x40c68100,
|
||||||
0x41440100, 0x5f, 0x4143c100, 0x3e6,
|
0xfffffffa,
|
||||||
};
|
0x40c68110,
|
||||||
|
0xfffffffa,
|
||||||
|
0x40c68120,
|
||||||
|
0xfffffffa,
|
||||||
|
0x40c68130,
|
||||||
|
0xfffffffa,
|
||||||
|
0x41440100,
|
||||||
|
0x5f,
|
||||||
|
0x4143c100,
|
||||||
|
0x3e6};
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
@@ -110,10 +119,7 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* sample_ms = 10mS */
|
/* sample_ms = 10mS */
|
||||||
int resource_values[] = {
|
int resource_values[] = {CPUBW_HWMON_SAMPLE_MS, 0xa};
|
||||||
0x41820000,
|
|
||||||
0xa,
|
|
||||||
};
|
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
|
|||||||
36
power-8953.c
36
power-8953.c
@@ -97,11 +97,20 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
* SLB for Core3 = -6
|
* SLB for Core3 = -6
|
||||||
* hispeed load = 95
|
* hispeed load = 95
|
||||||
* hispeed freq = 1036 */
|
* hispeed freq = 1036 */
|
||||||
int resource_values[] = {
|
int resource_values[] = {CPUBW_HWMON_SAMPLE_MS,
|
||||||
0x41820000, 0xa, 0x40c68100, 0xfffffffa, 0x40c68110,
|
0xa,
|
||||||
0xfffffffa, 0x40c68120, 0xfffffffa, 0x40c68130, 0xfffffffa,
|
0x40c68100,
|
||||||
0x41440100, 0x5f, 0x4143c100, 0x40c,
|
0xfffffffa,
|
||||||
};
|
0x40c68110,
|
||||||
|
0xfffffffa,
|
||||||
|
0x40c68120,
|
||||||
|
0xfffffffa,
|
||||||
|
0x40c68130,
|
||||||
|
0xfffffffa,
|
||||||
|
0x41440100,
|
||||||
|
0x5f,
|
||||||
|
0x4143c100,
|
||||||
|
0x40c};
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
@@ -110,10 +119,7 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* sample_ms = 10mS */
|
/* sample_ms = 10mS */
|
||||||
int resource_values[] = {
|
int resource_values[] = {CPUBW_HWMON_SAMPLE_MS, 0xa};
|
||||||
0x41820000,
|
|
||||||
0xa,
|
|
||||||
};
|
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
@@ -124,9 +130,9 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
} else if (is_interactive_governor(governor)) {
|
} else if (is_interactive_governor(governor)) {
|
||||||
/* Sched_load and migration_notification disable
|
/* Sched_load and migration_notification disable
|
||||||
* timer rate - 40mS*/
|
* timer rate - 40mS*/
|
||||||
int resource_values[] = {
|
int resource_values[] = {INT_OP_CLUSTER0_USE_SCHED_LOAD, 0x1,
|
||||||
0x41430000, 0x1, 0x41434000, 0x1, 0x41424000, 0x28,
|
INT_OP_CLUSTER0_USE_MIGRATION_NOTIF, 0x1,
|
||||||
};
|
INT_OP_CLUSTER0_TIMER_RATE, BIG_LITTLE_TR_MS_40};
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
@@ -167,11 +173,7 @@ int set_interactive_override(int on) {
|
|||||||
if (!on) {
|
if (!on) {
|
||||||
/* Display off */
|
/* Display off */
|
||||||
if (is_interactive_governor(governor)) {
|
if (is_interactive_governor(governor)) {
|
||||||
/* timer rate - 40mS*/
|
int resource_values[] = {INT_OP_CLUSTER0_TIMER_RATE, BIG_LITTLE_TR_MS_40};
|
||||||
int resource_values[] = {
|
|
||||||
0x41424000,
|
|
||||||
0x28,
|
|
||||||
};
|
|
||||||
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
|
perform_hint_action(DISPLAY_STATE_HINT_ID, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
}
|
}
|
||||||
|
|||||||
12
power-8996.c
12
power-8996.c
@@ -180,12 +180,14 @@ static int process_video_encode_hint(void* metadata) {
|
|||||||
* 3. hysteresis optimization
|
* 3. hysteresis optimization
|
||||||
* -bus dcvs hysteresis tuning
|
* -bus dcvs hysteresis tuning
|
||||||
* -sample_ms of 10 ms
|
* -sample_ms of 10 ms
|
||||||
* -sLVT hispeed freq to 806MHz
|
|
||||||
*/
|
*/
|
||||||
int resource_values[] = {0x41400000, 0x4, 0x41410000, 0x5F, 0x41414000, 0x326,
|
int resource_values[] = {
|
||||||
0x41420000, 0x5A, 0x41400100, 0x4, 0x41410100, 0x5F,
|
ABOVE_HISPEED_DELAY_BIG, 0x4, GO_HISPEED_LOAD_BIG, 0x5F,
|
||||||
0x41414100, 0x22C, 0x41420100, 0x5A, 0x41810000, 0x9C4,
|
HISPEED_FREQ_BIG, 0x326, TARGET_LOADS_BIG, 0x5A,
|
||||||
0x41814000, 0x32, 0x4180C000, 0x0, 0x41820000, 0xA};
|
ABOVE_HISPEED_DELAY_LITTLE, 0x4, GO_HISPEED_LOAD_LITTLE, 0x5F,
|
||||||
|
HISPEED_FREQ_LITTLE, 0x22C, TARGET_LOADS_LITTLE, 0x5A,
|
||||||
|
LOW_POWER_CEIL_MBPS, 0x9C4, LOW_POWER_IO_PERCENT, 0x32,
|
||||||
|
CPUBW_HWMON_HYST_OPT, 0x0, CPUBW_HWMON_SAMPLE_MS, 0xA};
|
||||||
if (!video_encode_hint_sent) {
|
if (!video_encode_hint_sent) {
|
||||||
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
perform_hint_action(video_encode_metadata.hint_id, resource_values,
|
||||||
ARRAY_SIZE(resource_values));
|
ARRAY_SIZE(resource_values));
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include <hardware/power.h>
|
#include <hardware/power.h>
|
||||||
#include <log/log.h>
|
#include <log/log.h>
|
||||||
|
|
||||||
|
#include "performance.h"
|
||||||
#include "power-common.h"
|
#include "power-common.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ int power_hint_override(power_hint_t hint, void* data) {
|
|||||||
int ret_val = HINT_NONE;
|
int ret_val = HINT_NONE;
|
||||||
switch (hint) {
|
switch (hint) {
|
||||||
case POWER_HINT_INTERACTION: {
|
case POWER_HINT_INTERACTION: {
|
||||||
int resources[] = {0x40800100, 0x514};
|
int resources[] = {MIN_FREQ_LITTLE_CORE_0, 0x514};
|
||||||
int duration = 100;
|
int duration = 100;
|
||||||
interaction(duration, ARRAY_SIZE(resources), resources);
|
interaction(duration, ARRAY_SIZE(resources), resources);
|
||||||
ret_val = HINT_HANDLED;
|
ret_val = HINT_HANDLED;
|
||||||
|
|||||||
Reference in New Issue
Block a user