1 /*
2 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
3 * Not a contribution
4 * Copyright (C) 2016 The Android Open Source Project
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 #include "vr_int.h"
20
21 // List thermal configs in format {name, algo_type}
22 // This list is manually synced with the thermal config
23
24 #define THERMAL_CONFIG_SYNCED 1
25
26 #if THERMAL_CONFIG_SYNCED
27
28 #define NUM_NON_VR_CONFIGS 4
29 static thermal_algo_info_t non_vr_thermal_configs[NUM_NON_VR_CONFIGS] =
30 {{.config_name = "SKIN-HIGH-FLOOR", .algo_name = "ss"},
31 {.config_name = "SKIN-MID-FLOOR", .algo_name = "ss"},
32 {.config_name = "SKIN-LOW-FLOOR", .algo_name = "ss"},
33 {.config_name = "VIRTUAL-SS-GPU-SKIN", .algo_name = "ss"}};
34
35 #define NUM_VR_CONFIGS 1
36 static thermal_algo_info_t vr_thermal_configs[NUM_VR_CONFIGS] =
37 {{.config_name = "VR-EMMC", .algo_name = "monitor"}};
38
load_thermal_cfg_info(thermal_cfg_info_t * non_vr,thermal_cfg_info_t * vr)39 int load_thermal_cfg_info(thermal_cfg_info_t *non_vr, thermal_cfg_info_t *vr) {
40 if(!non_vr || !vr)
41 return -1;
42
43 non_vr->num_cfgs = NUM_NON_VR_CONFIGS;
44 non_vr->cfgs = &non_vr_thermal_configs[0];
45
46 vr->num_cfgs = NUM_VR_CONFIGS;
47 vr->cfgs = &vr_thermal_configs[0];
48
49 return 0;
50 }
51
52 #endif
53