power: remove cam preview hint on 8996

* Not supported by current platform and isn't in HAL anyway.

Change-Id: Ib379c88db7d8159c3d2cfdc3588cc70aa9683182
This commit is contained in:
Jake Weinstein 2016-08-31 13:56:16 -04:00
parent 27b777ed17
commit 1129c81fbd
1 changed files with 0 additions and 65 deletions

View File

@ -49,68 +49,6 @@
static int display_hint_sent;
static int process_cam_preview_hint(void *metadata)
{
char governor[80];
struct cam_preview_metadata_t cam_preview_metadata;
if (get_scaling_governor(governor, sizeof(governor)) == -1) {
ALOGE("Can't obtain scaling governor.");
return HINT_NONE;
}
/* Initialize encode metadata struct fields */
memset(&cam_preview_metadata, 0, sizeof(struct cam_preview_metadata_t));
cam_preview_metadata.state = -1;
cam_preview_metadata.hint_id = CAM_PREVIEW_HINT_ID;
if (metadata) {
if (parse_cam_preview_metadata((char *)metadata, &cam_preview_metadata) ==
-1) {
ALOGE("Error occurred while parsing metadata.");
return HINT_NONE;
}
} else {
return HINT_NONE;
}
if (cam_preview_metadata.state == 1) {
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
/* sched and cpufreq params
* above_hispeed_delay for LVT - 40ms
* go hispeed load for LVT - 95
* hispeed freq for LVT - 556 MHz
* target load for LVT - 90
* above hispeed delay for sLVT - 40ms
* go hispeed load for sLVT - 95
* hispeed freq for sLVT - 556 MHz
* target load for sLVT - 90
* bus DCVS set to V2 config:
* low power ceil mpbs - 2500
* low power io percent - 50
*/
int resource_values[] = {0x41400000, 0x4, 0x41410000, 0x5F, 0x41414000, 0x22C,
0x41420000, 0x5A, 0x41400100, 0x4, 0x41410100, 0x5F, 0x41414100, 0x22C,
0x41420100, 0x5A, 0x41810000, 0x9C4, 0x41814000, 0x32};
perform_hint_action(cam_preview_metadata.hint_id,
resource_values, sizeof(resource_values)/sizeof(resource_values[0]));
ALOGI("Cam Preview hint start");
return HINT_HANDLED;
}
} else if (cam_preview_metadata.state == 0) {
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
undo_hint_action(cam_preview_metadata.hint_id);
ALOGI("Cam Preview hint stop");
return HINT_HANDLED;
}
}
return HINT_NONE;
}
static int process_video_encode_hint(void *metadata)
{
char governor[80];
@ -183,9 +121,6 @@ int power_hint_override(struct power_module *module, power_hint_t hint, void *da
{
int ret_val = HINT_NONE;
switch(hint) {
case POWER_HINT_CAM_PREVIEW:
ret_val = process_cam_preview_hint(data);
break;
case POWER_HINT_VIDEO_ENCODE:
ret_val = process_video_encode_hint(data);
break;