From 869d41ef922ca99401ecd1721833c4eb73752b7f Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 2 Feb 2017 19:48:14 +0900 Subject: [PATCH 01/16] pass: gov: Add new pass_gov_dummy governor for unmonitored resources This patchs add the new 'pass_gov_dummy' governor which doesn't contain the govenory policy to decide the next level. Some resource don't need to monitor the resource status peridically and to decide the next level according to the utilization. This dummy governor just initialize the resource. Change-Id: Icdf25902e9656ebb6587f430b30ee8c21475de47 Signed-off-by: Chanwoo Choi --- src/pass/pass-gov.c | 12 ++++++++++++ src/pass/pass.h | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/pass/pass-gov.c b/src/pass/pass-gov.c index 2b62584..d8ecab0 100644 --- a/src/pass/pass-gov.c +++ b/src/pass/pass-gov.c @@ -189,6 +189,8 @@ struct pass_hotplug* pass_get_hotplug(struct pass_policy *policy, struct pass_hotplug *hotplug; switch (type) { + case PASS_GOV_DUMMY: + return NULL; case PASS_GOV_STEP: case PASS_GOV_RADIATION: hotplug = calloc(1, sizeof(struct pass_hotplug)); @@ -649,6 +651,14 @@ int pass_governor_change_level_scope(struct pass_policy *policy, * - Step governor * - Radiation governor */ +static struct pass_governor pass_gov_dummy = { + .name = "pass_dummy", + .init = __pass_governor_init, + .exit = __pass_governor_exit, + .update = __pass_governor_update, + .governor = NULL, +}; + static struct pass_governor pass_gov_step = { .name = "pass_step", .init = __pass_governor_init, @@ -676,6 +686,8 @@ struct pass_governor* pass_get_governor(struct pass_policy *policy, enum pass_gov_type type) { switch (type) { + case PASS_GOV_DUMMY: + return &pass_gov_dummy; case PASS_GOV_STEP: return &pass_gov_step; case PASS_GOV_RADIATION: diff --git a/src/pass/pass.h b/src/pass/pass.h index 7c74536..b30a79e 100644 --- a/src/pass/pass.h +++ b/src/pass/pass.h @@ -51,8 +51,9 @@ enum pass_state { * PASS Governor type */ enum pass_gov_type { - PASS_GOV_STEP, - PASS_GOV_RADIATION, + PASS_GOV_DUMMY = 0, + PASS_GOV_STEP = 1, + PASS_GOV_RADIATION = 2, PASS_GOV_END, }; -- 2.7.4 From 689c6f4def27e4fe7491d23c26798d31f8cfb914 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 2 Feb 2017 20:18:20 +0900 Subject: [PATCH 02/16] pass: pmqos: Rename the min/max level property of scenario section This patch renames the min/max level property in 'Scenario(x)' section as following: - cpufreq_min_level -> min_level - cpufreq_max_level -> max_level It means that if 'Scenario(x)' section contains the minimum/maximum level property according to each scenario. The renamed property don't depend on the any specific h/w resource. Change-Id: I61ec570a5d607bacc63270d0a72a5196057ee392 Signed-off-by: Chanwoo Choi --- src/pass/pass-parser.c | 16 ++++------------ src/pass/pass-pmqos.c | 25 +++++++++---------------- src/pass/pass.h | 10 ++-------- 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/src/pass/pass-parser.c b/src/pass/pass-parser.c index b6500a3..cc5fbe4 100644 --- a/src/pass/pass-parser.c +++ b/src/pass/pass-parser.c @@ -98,18 +98,10 @@ static int pass_parse_scenario(struct parse_result *result, void *user_data, scenario->list[index].state = is_supported(result->value); if (scenario->list[index].state < 0) return -EINVAL; - } else if (MATCH(result->name, "cpufreq_min_level")) { - scenario->list[index].cpufreq_min_level = atoi(result->value); - } else if (MATCH(result->name, "cpufreq_max_level")) { - scenario->list[index].cpufreq_max_level = atoi(result->value); - } else if (MATCH(result->name, "busfreq_min_level")) { - scenario->list[index].busfreq_min_level = atoi(result->value); - } else if (MATCH(result->name, "busfreq_max_level")) { - scenario->list[index].busfreq_max_level = atoi(result->value); - } else if (MATCH(result->name, "gpufreq_min_level")) { - scenario->list[index].gpufreq_min_level = atoi(result->value); - } else if (MATCH(result->name, "gpufreq_max_level")) { - scenario->list[index].gpufreq_max_level = atoi(result->value); + } else if (MATCH(result->name, "min_level")) { + scenario->list[index].min_level = atoi(result->value); + } else if (MATCH(result->name, "max_level")) { + scenario->list[index].max_level = atoi(result->value); } return 0; diff --git a/src/pass/pass-pmqos.c b/src/pass/pass-pmqos.c index a589d3c..6d23fc7 100644 --- a/src/pass/pass-pmqos.c +++ b/src/pass/pass-pmqos.c @@ -117,8 +117,8 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) struct pass_scenario *scn = NULL; enum pass_state locked = PASS_UNUSED; char name[PASS_NAME_LEN] = {""}; - unsigned int cpufreq_min_level = 0; - unsigned int cpufreq_max_level = 0; + unsigned int min_level = 0; + unsigned int max_level = 0; int count = 0; int index = -1; int i; @@ -168,24 +168,20 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) struct pass_scenario *scn = &scenario->list[i]; if (is_scenario_locked(scn)) { - if (scn->cpufreq_min_level > cpufreq_min_level) - cpufreq_min_level = scn->cpufreq_min_level; - if (scn->cpufreq_max_level > cpufreq_max_level) - cpufreq_max_level = scn->cpufreq_max_level; + if (scn->min_level > min_level) + min_level = scn->min_level; + if (scn->max_level > max_level) + max_level = scn->max_level; count++; } - - /* - * TODO: PASS have to control busfreq/gpufreq as same as cpufreq - */ } /* * Restore default min/max level if all scenarios hasn't locked state. */ if (!is_scenario_locked(scn) && !count) { - cpufreq_min_level = policy->default_min_level; - cpufreq_max_level = policy->default_max_level; + min_level = policy->default_min_level; + max_level = policy->default_max_level; } if (locked) { @@ -197,10 +193,7 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) (pass_get_time_ms() - scenario->list[index].locked_time)); } - pass_governor_change_level_scope(policy, cpufreq_min_level, - cpufreq_max_level); - - /* TODO: PASS have to control busfreq/gpufreq as same as cpufreq. */ + pass_governor_change_level_scope(policy, min_level, max_level); return 0; } diff --git a/src/pass/pass.h b/src/pass/pass.h index b30a79e..a2f0eb3 100644 --- a/src/pass/pass.h +++ b/src/pass/pass.h @@ -183,14 +183,8 @@ struct pass_scenario { enum pass_state locked; int64_t locked_time; - unsigned int cpufreq_min_level; - unsigned int cpufreq_max_level; - - unsigned int busfreq_min_level; - unsigned int busfreq_max_level; - - unsigned int gpufreq_min_level; - unsigned int gpufreq_max_level; + unsigned int min_level; + unsigned int max_level; }; struct pass_scenario_policy { -- 2.7.4 From fc6779609463be45ef442e0dcaf49ef114f6e008 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 2 Feb 2017 20:32:06 +0900 Subject: [PATCH 03/16] pass: pmqos: Show the resource name when lock/unlock the scenario This patch just shows the resource name when locking or unlocking the scenario for debug. For example, Lock 'AppLaunch' scenario for 'cpu0' resource Lock 'AppLaunch' scenario for 'cpu4' resource Lock 'AppLaunch' scenario for 'soc:memory_bus@0' resource Lock 'AppLaunch' scenario for 'soc:memory_bus@1' resource Lock 'AppLaunch' scenario for '14ac0000.mali' resource Change-Id: I5e2e990b6fd354f20c07b83ba5bb489e149178a0 Signed-off-by: Chanwoo Choi --- src/pass/pass-pmqos.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pass/pass-pmqos.c b/src/pass/pass-pmqos.c index 6d23fc7..0edfaec 100644 --- a/src/pass/pass-pmqos.c +++ b/src/pass/pass-pmqos.c @@ -113,6 +113,8 @@ static int find_scenario_index(struct pass_scenario_policy *scenario, */ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) { + struct pass_resource *pass_res = to_pass_resource(policy); + struct pass_conf_data *cdata = &pass_res->cdata; struct pass_scenario_policy *scenario = &policy->scenario; struct pass_scenario *scn = NULL; enum pass_state locked = PASS_UNUSED; @@ -185,11 +187,13 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data) } if (locked) { - _I("Lock '%s' scenario\n", name); + _I("Lock '%s' scenario for '%s' resource\n", + name, cdata->res_name); } else { scenario->list[index].locked_time = 0; - _I("UnLock '%s' scenario (%lldms)\n", name, + _I("UnLock '%s' scenario for '%s' resource (%lldms)\n", + name, cdata->res_name, (pass_get_time_ms() - scenario->list[index].locked_time)); } -- 2.7.4 From b8cafa7a5d7f690e494d6f58d8e22c650aee6edd Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 2 Feb 2017 17:35:31 +0900 Subject: [PATCH 04/16] pass: conf: Add new configuration for bus/gpu's resource This patch adds the new configuration file for bus/gpu's resource for TM2. The configuration will move to pass-hal-(board name) package. - pass-cluser2-bus0.conf - pass-cluser3-bus1.conf - pass-cluser4-gpu.conf And this patch change the section name to remove the dependency on specific h/w type as following: - 'CpufreqLevel' -> 'Level' In the 'Scenario(x)' section: - 'cpufreq_min_level' -> 'min_level' - 'cpufreq_max_level' -> 'max_level' Change-Id: Ie11d713a30c4fab9193cebb1bab9863349487c86 Signed-off-by: Chanwoo Choi --- CMakeLists.txt | 3 + packaging/pass.spec | 3 + src/pass/pass-cluster0.conf | 65 +++++++------------- src/pass/pass-cluster1.conf | 81 +++++++++--------------- src/pass/pass-cluster2.conf | 143 +++++++++++++++++++++++++++++++++++++++++++ src/pass/pass-cluster3.conf | 146 ++++++++++++++++++++++++++++++++++++++++++++ src/pass/pass-cluster4.conf | 146 ++++++++++++++++++++++++++++++++++++++++++++ src/pass/pass-micro.conf | 46 +++++++------- src/pass/pass.conf | 17 +++++- 9 files changed, 532 insertions(+), 118 deletions(-) create mode 100644 src/pass/pass-cluster2.conf create mode 100644 src/pass/pass-cluster3.conf create mode 100644 src/pass/pass-cluster4.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f1ac38..b2b683a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,6 +155,9 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/${PROJECT_NAME}.conf DESTINATI INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass.conf DESTINATION /etc/pass) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster0.conf DESTINATION /etc/pass) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster1.conf DESTINATION /etc/pass) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster2.conf DESTINATION /etc/pass) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster3.conf DESTINATION /etc/pass) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster4.conf DESTINATION /etc/pass) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pmqos/pmqos.conf DESTINATION /etc/pass) CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) diff --git a/packaging/pass.spec b/packaging/pass.spec index ba24cf2..d87e4dd 100644 --- a/packaging/pass.spec +++ b/packaging/pass.spec @@ -114,6 +114,9 @@ systemctl daemon-reload %config %{_sysconfdir}/pass/pass.conf %config %{_sysconfdir}/pass/pass-cluster0.conf %config %{_sysconfdir}/pass/pass-cluster1.conf +%config %{_sysconfdir}/pass/pass-cluster2.conf +%config %{_sysconfdir}/pass/pass-cluster3.conf +%config %{_sysconfdir}/pass/pass-cluster4.conf %config %{_sysconfdir}/pass/pmqos.conf %{_bindir}/%{daemon_name} %{_unitdir}/multi-user.target.wants/%{daemon_name}.service diff --git a/src/pass/pass-cluster0.conf b/src/pass/pass-cluster0.conf index e64e14e..f4276e4 100644 --- a/src/pass/pass-cluster0.conf +++ b/src/pass/pass-cluster0.conf @@ -1,7 +1,7 @@ [Pass] pass_compatible=samsung,tm2 pass_support=1 -pass_gov_type=1 +pass_gov_type=2 pass_num_levels=12 pass_init_level=4 @@ -17,7 +17,7 @@ pass_num_cpu_stats=20 pass_level_up_threshold=1 pass_governor_timeout=0.4 -[CpufreqLevel0] +[Level0] limit_max_freq=1000000 limit_max_cpu=1 num_down_cond=0 @@ -28,7 +28,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel1] +[Level1] limit_max_freq=1000000 limit_max_cpu=2 num_down_cond=0 @@ -41,7 +41,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel2] +[Level2] limit_max_freq=1000000 limit_max_cpu=3 num_down_cond=0 @@ -54,7 +54,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel3] +[Level3] limit_max_freq=1000000 limit_max_cpu=4 num_down_cond=0 @@ -65,7 +65,7 @@ num_left_cond_nr_running=300 num_left_cond_busy_cpu=3 num_right_cond=0 -[CpufreqLevel4] +[Level4] limit_max_freq=1200000 limit_max_cpu=1 num_down_cond=1 @@ -77,7 +77,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel5] +[Level5] limit_max_freq=1200000 limit_max_cpu=2 num_down_cond=1 @@ -91,7 +91,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel6] +[Level6] limit_max_freq=1200000 limit_max_cpu=3 num_down_cond=1 @@ -105,7 +105,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel7] +[Level7] limit_max_freq=1200000 limit_max_cpu=4 num_down_cond=1 @@ -117,7 +117,7 @@ num_left_cond_nr_running=300 num_left_cond_busy_cpu=3 num_right_cond=0 -[CpufreqLevel8] +[Level8] limit_max_freq=1300000 limit_max_cpu=1 num_down_cond=1 @@ -129,7 +129,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel9] +[Level9] limit_max_freq=1300000 limit_max_cpu=2 num_down_cond=1 @@ -143,7 +143,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel10] +[Level10] limit_max_freq=1300000 limit_max_cpu=3 num_down_cond=1 @@ -157,7 +157,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel11] +[Level11] limit_max_freq=1300000 limit_max_cpu=4 num_down_cond=1 @@ -180,8 +180,8 @@ pass_num_scenarios=28 name=AppLaunch support=yes -cpufreq_min_level=3 -cpufreq_max_level=3 +min_level=9 +max_level=11 [Scenario1] name=MtpSendFile @@ -201,24 +201,15 @@ support=no [Scenario5] name=CameraPreview -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario6] name=CameraBurstShot -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario7] name=CameraCaptureAtRec -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario8] name=Browser @@ -282,10 +273,7 @@ support=no [Scenario23] name=WebappLaunch -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario24] name=ImageViewer @@ -293,21 +281,12 @@ support=no [Scenario25] name=PowerOff -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario26] name=ProcessCrashed -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario27] name=SVoice -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no diff --git a/src/pass/pass-cluster1.conf b/src/pass/pass-cluster1.conf index 014dff5..f9213e4 100644 --- a/src/pass/pass-cluster1.conf +++ b/src/pass/pass-cluster1.conf @@ -1,7 +1,7 @@ [Pass] pass_compatible=samsung,tm2 pass_support=1 -pass_gov_type=1 +pass_gov_type=2 pass_num_levels=20 pass_init_level=4 @@ -17,7 +17,7 @@ pass_num_cpu_stats=20 pass_level_up_threshold=1 pass_governor_timeout=0.4 -[CpufreqLevel0] +[Level0] limit_max_freq=1000000 limit_max_cpu=1 num_down_cond=0 @@ -28,7 +28,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel1] +[Level1] limit_max_freq=1000000 limit_max_cpu=2 num_down_cond=0 @@ -41,7 +41,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel2] +[Level2] limit_max_freq=1000000 limit_max_cpu=3 num_down_cond=0 @@ -54,7 +54,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel3] +[Level3] limit_max_freq=1000000 limit_max_cpu=4 num_down_cond=0 @@ -65,7 +65,7 @@ num_left_cond_nr_running=300 num_left_cond_busy_cpu=3 num_right_cond=0 -[CpufreqLevel4] +[Level4] limit_max_freq=1200000 limit_max_cpu=1 num_down_cond=1 @@ -77,7 +77,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel5] +[Level5] limit_max_freq=1200000 limit_max_cpu=2 num_down_cond=1 @@ -91,7 +91,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel6] +[Level6] limit_max_freq=1200000 limit_max_cpu=3 num_down_cond=1 @@ -105,7 +105,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel7] +[Level7] limit_max_freq=1200000 limit_max_cpu=4 num_down_cond=1 @@ -117,7 +117,7 @@ num_left_cond_nr_running=300 num_left_cond_busy_cpu=3 num_right_cond=0 -[CpufreqLevel8] +[Level8] limit_max_freq=1300000 limit_max_cpu=1 num_down_cond=1 @@ -129,7 +129,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel9] +[Level9] limit_max_freq=1300000 limit_max_cpu=2 num_down_cond=1 @@ -143,7 +143,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel10] +[Level10] limit_max_freq=1300000 limit_max_cpu=3 num_down_cond=1 @@ -157,7 +157,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel11] +[Level11] limit_max_freq=1300000 limit_max_cpu=4 num_down_cond=1 @@ -169,7 +169,7 @@ num_left_cond_nr_running=300 num_left_cond_busy_cpu=3 num_right_cond=0 -[CpufreqLevel12] +[Level12] limit_max_freq=1500000 limit_max_cpu=1 num_down_cond=1 @@ -181,7 +181,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel13] +[Level13] limit_max_freq=1500000 limit_max_cpu=2 num_down_cond=1 @@ -195,7 +195,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel14] +[Level14] limit_max_freq=1500000 limit_max_cpu=3 num_down_cond=1 @@ -209,7 +209,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel15] +[Level15] limit_max_freq=1500000 limit_max_cpu=4 num_down_cond=1 @@ -221,7 +221,7 @@ num_left_cond_nr_running=300 num_left_cond_busy_cpu=3 num_right_cond=0 -[CpufreqLevel16] +[Level16] limit_max_freq=1700000 limit_max_cpu=1 num_down_cond=1 @@ -232,7 +232,7 @@ num_right_cond=1 num_right_cond_nr_running=100 num_right_cond_busy_cpu=1 -[CpufreqLevel17] +[Level17] limit_max_freq=1700000 limit_max_cpu=2 num_down_cond=1 @@ -245,7 +245,7 @@ num_right_cond=1 num_right_cond_nr_running=200 num_right_cond_busy_cpu=2 -[CpufreqLevel18] +[Level18] limit_max_freq=1700000 limit_max_cpu=3 num_down_cond=1 @@ -258,7 +258,7 @@ num_right_cond=1 num_right_cond_nr_running=300 num_right_cond_busy_cpu=3 -[CpufreqLevel19] +[Level19] limit_max_freq=1700000 limit_max_cpu=4 num_down_cond=1 @@ -280,8 +280,8 @@ pass_num_scenarios=28 name=AppLaunch support=yes -cpufreq_min_level=3 -cpufreq_max_level=3 +min_level=9 +max_level=11 [Scenario1] name=MtpSendFile @@ -301,24 +301,15 @@ support=no [Scenario5] name=CameraPreview -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario6] name=CameraBurstShot -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario7] name=CameraCaptureAtRec -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario8] name=Browser @@ -382,10 +373,7 @@ support=no [Scenario23] name=WebappLaunch -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario24] name=ImageViewer @@ -393,21 +381,12 @@ support=no [Scenario25] name=PowerOff -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario26] name=ProcessCrashed -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no [Scenario27] name=SVoice -support=yes - -cpufreq_min_level=3 -cpufreq_max_level=3 +support=no diff --git a/src/pass/pass-cluster2.conf b/src/pass/pass-cluster2.conf new file mode 100644 index 0000000..25d4454 --- /dev/null +++ b/src/pass/pass-cluster2.conf @@ -0,0 +1,143 @@ +[Pass] +pass_compatible=samsung,tm2 +pass_support=1 +pass_gov_type=0 + +pass_num_levels=4 +pass_init_level=0 +pass_min_level=0 +pass_max_level=3 + +[Level0] +limit_min_freq=100000000 + +[Level1] +limit_min_freq=267000000 + +[Level2] +limit_min_freq=334000000 + +[Level3] +limit_min_freq=400000000 + +############################ +### Add list of scenario ### +############################ +[PassScenario] +pass_scenario_support=yes +pass_num_scenarios=28 + +[Scenario0] +name=AppLaunch +support=yes + +min_level=3 +max_level=3 + +[Scenario1] +name=MtpSendFile +support=no + +[Scenario2] +name=PowerSaving +support=no + +[Scenario3] +name=LowBattery +support=no + +[Scenario4] +name=Emergency +support=no + +[Scenario5] +name=CameraPreview +support=no + +[Scenario6] +name=CameraBurstShot +support=no + +[Scenario7] +name=CameraCaptureAtRec +support=no + +[Scenario8] +name=Browser +support=no + +[Scenario9] +name=BrowserDash +support=no + +[Scenario10] +name=BrowserJavaScript +support=no + +[Scenario11] +name=BrowserLoading +support=no + +[Scenario12] +name=BrowserScroll +support=no + +[Scenario13] +name=GpuWakeup +support=no + +[Scenario14] +name=WifiThroughput +support=no + +[Scenario15] +name=SmemoZoom +support=no + +[Scenario16] +name=IMEInput +support=no + +[Scenario17] +name=CallSound +support=no + +[Scenario18] +name=LockScreen +support=no + +[Scenario19] +name=GalleryRotation +support=no + +[Scenario20] +name=ReservedMode +support=no + +[Scenario21] +name=GetDefaultLockTime +support=no + +[Scenario22] +name=GpuBoost +support=no + +[Scenario23] +name=WebappLaunch +support=no + +[Scenario24] +name=ImageViewer +support=no + +[Scenario25] +name=PowerOff +support=no + +[Scenario26] +name=ProcessCrashed +support=no + +[Scenario27] +name=SVoice +support=no diff --git a/src/pass/pass-cluster3.conf b/src/pass/pass-cluster3.conf new file mode 100644 index 0000000..ae09cc0 --- /dev/null +++ b/src/pass/pass-cluster3.conf @@ -0,0 +1,146 @@ +[Pass] +pass_compatible=samsung,tm2 +pass_support=1 +pass_gov_type=0 + +pass_num_levels=5 +pass_init_level=0 +pass_min_level=0 +pass_max_level=4 + +[Level0] +limit_min_freq=78000000 + +[Level1] +limit_min_freq=413000000 + +[Level2] +limit_min_freq=543000000 + +[Level3] +limit_min_freq=667000000 + +[Level4] +limit_min_freq=825000000 + +############################ +### Add list of scenario ### +############################ +[PassScenario] +pass_scenario_support=yes +pass_num_scenarios=28 + +[Scenario0] +name=AppLaunch +support=yes + +min_level=4 +max_level=4 + +[Scenario1] +name=MtpSendFile +support=no + +[Scenario2] +name=PowerSaving +support=no + +[Scenario3] +name=LowBattery +support=no + +[Scenario4] +name=Emergency +support=no + +[Scenario5] +name=CameraPreview +support=no + +[Scenario6] +name=CameraBurstShot +support=no + +[Scenario7] +name=CameraCaptureAtRec +support=no + +[Scenario8] +name=Browser +support=no + +[Scenario9] +name=BrowserDash +support=no + +[Scenario10] +name=BrowserJavaScript +support=no + +[Scenario11] +name=BrowserLoading +support=no + +[Scenario12] +name=BrowserScroll +support=no + +[Scenario13] +name=GpuWakeup +support=no + +[Scenario14] +name=WifiThroughput +support=no + +[Scenario15] +name=SmemoZoom +support=no + +[Scenario16] +name=IMEInput +support=no + +[Scenario17] +name=CallSound +support=no + +[Scenario18] +name=LockScreen +support=no + +[Scenario19] +name=GalleryRotation +support=no + +[Scenario20] +name=ReservedMode +support=no + +[Scenario21] +name=GetDefaultLockTime +support=no + +[Scenario22] +name=GpuBoost +support=no + +[Scenario23] +name=WebappLaunch +support=no + +[Scenario24] +name=ImageViewer +support=no + +[Scenario25] +name=PowerOff +support=no + +[Scenario26] +name=ProcessCrashed +support=no + +[Scenario27] +name=SVoice +support=no diff --git a/src/pass/pass-cluster4.conf b/src/pass/pass-cluster4.conf new file mode 100644 index 0000000..91d8aae --- /dev/null +++ b/src/pass/pass-cluster4.conf @@ -0,0 +1,146 @@ +[Pass] +pass_compatible=samsung,tm2 +pass_support=1 +pass_gov_type=0 + +pass_num_levels=5 +pass_init_level=0 +pass_min_level=0 +pass_max_level=4 + +[Level0] +limit_min_freq=160000000 + +[Level1] +limit_min_freq=500000000 + +[Level2] +limit_min_freq=550000000 + +[Level3] +limit_min_freq=600000000 + +[Level4] +limit_min_freq=700000000 + +############################ +### Add list of scenario ### +############################ +[PassScenario] +pass_scenario_support=yes +pass_num_scenarios=28 + +[Scenario0] +name=AppLaunch +support=yes + +min_level=4 +max_level=4 + +[Scenario1] +name=MtpSendFile +support=no + +[Scenario2] +name=PowerSaving +support=no + +[Scenario3] +name=LowBattery +support=no + +[Scenario4] +name=Emergency +support=no + +[Scenario5] +name=CameraPreview +support=no + +[Scenario6] +name=CameraBurstShot +support=no + +[Scenario7] +name=CameraCaptureAtRec +support=no + +[Scenario8] +name=Browser +support=no + +[Scenario9] +name=BrowserDash +support=no + +[Scenario10] +name=BrowserJavaScript +support=no + +[Scenario11] +name=BrowserLoading +support=no + +[Scenario12] +name=BrowserScroll +support=no + +[Scenario13] +name=GpuWakeup +support=no + +[Scenario14] +name=WifiThroughput +support=no + +[Scenario15] +name=SmemoZoom +support=no + +[Scenario16] +name=IMEInput +support=no + +[Scenario17] +name=CallSound +support=no + +[Scenario18] +name=LockScreen +support=no + +[Scenario19] +name=GalleryRotation +support=no + +[Scenario20] +name=ReservedMode +support=no + +[Scenario21] +name=GetDefaultLockTime +support=no + +[Scenario22] +name=GpuBoost +support=no + +[Scenario23] +name=WebappLaunch +support=no + +[Scenario24] +name=ImageViewer +support=no + +[Scenario25] +name=PowerOff +support=no + +[Scenario26] +name=ProcessCrashed +support=no + +[Scenario27] +name=SVoice +support=no diff --git a/src/pass/pass-micro.conf b/src/pass/pass-micro.conf index ac68745..48ce2de 100644 --- a/src/pass/pass-micro.conf +++ b/src/pass/pass-micro.conf @@ -2,7 +2,7 @@ pass_compatible=samsung,tizen-w pass_support=1 -pass_gov_type=0 +pass_gov_type=1 pass_num_levels=6 pass_min_level=0 pass_max_level=5 @@ -17,7 +17,7 @@ pass_level_up_threshold=1 pass_governor_timeout=0.4 -[CpufreqLevel0] +[Level0] limit_max_freq=600000 limit_max_cpu=1 @@ -29,7 +29,7 @@ num_up_cond_busy_cpu=1 num_left_cond=0 num_right_cond=0 -[CpufreqLevel1] +[Level1] limit_max_freq=700000 limit_max_cpu=1 @@ -44,7 +44,7 @@ num_up_cond_busy_cpu=1 num_left_cond=0 num_right_cond=0 -[CpufreqLevel2] +[Level2] limit_max_freq=800000 limit_max_cpu=1 @@ -59,7 +59,7 @@ num_up_cond_busy_cpu=1 num_left_cond=0 num_right_cond=0 -[CpufreqLevel3] +[Level3] limit_max_freq=700000 limit_max_cpu=2 @@ -74,7 +74,7 @@ num_up_cond_busy_cpu=2 num_left_cond=0 num_right_cond=0 -[CpufreqLevel4] +[Level4] limit_max_freq=700000 limit_max_cpu=2 @@ -89,7 +89,7 @@ num_up_cond_busy_cpu=2 num_left_cond=0 num_right_cond=0 -[CpufreqLevel5] +[Level5] limit_max_freq=800000 limit_max_cpu=2 @@ -112,8 +112,8 @@ pass_num_scenarios=28 name=AppLaunch support=yes -cpufreq_min_level=5 -cpufreq_max_level=5 +min_level=5 +max_level=5 [Scenario1] name=MtpSendFile @@ -135,22 +135,22 @@ support=no name=CameraPreview support=yes -cpufreq_min_level=3 -cpufreq_max_level=5 +min_level=3 +max_level=5 [Scenario6] name=CameraBurstShot support=yes -cpufreq_min_level=3 -cpufreq_max_level=5 +min_level=3 +max_level=5 [Scenario7] name=CameraCaptureAtRec support=yes -cpufreq_min_level=3 -cpufreq_max_level=5 +min_level=3 +max_level=5 [Scenario8] name=Browser @@ -216,8 +216,8 @@ support=no name=WebappLaunch support=yes -cpufreq_min_level=3 -cpufreq_max_level=5 +min_level=3 +max_level=5 [Scenario24] name=ImageViewer @@ -227,19 +227,19 @@ support=no name=PowerOff support=yes -cpufreq_min_level=5 -cpufreq_max_level=5 +min_level=5 +max_level=5 [Scenario26] name=ProcessCrashed support=yes -cpufreq_min_level=5 -cpufreq_max_level=5 +min_level=5 +max_level=5 [Scenario27] name=SVoice support=yes -cpufreq_min_level=5 -cpufreq_max_level=5 +min_level=5 +max_level=5 diff --git a/src/pass/pass.conf b/src/pass/pass.conf index 6e196cc..ab76f6d 100644 --- a/src/pass/pass.conf +++ b/src/pass/pass.conf @@ -3,7 +3,7 @@ # new 'pass-[target type].conf' configuration file. [PassResource] pass_compatible=samsung,tm2 -pass_num_resources=2 +pass_num_resources=5 [PassResource0] pass_res_type=1 @@ -20,3 +20,18 @@ pass_path_conf_file=/etc/pass/pass-cluster1.conf pass_path_load_table=/sys/kernel/debug/cpufreq/cpu4/load_table pass_first_cpu=4 pass_num_cpus=4 + +[PassResource2] +pass_res_type=2 +pass_res_name=soc:memory_bus@0 +pass_path_conf_file=/etc/pass/pass-cluster2.conf + +[PassResource3] +pass_res_type=2 +pass_res_name=soc:memory_bus@1 +pass_path_conf_file=/etc/pass/pass-cluster3.conf + +[PassResource4] +pass_res_type=3 +pass_res_name=14ac0000.mali +pass_path_conf_file=/etc/pass/pass-cluster4.conf -- 2.7.4 From b424d6915d6eb22c8c95d5937adde8d25616ea5f Mon Sep 17 00:00:00 2001 From: Wook Song Date: Thu, 2 Feb 2017 20:47:01 +0900 Subject: [PATCH 05/16] pass: hal: Fix bug in resource name generation This patch fixes a bug in the procedure of generating resource name. Change-Id: I01505b7da21e32c843399317782b7fdd9aa54b90 Signed-off-by: Wook Song --- src/pass/pass-hal.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pass/pass-hal.c b/src/pass/pass-hal.c index 085f249..88c1d9a 100644 --- a/src/pass/pass-hal.c +++ b/src/pass/pass-hal.c @@ -379,6 +379,7 @@ int pass_get_resource(struct pass *pass) { struct pass_resource_info *info; int i, ret; + int len; for (i = 0; i < pass->num_resources; i++) { struct pass_resource *pass_res = &pass->res[i]; @@ -388,22 +389,24 @@ int pass_get_resource(struct pass *pass) switch (res_type) { case PASS_RESOURCE_CPU_ID: - strncpy(name, PASS_RESOURCE_CPU_NAME, - strlen(PASS_RESOURCE_CPU_NAME)); + len = strlen(PASS_RESOURCE_CPU_NAME); + strncpy(name, PASS_RESOURCE_CPU_NAME, len); break; case PASS_RESOURCE_BUS_ID: - strncpy(name, PASS_RESOURCE_BUS_NAME, - strlen(PASS_RESOURCE_BUS_NAME)); + len = strlen(PASS_RESOURCE_BUS_NAME); + strncpy(name, PASS_RESOURCE_BUS_NAME, len); break; case PASS_RESOURCE_GPU_ID: - strncpy(name, PASS_RESOURCE_GPU_NAME, - strlen(PASS_RESOURCE_GPU_NAME)); + len = strlen(PASS_RESOURCE_GPU_NAME); + strncpy(name, PASS_RESOURCE_GPU_NAME, len); break; default: _E("Unsupported resource type (type: %d)\n", res_type); return -EINVAL; }; + name[len] = '\0'; + ret = pass_get_hw_info(name, (const struct pass_resource_info **)&info); if (ret < 0) { -- 2.7.4 From 27bc482502d55acb13c53aba8511569dc80036f7 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Thu, 2 Feb 2017 20:55:32 +0900 Subject: [PATCH 06/16] hal: Add macros for 16/32-bit tag generation This patch adds several macros to generate 16-bit or 32-bit tags, which can be used for identification variables. Change-Id: Id633df8f784adf9c0f8d7528f49b35c5b51ab9ea Signed-off-by: Wook Song --- src/hal/hal.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hal/hal.h b/src/hal/hal.h index f41c622..b8651fa 100644 --- a/src/hal/hal.h +++ b/src/hal/hal.h @@ -20,9 +20,16 @@ #include #include +#define MAKE_2B_CODE_2(A,B) \ + ((((A) & 0xff) << 8) | ((B) & 0xff)) +#define MAKE_2B_CODE_4(A,B,C,D) \ + ((((A) & 0xf) << 12) | (((B) & 0xf) << 8) | \ + (((C) & 0xf) << 4) | (((D) & 0xf))) +#define MAKE_4B_CODE_4(A,B,C,D) \ + ((((A) & 0xff) << 24) | (((B) & 0xff) << 16) | \ + (((C) & 0xff) << 8) | (((D) & 0xff))) +#define MAKE_TAG_CONSTANT(A,B,C,D) MAKE_4B_CODE_4(A,B,C,D) -#define MAKE_TAG_CONSTANT(A,B,C,D) \ - (((A) << 24) | ((B) << 16) | ((C) << 8) | (D)) #define HARDWARE_INFO_TAG MAKE_TAG_CONSTANT('T','H','I','T') #define MAKE_VERSION(maj,min) ((((maj) & 0xff) << 8) | ((min) & 0xff)) -- 2.7.4 From 209b1a84bab124c8d7f0ea1b4d60af52cd43d742 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Fri, 3 Feb 2017 08:02:33 +0900 Subject: [PATCH 07/16] pass: Change the usage of the term "hardware" This patch changes most of the usage of the term "hardware" to the usage of the term "hal". Change-Id: I2bab96ec6d77ae4a8058e30baf01c223e3856d80 Signed-off-by: Wook Song --- src/hal/hal-cpu-example.c | 6 +++--- src/hal/hal.c | 4 ++-- src/hal/hal.h | 20 ++++++++++---------- src/pass/pass-hal.c | 24 ++++++++++++------------ src/pass/pass.h | 10 +++++----- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/hal/hal-cpu-example.c b/src/hal/hal-cpu-example.c index 7faaf25..bc3896a 100644 --- a/src/hal/hal-cpu-example.c +++ b/src/hal/hal-cpu-example.c @@ -159,9 +159,9 @@ static int pass_close(struct pass_resource_common *common) return 0; } -HARDWARE_MODULE_STRUCTURE = { - .magic = HARDWARE_INFO_TAG, - .hal_version = HARDWARE_INFO_VERSION, +HAL_MODULE_STRUCTURE = { + .magic = HAL_INFO_TAG, + .hal_version = HAL_INFO_VERSION, .device_version = HARDWARE_INFO_VERSION_CPU, .id = PASS_RESOURCE_CPU_ID, .name = PASS_RESOURCE_CPU_NAME, diff --git a/src/hal/hal.c b/src/hal/hal.c index 3988a42..708a77a 100644 --- a/src/hal/hal.c +++ b/src/hal/hal.c @@ -41,7 +41,7 @@ #define STRINGIZE(s) STRINGIZE2(s) EXPORT -int pass_get_hw_info(const char *name, const struct pass_resource_info **info) +int pass_get_hal_info(const char *name, const struct pass_resource_info **info) { char path[PATH_MAX]; void *handle; @@ -64,7 +64,7 @@ int pass_get_hw_info(const char *name, const struct pass_resource_info **info) goto error; } - it = dlsym(handle, STRINGIZE(HARDWARE_INFO_SYM)); + it = dlsym(handle, STRINGIZE(HAL_INFO_SYM)); if (!it) { _E("fail to find symbol : %s", dlerror()); goto error; diff --git a/src/hal/hal.h b/src/hal/hal.h index b8651fa..de7883d 100644 --- a/src/hal/hal.h +++ b/src/hal/hal.h @@ -30,18 +30,18 @@ (((C) & 0xff) << 8) | (((D) & 0xff))) #define MAKE_TAG_CONSTANT(A,B,C,D) MAKE_4B_CODE_4(A,B,C,D) -#define HARDWARE_INFO_TAG MAKE_TAG_CONSTANT('T','H','I','T') +#define HAL_INFO_TAG MAKE_TAG_CONSTANT('T','H','I','T') #define MAKE_VERSION(maj,min) ((((maj) & 0xff) << 8) | ((min) & 0xff)) /* Version of the struct pass_hw_info */ -#define HARDWARE_INFO_VERSION MAKE_VERSION(0,1) +#define HAL_INFO_VERSION MAKE_VERSION(0,1) #define HARDWARE_INFO_VERSION_CPU MAKE_VERSION(0,1) #define HARDWARE_INFO_VERSION_BUS MAKE_VERSION(0,1) #define HARDWARE_INFO_VERSION_GPU MAKE_VERSION(0,1) -/* Name of the hardware info symbolic (Tizen Hardware Info) */ -#define HARDWARE_INFO_SYM TizenHwInfo +/* Name of the HAL info symbolic (Tizen Hardware Info) */ +#define HAL_INFO_SYM TizenHwInfo #define PASS_RESOURCE_UNKNOWN 0 #define PASS_RESOURCE_CPU_ID 1 @@ -61,7 +61,7 @@ struct pass_resource_common; /* * pass_resource_info - Define the information structure for the resource. * - * @magic : magic must be initialized to HARDWARE_INFO_TAG + * @magic : magic must be initialized to HAL_INFO_TAG * @hal_version : HAL version * @device_version: device version * @id : device id, can have the following value. @@ -177,18 +177,18 @@ struct pass_resource_gpu { struct pass_resource_tmu_ops tmu; }; -int pass_get_hw_info(const char *id, const struct pass_resource_info **info); +int pass_get_hal_info(const char *id, const struct pass_resource_info **info); /** - * Structure define of hardware info module + * Structure define of HAL info module * - * All hardware module should be use below define to make a specific + * All HAL module should be use below define to make a specific * structure for Tizen HAL. pass_get_resource_info function * will load a pass_resource_data structure by using TizenHwInfo name * at runtime. TizenHwInfo means Tizen Hardware Info. */ -#define HARDWARE_MODULE_STRUCTURE \ +#define HAL_MODULE_STRUCTURE \ __attribute__ ((visibility("default"))) \ - struct pass_resource_info HARDWARE_INFO_SYM + struct pass_resource_info HAL_INFO_SYM #endif /* _PASS_HAL_H_ */ diff --git a/src/pass/pass-hal.c b/src/pass/pass-hal.c index 88c1d9a..248ef80 100644 --- a/src/pass/pass-hal.c +++ b/src/pass/pass-hal.c @@ -33,13 +33,13 @@ static struct pass_resource_dvfs_ops *get_dvfs(struct pass_resource *res, int id switch (id) { case PASS_RESOURCE_CPU_ID: - dvfs = &(res->hw.cpu->dvfs); + dvfs = &(res->hal.cpu->dvfs); break; case PASS_RESOURCE_BUS_ID: - dvfs = &(res->hw.bus->dvfs); + dvfs = &(res->hal.bus->dvfs); break; case PASS_RESOURCE_GPU_ID: - dvfs = &(res->hw.gpu->dvfs); + dvfs = &(res->hal.gpu->dvfs); break; } @@ -52,13 +52,13 @@ static struct pass_resource_tmu_ops *get_tmu(struct pass_resource *res, int id) switch (id) { case PASS_RESOURCE_CPU_ID: - tmu = &(res->hw.cpu->tmu); + tmu = &(res->hal.cpu->tmu); break; case PASS_RESOURCE_BUS_ID: - tmu = &(res->hw.bus->tmu); + tmu = &(res->hal.bus->tmu); break; case PASS_RESOURCE_GPU_ID: - tmu = &(res->hw.gpu->tmu); + tmu = &(res->hal.gpu->tmu); break; } @@ -72,7 +72,7 @@ static struct pass_resource_hotplug_ops *get_hotplug(struct pass_resource *res, switch (id) { case PASS_RESOURCE_CPU_ID: - hotplug = &(res->hw.cpu->hotplug); + hotplug = &(res->hal.cpu->hotplug); break; case PASS_RESOURCE_BUS_ID: case PASS_RESOURCE_GPU_ID: @@ -407,10 +407,10 @@ int pass_get_resource(struct pass *pass) name[len] = '\0'; - ret = pass_get_hw_info(name, + ret = pass_get_hal_info(name, (const struct pass_resource_info **)&info); if (ret < 0) { - _E("Failed to get h/w info\n"); + _E("Failed to get hal info\n"); return -EINVAL; } @@ -422,15 +422,15 @@ int pass_get_resource(struct pass *pass) switch (res_type) { case PASS_RESOURCE_CPU_ID: ret = info->open(info, - (struct pass_resource_common**)&pass_res->hw.cpu); + (struct pass_resource_common**)&pass_res->hal.cpu); break; case PASS_RESOURCE_BUS_ID: ret = info->open(info, - (struct pass_resource_common**)&pass_res->hw.bus); + (struct pass_resource_common**)&pass_res->hal.bus); break; case PASS_RESOURCE_GPU_ID: ret = info->open(info, - (struct pass_resource_common**)&pass_res->hw.gpu); + (struct pass_resource_common**)&pass_res->hal.gpu); break; }; diff --git a/src/pass/pass.h b/src/pass/pass.h index a2f0eb3..331f566 100644 --- a/src/pass/pass.h +++ b/src/pass/pass.h @@ -270,10 +270,10 @@ struct pass_conf_data { * struct pass_resource - Represent the each h/w resource. * * @cdata: the parsed data from configuration file (pass.conf). - * @hw: the resource instance of each h/w resource from pass_get_hw_info(). - * - If res_type of cdata is PASS_RESOURCE_CPU_ID, hw.cpu will be used. - * - If res_type of cdata is PASS_RESOURCE_BUS_ID, hw.bus will be used. - * - If res_type of cdata is PASS_RESOURCE_GPU_ID, hw.gpu will be used. + * @hal: the hal instance of each h/w resource from pass_get_hal_info(). + * - If res_type of cdata is PASS_RESOURCE_CPU_ID, hal.cpu will be used. + * - If res_type of cdata is PASS_RESOURCE_BUS_ID, hal.bus will be used. + * - If res_type of cdata is PASS_RESOURCE_GPU_ID, hal.gpu will be used. * @policy: the policy data to handle the h/w resource */ struct pass_resource { @@ -284,7 +284,7 @@ struct pass_resource { struct pass_resource_cpu *cpu; struct pass_resource_bus *bus; struct pass_resource_gpu *gpu; - } hw; + } hal; }; struct pass { -- 2.7.4 From 045a70d2c7e203c3f5f036088217b9b5c3db64e0 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Fri, 3 Feb 2017 08:27:41 +0900 Subject: [PATCH 08/16] hal: Change the symbolic name of the HAL info This patch changes the symbolic name of the HAL info from TizenHardwareInfo to PassHalInfo. Accordingly, HAL_INFO_TAG is also changed. Change-Id: I8fca63caff647655c8ab562227897a94976b61fd Signed-off-by: Wook Song --- src/hal/hal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hal/hal.h b/src/hal/hal.h index de7883d..9dd89c1 100644 --- a/src/hal/hal.h +++ b/src/hal/hal.h @@ -30,7 +30,7 @@ (((C) & 0xff) << 8) | (((D) & 0xff))) #define MAKE_TAG_CONSTANT(A,B,C,D) MAKE_4B_CODE_4(A,B,C,D) -#define HAL_INFO_TAG MAKE_TAG_CONSTANT('T','H','I','T') +#define HAL_INFO_TAG MAKE_TAG_CONSTANT('P','H','I','T') #define MAKE_VERSION(maj,min) ((((maj) & 0xff) << 8) | ((min) & 0xff)) /* Version of the struct pass_hw_info */ @@ -40,8 +40,8 @@ #define HARDWARE_INFO_VERSION_BUS MAKE_VERSION(0,1) #define HARDWARE_INFO_VERSION_GPU MAKE_VERSION(0,1) -/* Name of the HAL info symbolic (Tizen Hardware Info) */ -#define HAL_INFO_SYM TizenHwInfo +/* Symbolic name of the HAL info (PASS HAL Info) */ +#define HAL_INFO_SYM PassHalInfo #define PASS_RESOURCE_UNKNOWN 0 #define PASS_RESOURCE_CPU_ID 1 -- 2.7.4 From 7f831fc4f07c8060b68333e978bf1577784843a3 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Fri, 3 Feb 2017 09:08:15 +0900 Subject: [PATCH 09/16] hal: Use proper header for dlog message display This patch changes the log header file used in hal to the proper ont for dlog message display. Change-Id: I8d20dad5e4447904f21c7a15911d358cb76baab7 Signed-off-by: Wook Song --- src/hal/hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hal/hal.c b/src/hal/hal.c index 708a77a..7f8bee6 100644 --- a/src/hal/hal.c +++ b/src/hal/hal.c @@ -25,7 +25,7 @@ #include #include "hal.h" -#include "shared/log-macro.h" +#include "shared/log.h" #ifndef EXPORT #define EXPORT __attribute__ ((visibility("default"))) -- 2.7.4 From 13cb56d7ad33c4b60aa551179ee5eb59f50b107b Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Fri, 3 Feb 2017 09:51:16 +0900 Subject: [PATCH 10/16] pmqos: Add new scenario name for MessageScroll/SIOP/UltraPowerSaving This patch just adds the new scenario name as following: - MessageScroll - SIOP - UltraPowerSaving Change-Id: I7778fa6d50ce635e32fe0b996bd8fb6d3b160f0f Signed-off-by: Chanwoo Choi --- src/pmqos/pmqos.c | 3 +++ src/pmqos/pmqos.conf | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/pmqos/pmqos.c b/src/pmqos/pmqos.c index 2fed4a2..63ff6b6 100644 --- a/src/pmqos/pmqos.c +++ b/src/pmqos/pmqos.c @@ -409,6 +409,9 @@ static const struct edbus_method edbus_methods[] = { { "TizenStoreScroll", "i", "i", dbus_pmqos_handler }, { "CallLogScroll", "i", "i", dbus_pmqos_handler }, { "MyfilesScroll", "i", "i", dbus_pmqos_handler }, + { "MessageScroll", "i", "i", dbus_pmqos_handler }, + { "SIOP", "i", "i", dbus_pmqos_handler }, + { "UltraPowerSaving", "i", "i", dbus_pmqos_handler }, }; static int booting_done(void *data, void *user_data) diff --git a/src/pmqos/pmqos.conf b/src/pmqos/pmqos.conf index 788c3d1..ffeeb64 100644 --- a/src/pmqos/pmqos.conf +++ b/src/pmqos/pmqos.conf @@ -7,7 +7,7 @@ # set to "yes" scenario_support (Default value is no) # set scenario_num to be tested scenario_support=yes -scenario_num=49 +scenario_num=52 # describe the scenario section as follows #[Scenario0] @@ -208,3 +208,15 @@ support=yes [Scenario48] name=MyfilesScroll support=yes + +[Scenario49] +name=MessageScroll +support=yes + +[Scenario50] +name=SIOP +support=yes + +[Scenario51] +name=UltraPowerSaving +support=yes -- 2.7.4 From 588e83c67a0027ae212bc58fd557a5b512364d14 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Fri, 3 Feb 2017 10:36:23 +0900 Subject: [PATCH 11/16] pass: conf: Update the supported sceanio list for each resource This patch updates the all configuration files to add the supported scenaio and the following nine scenarios are supported. - AppLaunch - AppLaunchHome - BrowserJavaScript - EmailScroll - TizenStoreScroll - CallLogScroll - MyfilesScroll - MessageScroll Change-Id: I19c72a6607b725d86e6390f790bdbe0cdec575e7 Signed-off-by: Chanwoo Choi --- src/pass/pass-cluster0.conf | 175 ++++++++++++++++++++++++++++++++++++------- src/pass/pass-cluster1.conf | 179 ++++++++++++++++++++++++++++++++++++-------- src/pass/pass-cluster2.conf | 175 ++++++++++++++++++++++++++++++++++++------- src/pass/pass-cluster3.conf | 175 ++++++++++++++++++++++++++++++++++++------- src/pass/pass-cluster4.conf | 179 ++++++++++++++++++++++++++++++++++++-------- 5 files changed, 734 insertions(+), 149 deletions(-) diff --git a/src/pass/pass-cluster0.conf b/src/pass/pass-cluster0.conf index f4276e4..f77a751 100644 --- a/src/pass/pass-cluster0.conf +++ b/src/pass/pass-cluster0.conf @@ -174,7 +174,7 @@ num_right_cond=0 ############################ [PassScenario] pass_scenario_support=yes -pass_num_scenarios=28 +pass_num_scenarios=52 [Scenario0] name=AppLaunch @@ -184,109 +184,226 @@ min_level=9 max_level=11 [Scenario1] -name=MtpSendFile -support=no +name=AppLaunchHome +support=yes + +min_level=9 +max_level=11 [Scenario2] -name=PowerSaving +name=BeautyShot support=no [Scenario3] -name=LowBattery +name=Browser support=no [Scenario4] -name=Emergency +name=BrowserDash support=no [Scenario5] -name=CameraPreview -support=no +name=BrowserJavaScript +support=yes + +min_level=9 +max_level=11 [Scenario6] -name=CameraBurstShot +name=BrowserLoading support=no [Scenario7] -name=CameraCaptureAtRec +name=BrowserScroll support=no [Scenario8] -name=Browser +name=CallSound support=no [Scenario9] -name=BrowserDash +name=CameraBurstShot support=no [Scenario10] -name=BrowserJavaScript +name=CameraCaptureAtRec support=no [Scenario11] -name=BrowserLoading +name=CameraPreview support=no [Scenario12] -name=BrowserScroll +name=CameraSoundAndShot support=no [Scenario13] -name=GpuWakeup +name=ContactSearch support=no [Scenario14] -name=WifiThroughput +name=Emergency support=no [Scenario15] -name=SmemoZoom +name=GalleryScroll support=no [Scenario16] -name=IMEInput +name=GalleryRotation support=no [Scenario17] -name=CallSound +name=GetDefaultLockTime support=no [Scenario18] -name=LockScreen +name=GpsSerialCno support=no [Scenario19] -name=GalleryRotation +name=GpuBoost support=no [Scenario20] -name=ReservedMode +name=GpuWakeup support=no [Scenario21] -name=GetDefaultLockTime +name=HomeScreen support=no [Scenario22] -name=GpuBoost +name=ImageViewer support=no [Scenario23] -name=WebappLaunch +name=IMEInput support=no [Scenario24] -name=ImageViewer +name=LockScreen support=no [Scenario25] -name=PowerOff +name=LowBattery support=no [Scenario26] -name=ProcessCrashed +name=MtpSendFile support=no [Scenario27] +name=MusicPlayLcdOn +support=no + +[Scenario28] +name=PowerSaving +support=no + +[Scenario29] +name=ProcessCrashed +support=no + +[Scenario30] +name=ReservedMode +support=no + +[Scenario31] +name=ScreenMirroring +support=no + +[Scenario32] +name=SmemoZoom +support=no + +[Scenario33] name=SVoice support=no + +[Scenario34] +name=WebappLaunch +support=no + +[Scenario35] +name=WifiThroughput +support=no + +[Scenario36] +name=PowerOff +support=no + +[Scenario37] +name=WebAppDrag +support=no + +[Scenario38] +name=WebAppFlick +support=no + +[Scenario39] +name=SensorWakeup +support=no + +[Scenario40] +name=UgLaunch +support=no + +[Scenario41] +name=MusicScroll +support=no + +[Scenario42] +name=FileScroll +support=no + +[Scenario43] +name=VideoScroll +support=no + +[Scenario44] +name=EmailScroll +support=yes + +min_level=9 +max_level=11 + +[Scenario45] +name=ContactScroll +support=no + +[Scenario46] +name=TizenStoreScroll +support=yes + +min_level=9 +max_level=11 + +[Scenario47] +name=CallLogScroll +support=yes + +min_level=9 +max_level=11 + +[Scenario48] +name=MyfilesScroll +support=yes + +min_level=9 +max_level=11 + +[Scenario49] +name=MessageScroll +support=yes + +min_level=9 +max_level=11 + +[Scenario50] +name=SIOP +support=no + +[Scenario51] +name=UltraPowerSaving +support=no diff --git a/src/pass/pass-cluster1.conf b/src/pass/pass-cluster1.conf index f9213e4..bf7a7c3 100644 --- a/src/pass/pass-cluster1.conf +++ b/src/pass/pass-cluster1.conf @@ -274,119 +274,236 @@ num_right_cond=0 ############################ [PassScenario] pass_scenario_support=yes -pass_num_scenarios=28 +pass_num_scenarios=52 [Scenario0] name=AppLaunch support=yes -min_level=9 -max_level=11 +min_level=13 +max_level=15 [Scenario1] -name=MtpSendFile -support=no +name=AppLaunchHome +support=yes + +min_level=13 +max_level=15 [Scenario2] -name=PowerSaving +name=BeautyShot support=no [Scenario3] -name=LowBattery +name=Browser support=no [Scenario4] -name=Emergency +name=BrowserDash support=no [Scenario5] -name=CameraPreview -support=no +name=BrowserJavaScript +support=yes + +min_level=13 +max_level=15 [Scenario6] -name=CameraBurstShot +name=BrowserLoading support=no [Scenario7] -name=CameraCaptureAtRec +name=BrowserScroll support=no [Scenario8] -name=Browser +name=CallSound support=no [Scenario9] -name=BrowserDash +name=CameraBurstShot support=no [Scenario10] -name=BrowserJavaScript +name=CameraCaptureAtRec support=no [Scenario11] -name=BrowserLoading +name=CameraPreview support=no [Scenario12] -name=BrowserScroll +name=CameraSoundAndShot support=no [Scenario13] -name=GpuWakeup +name=ContactSearch support=no [Scenario14] -name=WifiThroughput +name=Emergency support=no [Scenario15] -name=SmemoZoom +name=GalleryScroll support=no [Scenario16] -name=IMEInput +name=GalleryRotation support=no [Scenario17] -name=CallSound +name=GetDefaultLockTime support=no [Scenario18] -name=LockScreen +name=GpsSerialCno support=no [Scenario19] -name=GalleryRotation +name=GpuBoost support=no [Scenario20] -name=ReservedMode +name=GpuWakeup support=no [Scenario21] -name=GetDefaultLockTime +name=HomeScreen support=no [Scenario22] -name=GpuBoost +name=ImageViewer support=no [Scenario23] -name=WebappLaunch +name=IMEInput support=no [Scenario24] -name=ImageViewer +name=LockScreen support=no [Scenario25] -name=PowerOff +name=LowBattery support=no [Scenario26] -name=ProcessCrashed +name=MtpSendFile support=no [Scenario27] +name=MusicPlayLcdOn +support=no + +[Scenario28] +name=PowerSaving +support=no + +[Scenario29] +name=ProcessCrashed +support=no + +[Scenario30] +name=ReservedMode +support=no + +[Scenario31] +name=ScreenMirroring +support=no + +[Scenario32] +name=SmemoZoom +support=no + +[Scenario33] name=SVoice support=no + +[Scenario34] +name=WebappLaunch +support=no + +[Scenario35] +name=WifiThroughput +support=no + +[Scenario36] +name=PowerOff +support=no + +[Scenario37] +name=WebAppDrag +support=no + +[Scenario38] +name=WebAppFlick +support=no + +[Scenario39] +name=SensorWakeup +support=no + +[Scenario40] +name=UgLaunch +support=no + +[Scenario41] +name=MusicScroll +support=no + +[Scenario42] +name=FileScroll +support=no + +[Scenario43] +name=VideoScroll +support=no + +[Scenario44] +name=EmailScroll +support=yes + +min_level=13 +max_level=15 + +[Scenario45] +name=ContactScroll +support=no + +[Scenario46] +name=TizenStoreScroll +support=yes + +min_level=13 +max_level=15 + +[Scenario47] +name=CallLogScroll +support=yes + +min_level=13 +max_level=15 + +[Scenario48] +name=MyfilesScroll +support=yes + +min_level=13 +max_level=15 + +[Scenario49] +name=MessageScroll +support=yes + +min_level=13 +max_level=15 + +[Scenario50] +name=SIOP +support=no + +[Scenario51] +name=UltraPowerSaving +support=no diff --git a/src/pass/pass-cluster2.conf b/src/pass/pass-cluster2.conf index 25d4454..47e42ae 100644 --- a/src/pass/pass-cluster2.conf +++ b/src/pass/pass-cluster2.conf @@ -25,7 +25,7 @@ limit_min_freq=400000000 ############################ [PassScenario] pass_scenario_support=yes -pass_num_scenarios=28 +pass_num_scenarios=52 [Scenario0] name=AppLaunch @@ -35,109 +35,226 @@ min_level=3 max_level=3 [Scenario1] -name=MtpSendFile -support=no +name=AppLaunchHome +support=yes + +min_level=3 +max_level=3 [Scenario2] -name=PowerSaving +name=BeautyShot support=no [Scenario3] -name=LowBattery +name=Browser support=no [Scenario4] -name=Emergency +name=BrowserDash support=no [Scenario5] -name=CameraPreview -support=no +name=BrowserJavaScript +support=yes + +min_level=3 +max_level=3 [Scenario6] -name=CameraBurstShot +name=BrowserLoading support=no [Scenario7] -name=CameraCaptureAtRec +name=BrowserScroll support=no [Scenario8] -name=Browser +name=CallSound support=no [Scenario9] -name=BrowserDash +name=CameraBurstShot support=no [Scenario10] -name=BrowserJavaScript +name=CameraCaptureAtRec support=no [Scenario11] -name=BrowserLoading +name=CameraPreview support=no [Scenario12] -name=BrowserScroll +name=CameraSoundAndShot support=no [Scenario13] -name=GpuWakeup +name=ContactSearch support=no [Scenario14] -name=WifiThroughput +name=Emergency support=no [Scenario15] -name=SmemoZoom +name=GalleryScroll support=no [Scenario16] -name=IMEInput +name=GalleryRotation support=no [Scenario17] -name=CallSound +name=GetDefaultLockTime support=no [Scenario18] -name=LockScreen +name=GpsSerialCno support=no [Scenario19] -name=GalleryRotation +name=GpuBoost support=no [Scenario20] -name=ReservedMode +name=GpuWakeup support=no [Scenario21] -name=GetDefaultLockTime +name=HomeScreen support=no [Scenario22] -name=GpuBoost +name=ImageViewer support=no [Scenario23] -name=WebappLaunch +name=IMEInput support=no [Scenario24] -name=ImageViewer +name=LockScreen support=no [Scenario25] -name=PowerOff +name=LowBattery support=no [Scenario26] -name=ProcessCrashed +name=MtpSendFile support=no [Scenario27] +name=MusicPlayLcdOn +support=no + +[Scenario28] +name=PowerSaving +support=no + +[Scenario29] +name=ProcessCrashed +support=no + +[Scenario30] +name=ReservedMode +support=no + +[Scenario31] +name=ScreenMirroring +support=no + +[Scenario32] +name=SmemoZoom +support=no + +[Scenario33] name=SVoice support=no + +[Scenario34] +name=WebappLaunch +support=no + +[Scenario35] +name=WifiThroughput +support=no + +[Scenario36] +name=PowerOff +support=no + +[Scenario37] +name=WebAppDrag +support=no + +[Scenario38] +name=WebAppFlick +support=no + +[Scenario39] +name=SensorWakeup +support=no + +[Scenario40] +name=UgLaunch +support=no + +[Scenario41] +name=MusicScroll +support=no + +[Scenario42] +name=FileScroll +support=no + +[Scenario43] +name=VideoScroll +support=no + +[Scenario44] +name=EmailScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario45] +name=ContactScroll +support=no + +[Scenario46] +name=TizenStoreScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario47] +name=CallLogScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario48] +name=MyfilesScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario49] +name=MessageScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario50] +name=SIOP +support=no + +[Scenario51] +name=UltraPowerSaving +support=no diff --git a/src/pass/pass-cluster3.conf b/src/pass/pass-cluster3.conf index ae09cc0..543fe24 100644 --- a/src/pass/pass-cluster3.conf +++ b/src/pass/pass-cluster3.conf @@ -28,7 +28,7 @@ limit_min_freq=825000000 ############################ [PassScenario] pass_scenario_support=yes -pass_num_scenarios=28 +pass_num_scenarios=52 [Scenario0] name=AppLaunch @@ -38,109 +38,226 @@ min_level=4 max_level=4 [Scenario1] -name=MtpSendFile -support=no +name=AppLaunchHome +support=yes + +min_level=4 +max_level=4 [Scenario2] -name=PowerSaving +name=BeautyShot support=no [Scenario3] -name=LowBattery +name=Browser support=no [Scenario4] -name=Emergency +name=BrowserDash support=no [Scenario5] -name=CameraPreview -support=no +name=BrowserJavaScript +support=yes + +min_level=4 +max_level=4 [Scenario6] -name=CameraBurstShot +name=BrowserLoading support=no [Scenario7] -name=CameraCaptureAtRec +name=BrowserScroll support=no [Scenario8] -name=Browser +name=CallSound support=no [Scenario9] -name=BrowserDash +name=CameraBurstShot support=no [Scenario10] -name=BrowserJavaScript +name=CameraCaptureAtRec support=no [Scenario11] -name=BrowserLoading +name=CameraPreview support=no [Scenario12] -name=BrowserScroll +name=CameraSoundAndShot support=no [Scenario13] -name=GpuWakeup +name=ContactSearch support=no [Scenario14] -name=WifiThroughput +name=Emergency support=no [Scenario15] -name=SmemoZoom +name=GalleryScroll support=no [Scenario16] -name=IMEInput +name=GalleryRotation support=no [Scenario17] -name=CallSound +name=GetDefaultLockTime support=no [Scenario18] -name=LockScreen +name=GpsSerialCno support=no [Scenario19] -name=GalleryRotation +name=GpuBoost support=no [Scenario20] -name=ReservedMode +name=GpuWakeup support=no [Scenario21] -name=GetDefaultLockTime +name=HomeScreen support=no [Scenario22] -name=GpuBoost +name=ImageViewer support=no [Scenario23] -name=WebappLaunch +name=IMEInput support=no [Scenario24] -name=ImageViewer +name=LockScreen support=no [Scenario25] -name=PowerOff +name=LowBattery support=no [Scenario26] -name=ProcessCrashed +name=MtpSendFile support=no [Scenario27] +name=MusicPlayLcdOn +support=no + +[Scenario28] +name=PowerSaving +support=no + +[Scenario29] +name=ProcessCrashed +support=no + +[Scenario30] +name=ReservedMode +support=no + +[Scenario31] +name=ScreenMirroring +support=no + +[Scenario32] +name=SmemoZoom +support=no + +[Scenario33] name=SVoice support=no + +[Scenario34] +name=WebappLaunch +support=no + +[Scenario35] +name=WifiThroughput +support=no + +[Scenario36] +name=PowerOff +support=no + +[Scenario37] +name=WebAppDrag +support=no + +[Scenario38] +name=WebAppFlick +support=no + +[Scenario39] +name=SensorWakeup +support=no + +[Scenario40] +name=UgLaunch +support=no + +[Scenario41] +name=MusicScroll +support=no + +[Scenario42] +name=FileScroll +support=no + +[Scenario43] +name=VideoScroll +support=no + +[Scenario44] +name=EmailScroll +support=yes + +min_level=4 +max_level=4 + +[Scenario45] +name=ContactScroll +support=no + +[Scenario46] +name=TizenStoreScroll +support=yes + +min_level=4 +max_level=4 + +[Scenario47] +name=CallLogScroll +support=yes + +min_level=4 +max_level=4 + +[Scenario48] +name=MyfilesScroll +support=yes + +min_level=4 +max_level=4 + +[Scenario49] +name=MessageScroll +support=yes + +min_level=4 +max_level=4 + +[Scenario50] +name=SIOP +support=no + +[Scenario51] +name=UltraPowerSaving +support=no diff --git a/src/pass/pass-cluster4.conf b/src/pass/pass-cluster4.conf index 91d8aae..31855d1 100644 --- a/src/pass/pass-cluster4.conf +++ b/src/pass/pass-cluster4.conf @@ -28,119 +28,236 @@ limit_min_freq=700000000 ############################ [PassScenario] pass_scenario_support=yes -pass_num_scenarios=28 +pass_num_scenarios=52 [Scenario0] name=AppLaunch support=yes -min_level=4 -max_level=4 +min_level=3 +max_level=3 [Scenario1] -name=MtpSendFile -support=no +name=AppLaunchHome +support=yes + +min_level=3 +max_level=3 [Scenario2] -name=PowerSaving +name=BeautyShot support=no [Scenario3] -name=LowBattery +name=Browser support=no [Scenario4] -name=Emergency +name=BrowserDash support=no [Scenario5] -name=CameraPreview -support=no +name=BrowserJavaScript +support=yes + +min_level=3 +max_level=3 [Scenario6] -name=CameraBurstShot +name=BrowserLoading support=no [Scenario7] -name=CameraCaptureAtRec +name=BrowserScroll support=no [Scenario8] -name=Browser +name=CallSound support=no [Scenario9] -name=BrowserDash +name=CameraBurstShot support=no [Scenario10] -name=BrowserJavaScript +name=CameraCaptureAtRec support=no [Scenario11] -name=BrowserLoading +name=CameraPreview support=no [Scenario12] -name=BrowserScroll +name=CameraSoundAndShot support=no [Scenario13] -name=GpuWakeup +name=ContactSearch support=no [Scenario14] -name=WifiThroughput +name=Emergency support=no [Scenario15] -name=SmemoZoom +name=GalleryScroll support=no [Scenario16] -name=IMEInput +name=GalleryRotation support=no [Scenario17] -name=CallSound +name=GetDefaultLockTime support=no [Scenario18] -name=LockScreen +name=GpsSerialCno support=no [Scenario19] -name=GalleryRotation +name=GpuBoost support=no [Scenario20] -name=ReservedMode +name=GpuWakeup support=no [Scenario21] -name=GetDefaultLockTime +name=HomeScreen support=no [Scenario22] -name=GpuBoost +name=ImageViewer support=no [Scenario23] -name=WebappLaunch +name=IMEInput support=no [Scenario24] -name=ImageViewer +name=LockScreen support=no [Scenario25] -name=PowerOff +name=LowBattery support=no [Scenario26] -name=ProcessCrashed +name=MtpSendFile support=no [Scenario27] +name=MusicPlayLcdOn +support=no + +[Scenario28] +name=PowerSaving +support=no + +[Scenario29] +name=ProcessCrashed +support=no + +[Scenario30] +name=ReservedMode +support=no + +[Scenario31] +name=ScreenMirroring +support=no + +[Scenario32] +name=SmemoZoom +support=no + +[Scenario33] name=SVoice support=no + +[Scenario34] +name=WebappLaunch +support=no + +[Scenario35] +name=WifiThroughput +support=no + +[Scenario36] +name=PowerOff +support=no + +[Scenario37] +name=WebAppDrag +support=no + +[Scenario38] +name=WebAppFlick +support=no + +[Scenario39] +name=SensorWakeup +support=no + +[Scenario40] +name=UgLaunch +support=no + +[Scenario41] +name=MusicScroll +support=no + +[Scenario42] +name=FileScroll +support=no + +[Scenario43] +name=VideoScroll +support=no + +[Scenario44] +name=EmailScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario45] +name=ContactScroll +support=no + +[Scenario46] +name=TizenStoreScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario47] +name=CallLogScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario48] +name=MyfilesScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario49] +name=MessageScroll +support=yes + +min_level=3 +max_level=3 + +[Scenario50] +name=SIOP +support=no + +[Scenario51] +name=UltraPowerSaving +support=no -- 2.7.4 From db2c7c307786894095c0cc2189db9d60201380f8 Mon Sep 17 00:00:00 2001 From: Wook Song Date: Fri, 3 Feb 2017 12:42:49 +0900 Subject: [PATCH 12/16] core: Remove duplicate log header file This patch removes the duplicate log header file in the core directory. From now, the only log header is the file in the shared directory. Change-Id: I94d6cae273a7a123c3d65c503d6703d146322f51 Signed-off-by: Wook Song --- src/core/boot.c | 2 +- src/core/common.c | 3 ++- src/core/config-parser.c | 4 +++- src/core/device-idler.c | 2 +- src/core/device-notifier.c | 2 +- src/core/devices.c | 3 ++- src/core/edbus-handler.c | 2 +- src/core/execute.c | 2 +- src/core/log.c | 3 ++- src/core/log.h | 33 --------------------------------- src/core/main.c | 9 +++++---- src/core/sig-handler.c | 5 +++-- src/core/udev.c | 7 ++++--- src/pass/pass.h | 3 ++- src/pmqos/pmqos-parser.c | 5 +++-- src/pmqos/pmqos.c | 3 ++- src/shared/pass-systemd.c | 4 ++-- 17 files changed, 35 insertions(+), 57 deletions(-) delete mode 100644 src/core/log.h diff --git a/src/core/boot.c b/src/core/boot.c index 97c2458..d36a3e8 100644 --- a/src/core/boot.c +++ b/src/core/boot.c @@ -21,11 +21,11 @@ #include #include -#include "core/log.h" #include "core/device-notifier.h" #include "core/common.h" #include "core/edbus-handler.h" #include "shared/pass-systemd.h" +#include "shared/log.h" #define SIGNAL_BOOTING_DONE "BootingDone" diff --git a/src/core/common.c b/src/core/common.c index 3d22461..0dfc10f 100644 --- a/src/core/common.c +++ b/src/core/common.c @@ -34,7 +34,8 @@ #include #include -#include "log.h" +#include "shared/log.h" + #include "common.h" #define BUFF_MAX 255 diff --git a/src/core/config-parser.c b/src/core/config-parser.c index 880d358..fe0df23 100644 --- a/src/core/config-parser.c +++ b/src/core/config-parser.c @@ -19,7 +19,9 @@ #include #include #include -#include "log.h" + +#include "shared/log.h" + #include "config-parser.h" #define MAX_LINE 128 diff --git a/src/core/device-idler.c b/src/core/device-idler.c index 79582a8..edca042 100644 --- a/src/core/device-idler.c +++ b/src/core/device-idler.c @@ -21,7 +21,7 @@ #include #include -#include "log.h" +#include "shared/log.h" struct device_request { void (*func)(void *data); diff --git a/src/core/device-notifier.c b/src/core/device-notifier.c index dd88ffe..1195d0c 100644 --- a/src/core/device-notifier.c +++ b/src/core/device-notifier.c @@ -16,8 +16,8 @@ * limitations under the License. */ +#include "shared/log.h" -#include "log.h" #include "device-notifier.h" #include "list.h" #include "common.h" diff --git a/src/core/devices.c b/src/core/devices.c index 1fce02c..dbfc475 100644 --- a/src/core/devices.c +++ b/src/core/devices.c @@ -19,7 +19,8 @@ #include -#include "log.h" +#include "shared/log.h" + #include "list.h" #include "common.h" #include "devices.h" diff --git a/src/core/edbus-handler.c b/src/core/edbus-handler.c index 6d06faa..bcec02a 100644 --- a/src/core/edbus-handler.c +++ b/src/core/edbus-handler.c @@ -19,12 +19,12 @@ #include -#include "core/log.h" #include "core/edbus-handler.h" #include "core/common.h" #include "core/device-idler.h" #include "core/device-notifier.h" #include "core/list.h" +#include "shared/log.h" #define EDBUS_INIT_RETRY_COUNT 5 #define NAME_OWNER_CHANGED "NameOwnerChanged" diff --git a/src/core/execute.c b/src/core/execute.c index 224ea58..ddfba23 100755 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -26,7 +26,7 @@ #include #include -#include "log.h" +#include "shared/log.h" static int parent(pid_t pid) { diff --git a/src/core/log.c b/src/core/log.c index 2a91d05..866619d 100644 --- a/src/core/log.c +++ b/src/core/log.c @@ -17,7 +17,8 @@ */ #include -#include "log.h" + +#include "shared/log.h" #ifdef DEBUG void __cyg_profile_func_enter(void *, void *) diff --git a/src/core/log.h b/src/core/log.h deleted file mode 100644 index 74b866a..0000000 --- a/src/core/log.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * PASS - * - * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __LOG_H__ -#define __LOG_H__ - -#ifdef ENABLE_PASS_DLOG -#define ENABLE_DLOG -#endif - -#ifdef LOG_TAG -#undef LOG_TAG -#endif - -#define LOG_TAG "PASS" -#include "shared/log-macro.h" -#endif diff --git a/src/core/main.c b/src/core/main.c index 78e9680..233ef0e 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -21,13 +21,14 @@ #include #include -#include "log.h" -#include "common.h" -#include "edbus-handler.h" -#include "devices.h" #include "shared/dbus.h" +#include "shared/log.h" + #include "boot.h" +#include "common.h" #include "device-notifier.h" +#include "devices.h" +#include "edbus-handler.h" #define PIDFILE_PATH "/var/run/.pass.pid" diff --git a/src/core/sig-handler.c b/src/core/sig-handler.c index 9d31cc2..1b51787 100644 --- a/src/core/sig-handler.c +++ b/src/core/sig-handler.c @@ -21,9 +21,10 @@ #include #include -#include "log.h" -#include "devices.h" +#include "shared/log.h" + #include "common.h" +#include "devices.h" static struct sigaction sig_child_old_act; static struct sigaction sig_pipe_old_act; diff --git a/src/core/udev.c b/src/core/udev.c index 262e12f..39e49d9 100644 --- a/src/core/udev.c +++ b/src/core/udev.c @@ -21,12 +21,13 @@ #include #include -#include "log.h" +#include "shared/log.h" + #include "device-notifier.h" #include "devices.h" -#include "udev.h" -#include "list.h" #include "edbus-handler.h" +#include "list.h" +#include "udev.h" #define KERNEL "kernel" #define UDEV "udev" diff --git a/src/pass/pass.h b/src/pass/pass.h index 331f566..80b5497 100644 --- a/src/pass/pass.h +++ b/src/pass/pass.h @@ -22,7 +22,8 @@ #include #include -#include "core/log.h" + +#include "shared/log.h" /****************************************************** * PASS Governors * diff --git a/src/pmqos/pmqos-parser.c b/src/pmqos/pmqos-parser.c index 10302c5..1814e84 100644 --- a/src/pmqos/pmqos-parser.c +++ b/src/pmqos/pmqos-parser.c @@ -23,9 +23,10 @@ #include #include -#include "core/log.h" -#include "core/edbus-handler.h" #include "core/config-parser.h" +#include "core/edbus-handler.h" +#include "shared/log.h" + #include "pmqos.h" static bool is_supported(const char *value) diff --git a/src/pmqos/pmqos.c b/src/pmqos/pmqos.c index 63ff6b6..dff3894 100644 --- a/src/pmqos/pmqos.c +++ b/src/pmqos/pmqos.c @@ -23,12 +23,13 @@ #include #include -#include "core/log.h" #include "core/edbus-handler.h" #include "core/devices.h" #include "core/common.h" #include "core/list.h" #include "core/device-notifier.h" +#include "shared/log.h" + #include "pmqos.h" #define DEFAULT_PMQOS_TIMER 3000 diff --git a/src/shared/pass-systemd.c b/src/shared/pass-systemd.c index e7f5f6f..d418da2 100644 --- a/src/shared/pass-systemd.c +++ b/src/shared/pass-systemd.c @@ -26,12 +26,12 @@ #include #include +#include "shared/log.h" + #include "common.h" #include "dbus.h" #include "pass-systemd.h" -#include "core/log.h" - #define SYSTEMD_UNIT_ESCAPE_CHAR ".-" -- 2.7.4 From 50c50ebef7e333e80cbe8d6e17caf5a0b5d19256 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Mon, 6 Feb 2017 08:47:13 +0900 Subject: [PATCH 13/16] shared: Unify the separate log.h to remove the duplicate header file This patch unifies the separate log.h header file and remove the duplicate the log header file. Change-Id: Id61e07a7a244070e1c139ce007c8a8118137321a Signed-off-by: Chanwoo Choi --- src/shared/log-macro.h | 51 -------------------------------------------------- src/shared/log.h | 16 ++++++++++------ 2 files changed, 10 insertions(+), 57 deletions(-) delete mode 100644 src/shared/log-macro.h diff --git a/src/shared/log-macro.h b/src/shared/log-macro.h deleted file mode 100644 index ab42821..0000000 --- a/src/shared/log-macro.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * PASS (Power Aware System Service) - * - * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __LOG_MACRO_H__ -#define __LOG_MACRO_H__ - -#ifdef ENABLE_DLOG -#include -#define _D(fmt, arg...) \ - do { SLOGD(fmt, ##arg); } while(0) -#define _I(fmt, arg...) \ - do { SLOGI(fmt, ##arg); } while(0) -#define _W(fmt, arg...) \ - do { SLOGW(fmt, ##arg); } while(0) -#define _E(fmt, arg...) \ - do { SLOGE(fmt, ##arg); } while(0) -#define _SD(fmt, arg...) \ - do { SECURE_SLOGD(fmt, ##arg); } while(0) -#define _SI(fmt, arg...) \ - do { SECURE_SLOGI(fmt, ##arg); } while(0) -#define _SW(fmt, arg...) \ - do { SECURE_SLOGW(fmt, ##arg); } while(0) -#define _SE(fmt, arg...) \ - do { SECURE_SLOGE(fmt, ##arg); } while(0) -#else -#define _D(...) do { } while (0) -#define _I(...) do { } while (0) -#define _W(...) do { } while (0) -#define _E(...) do { } while (0) -#define _SD(...) do { } while (0) -#define _SI(...) do { } while (0) -#define _SW(...) do { } while (0) -#define _SE(...) do { } while (0) -#endif -#endif diff --git a/src/shared/log.h b/src/shared/log.h index 5850d15..636be78 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -16,15 +16,19 @@ * limitations under the License. */ - #ifndef __LOG_H__ #define __LOG_H__ -#ifdef ENABLE_LIBPASS_DLOG -#define ENABLE_DLOG -#endif - +#include #define LOG_TAG "PASS" -#include "shared/log-macro.h" + +#define _D(fmt, arg...) do { SLOGD(fmt, ##arg); } while(0) +#define _I(fmt, arg...) do { SLOGI(fmt, ##arg); } while(0) +#define _W(fmt, arg...) do { SLOGW(fmt, ##arg); } while(0) +#define _E(fmt, arg...) do { SLOGE(fmt, ##arg); } while(0) +#define _SD(fmt, arg...) do { SECURE_SLOGD(fmt, ##arg); } while(0) +#define _SI(fmt, arg...) do { SECURE_SLOGI(fmt, ##arg); } while(0) +#define _SW(fmt, arg...) do { SECURE_SLOGW(fmt, ##arg); } while(0) +#define _SE(fmt, arg...) do { SECURE_SLOGE(fmt, ##arg); } while(0) #endif -- 2.7.4 From 3744be83404bddf045e270980c02fac7773e92db Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Sat, 4 Feb 2017 19:48:11 +0900 Subject: [PATCH 14/16] pass: parser: Change 'limit_max_cpu' name to 'limit_min_cpu' The PASS uses the 'limit_max_cpu' as the minimum number of online cpu. This name is not matched with the meaning of 'limit_max_cpu'. So, this patch changes the name of 'limit_max_cpu' to 'limit_min_cpu' to improve the readability of property in configuration files. Change-Id: I35650f622ecf482606cdbbdf6c7c365582bace15 Signed-off-by: Chanwoo Choi --- src/pass/pass-cluster0.conf | 24 ++++++++++++------------ src/pass/pass-cluster1.conf | 40 ++++++++++++++++++++-------------------- src/pass/pass-gov.c | 22 +++++++++++----------- src/pass/pass-micro.conf | 12 ++++++------ src/pass/pass-parser.c | 10 +++++----- src/pass/pass.c | 4 ++-- src/pass/pass.h | 2 +- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/pass/pass-cluster0.conf b/src/pass/pass-cluster0.conf index f77a751..98a73d6 100644 --- a/src/pass/pass-cluster0.conf +++ b/src/pass/pass-cluster0.conf @@ -19,7 +19,7 @@ pass_governor_timeout=0.4 [Level0] limit_max_freq=1000000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=0 num_up_cond=1 num_up_cond_freq=800000 @@ -30,7 +30,7 @@ num_right_cond_busy_cpu=1 [Level1] limit_max_freq=1000000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=0 num_up_cond=1 num_up_cond_freq=800000 @@ -43,7 +43,7 @@ num_right_cond_busy_cpu=2 [Level2] limit_max_freq=1000000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=0 num_up_cond=1 num_up_cond_freq=800000 @@ -56,7 +56,7 @@ num_right_cond_busy_cpu=3 [Level3] limit_max_freq=1000000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=0 num_up_cond=1 num_up_cond_freq=800000 @@ -67,7 +67,7 @@ num_right_cond=0 [Level4] limit_max_freq=1200000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -79,7 +79,7 @@ num_right_cond_busy_cpu=1 [Level5] limit_max_freq=1200000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -93,7 +93,7 @@ num_right_cond_busy_cpu=2 [Level6] limit_max_freq=1200000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -107,7 +107,7 @@ num_right_cond_busy_cpu=3 [Level7] limit_max_freq=1200000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -119,7 +119,7 @@ num_right_cond=0 [Level8] limit_max_freq=1300000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=1200000 num_up_cond=1 @@ -131,7 +131,7 @@ num_right_cond_busy_cpu=1 [Level9] limit_max_freq=1300000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=1200000 num_up_cond=1 @@ -145,7 +145,7 @@ num_right_cond_busy_cpu=2 [Level10] limit_max_freq=1300000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=1 num_down_cond_freq=1200000 num_up_cond=1 @@ -159,7 +159,7 @@ num_right_cond_busy_cpu=3 [Level11] limit_max_freq=1300000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=1 num_down_cond_freq=1200000 num_up_cond=1 diff --git a/src/pass/pass-cluster1.conf b/src/pass/pass-cluster1.conf index bf7a7c3..9f65eee 100644 --- a/src/pass/pass-cluster1.conf +++ b/src/pass/pass-cluster1.conf @@ -19,7 +19,7 @@ pass_governor_timeout=0.4 [Level0] limit_max_freq=1000000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=0 num_up_cond=1 num_up_cond_freq=1000000 @@ -30,7 +30,7 @@ num_right_cond_busy_cpu=1 [Level1] limit_max_freq=1000000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=0 num_up_cond=1 num_up_cond_freq=1000000 @@ -43,7 +43,7 @@ num_right_cond_busy_cpu=2 [Level2] limit_max_freq=1000000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=0 num_up_cond=1 num_up_cond_freq=1000000 @@ -56,7 +56,7 @@ num_right_cond_busy_cpu=3 [Level3] limit_max_freq=1000000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=0 num_up_cond=1 num_up_cond_freq=1000000 @@ -67,7 +67,7 @@ num_right_cond=0 [Level4] limit_max_freq=1200000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -79,7 +79,7 @@ num_right_cond_busy_cpu=1 [Level5] limit_max_freq=1200000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -93,7 +93,7 @@ num_right_cond_busy_cpu=2 [Level6] limit_max_freq=1200000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -107,7 +107,7 @@ num_right_cond_busy_cpu=3 [Level7] limit_max_freq=1200000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=1 num_down_cond_freq=1000000 num_up_cond=1 @@ -119,7 +119,7 @@ num_right_cond=0 [Level8] limit_max_freq=1300000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=1100000 num_up_cond=1 @@ -131,7 +131,7 @@ num_right_cond_busy_cpu=1 [Level9] limit_max_freq=1300000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=1100000 num_up_cond=1 @@ -145,7 +145,7 @@ num_right_cond_busy_cpu=2 [Level10] limit_max_freq=1300000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=1 num_down_cond_freq=1100000 num_up_cond=1 @@ -159,7 +159,7 @@ num_right_cond_busy_cpu=3 [Level11] limit_max_freq=1300000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=1 num_down_cond_freq=1100000 num_up_cond=1 @@ -171,7 +171,7 @@ num_right_cond=0 [Level12] limit_max_freq=1500000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=1300000 num_up_cond=1 @@ -183,7 +183,7 @@ num_right_cond_busy_cpu=1 [Level13] limit_max_freq=1500000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=1300000 num_up_cond=1 @@ -197,7 +197,7 @@ num_right_cond_busy_cpu=2 [Level14] limit_max_freq=1500000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=1 num_down_cond_freq=1300000 num_up_cond=1 @@ -211,7 +211,7 @@ num_right_cond_busy_cpu=3 [Level15] limit_max_freq=1500000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=1 num_down_cond_freq=1300000 num_up_cond=1 @@ -223,7 +223,7 @@ num_right_cond=0 [Level16] limit_max_freq=1700000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=1500000 num_up_cond=0 @@ -234,7 +234,7 @@ num_right_cond_busy_cpu=1 [Level17] limit_max_freq=1700000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=1500000 num_up_cond=0 @@ -247,7 +247,7 @@ num_right_cond_busy_cpu=2 [Level18] limit_max_freq=1700000 -limit_max_cpu=3 +limit_min_cpu=3 num_down_cond=1 num_down_cond_freq=1500000 num_up_cond=0 @@ -260,7 +260,7 @@ num_right_cond_busy_cpu=3 [Level19] limit_max_freq=1700000 -limit_max_cpu=4 +limit_min_cpu=4 num_down_cond=1 num_down_cond_freq=1500000 num_up_cond=0 diff --git a/src/pass/pass-gov.c b/src/pass/pass-gov.c index d8ecab0..7dab679 100644 --- a/src/pass/pass-gov.c +++ b/src/pass/pass-gov.c @@ -167,7 +167,7 @@ static void pass_hotplug_stop(struct pass_policy *policy) if (!policy->hotplug) return; - policy->hotplug->online = table[level].limit_max_cpu; + policy->hotplug->online = table[level].limit_min_cpu; policy->hotplug->max_online = policy->cpufreq.num_nr_cpus; } @@ -175,7 +175,7 @@ static int pass_hotplug_dummy_governor(struct pass_policy *policy) { int level = policy->curr_level; - return policy->pass_table[level].limit_max_cpu; + return policy->pass_table[level].limit_min_cpu; } /* @@ -227,7 +227,7 @@ static int pass_governor_change_level(struct pass_policy *policy, int new_level) int curr_level = policy->curr_level; int limit_max_freq; int limit_min_freq; - int limit_max_cpu; + int limit_min_cpu; int online; int ret; @@ -246,15 +246,15 @@ static int pass_governor_change_level(struct pass_policy *policy, int new_level) */ limit_max_freq = table[new_level].limit_max_freq; limit_min_freq = table[new_level].limit_min_freq; - limit_max_cpu = table[new_level].limit_max_cpu; + limit_min_cpu = table[new_level].limit_min_cpu; policy->prev_level = policy->curr_level; policy->curr_level = new_level; /* Turn on/off CPUs according the maximum number of online CPU */ if (hotplug) { - if (hotplug->max_online != limit_max_cpu) - hotplug->max_online = limit_max_cpu; + if (hotplug->max_online != limit_min_cpu) + hotplug->max_online = limit_min_cpu; if (hotplug->governor) online = hotplug->governor(policy); @@ -289,7 +289,7 @@ static int pass_governor_change_level(struct pass_policy *policy, int new_level) pass_res->cdata.res_name, (curr_level > new_level ? "DOWN" : "UP"), curr_level, new_level, - limit_max_freq, limit_min_freq, limit_max_cpu); + limit_max_freq, limit_min_freq, limit_min_cpu); */ return 0; @@ -313,11 +313,11 @@ static void pass_calculate_busy_cpu(struct pass_policy *policy) unsigned int sum_load; unsigned int sum_runnable_load; unsigned int nr_runnings; - int limit_max_cpu; + int limit_min_cpu; int i; int j; - limit_max_cpu = table[level].limit_max_cpu; + limit_min_cpu = table[level].limit_min_cpu; for (i = 0; i < policy->num_pass_cpu_stats; i++) { cur_freq = stats[i].freq; @@ -350,8 +350,8 @@ static void pass_calculate_busy_cpu(struct pass_policy *policy) } stats[i].num_busy_cpu = busy_cpu; - stats[i].avg_load = sum_load / limit_max_cpu; - stats[i].avg_runnable_load = sum_runnable_load / limit_max_cpu; + stats[i].avg_load = sum_load / limit_min_cpu; + stats[i].avg_runnable_load = sum_runnable_load / limit_min_cpu; if (nr_runnings) { stats[i].avg_thread_load = (sum_load * 100) / nr_runnings; diff --git a/src/pass/pass-micro.conf b/src/pass/pass-micro.conf index 48ce2de..d98b666 100644 --- a/src/pass/pass-micro.conf +++ b/src/pass/pass-micro.conf @@ -19,7 +19,7 @@ pass_governor_timeout=0.4 [Level0] limit_max_freq=600000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=0 num_up_cond=1 @@ -31,7 +31,7 @@ num_right_cond=0 [Level1] limit_max_freq=700000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=500000 @@ -46,7 +46,7 @@ num_right_cond=0 [Level2] limit_max_freq=800000 -limit_max_cpu=1 +limit_min_cpu=1 num_down_cond=1 num_down_cond_freq=700000 @@ -61,7 +61,7 @@ num_right_cond=0 [Level3] limit_max_freq=700000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=600000 @@ -76,7 +76,7 @@ num_right_cond=0 [Level4] limit_max_freq=700000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=600000 @@ -91,7 +91,7 @@ num_right_cond=0 [Level5] limit_max_freq=800000 -limit_max_cpu=2 +limit_min_cpu=2 num_down_cond=1 num_down_cond_freq=700000 diff --git a/src/pass/pass-parser.c b/src/pass/pass-parser.c index cc5fbe4..5ae6cf1 100644 --- a/src/pass/pass-parser.c +++ b/src/pass/pass-parser.c @@ -122,8 +122,8 @@ static int pass_parse_level(struct parse_result *result, policy->pass_table[level].limit_max_freq = atoi(result->value); else if (MATCH(result->name, "limit_min_freq")) policy->pass_table[level].limit_min_freq = atoi(result->value); - else if (MATCH(result->name, "limit_max_cpu")) - policy->pass_table[level].limit_max_cpu = atoi(result->value); + else if (MATCH(result->name, "limit_min_cpu")) + policy->pass_table[level].limit_min_cpu = atoi(result->value); else if (MATCH(result->name, "num_down_cond")) policy->pass_table[level].num_down_cond = atoi(result->value); @@ -365,10 +365,10 @@ int pass_get_table(struct pass_policy *policy, char *pass_conf_path) _I("%s| policy->pass_table[%d].limit_min_freq : %d\n", pass_res->cdata.res_name, level, policy->pass_table[level].limit_min_freq); - if (policy->pass_table[level].limit_max_cpu) - _I("%s| policy->pass_table[%d].limit_max_cpu : %d\n", + if (policy->pass_table[level].limit_min_cpu) + _I("%s| policy->pass_table[%d].limit_min_cpu : %d\n", pass_res->cdata.res_name, level, - policy->pass_table[level].limit_max_cpu); + policy->pass_table[level].limit_min_cpu); if (policy->pass_table[level].gov_timeout) _I("%s| policy->pass_table[%d].gov_timeout : %f\n", pass_res->cdata.res_name, level, diff --git a/src/pass/pass.c b/src/pass/pass.c index 599ea46..726bc64 100644 --- a/src/pass/pass.c +++ b/src/pass/pass.c @@ -156,8 +156,8 @@ static int pass_resource_init(struct pass_policy *policy) for (i = 0; i < policy->num_levels; i++) { if (max_freq < policy->pass_table[i].limit_max_freq) max_freq = policy->pass_table[i].limit_max_freq; - if (max_cpu < policy->pass_table[i].limit_max_cpu) - max_cpu = policy->pass_table[i].limit_max_cpu; + if (max_cpu < policy->pass_table[i].limit_min_cpu) + max_cpu = policy->pass_table[i].limit_min_cpu; } policy->cpufreq.max_freq = max_freq; policy->cpufreq.num_nr_cpus = max_cpu; diff --git a/src/pass/pass.h b/src/pass/pass.h index 80b5497..427dc0e 100644 --- a/src/pass/pass.h +++ b/src/pass/pass.h @@ -139,7 +139,7 @@ struct pass_table { /* Constraints condition for powersaving */ int limit_max_freq; int limit_min_freq; - int limit_max_cpu; + int limit_min_cpu; /* Governor timer's timeout for each pass level */ double gov_timeout; -- 2.7.4 From ec1ec9fdd8cc4c4ab3cdf03df1846d3245f958e4 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Sat, 4 Feb 2017 20:03:32 +0900 Subject: [PATCH 15/16] pmqos: Change the 'PmqosScenario' to 'PassScenario' section name This patch just changes the sectcion name from 'PmqosScenatio' to 'PassScenario' in order to keep the consistency of property name between pmqos.conf and pass-*.conf of each resource. Second, this patch removes the unneeded 'PMQOS' section name which doesn't include the any propeties. Change-Id: I978be1ab5df3dec0213a9035a36fb9962df4339a Signed-off-by: Chanwoo Choi --- src/pmqos/pmqos-parser.c | 14 +++++--------- src/pmqos/pmqos.conf | 7 +------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/pmqos/pmqos-parser.c b/src/pmqos/pmqos-parser.c index 1814e84..690a465 100644 --- a/src/pmqos/pmqos-parser.c +++ b/src/pmqos/pmqos-parser.c @@ -45,8 +45,8 @@ static int pmqos_parse_scenario(struct parse_result *result, void *user_data, un assert(result); assert(result->section && result->name && result->value); - /* Parse 'PmqosScenario' section */ - if (MATCH(result->section, "PmqosScenario")) { + /* Parse 'PassScenario' section */ + if (MATCH(result->section, "PassScenario")) { if (MATCH(result->name, "scenario_support")) scenarios->support = is_supported(result->value); else if (MATCH(result->name, "scenario_num")) { @@ -96,15 +96,11 @@ static int pmqos_load_config(struct parse_result *result, void *user_data) if (!result->section || !result->name || !result->value) return 0; - /* Parsing 'PMQOS' section */ - if (MATCH(result->section, "PMQOS")) - goto out; - - /* Parsing 'Pmqos Scenario' section */ - if (MATCH(result->section, "PmqosScenario")) { + /* Parsing 'PassScenario' section */ + if (MATCH(result->section, "PassScenario")) { ret = pmqos_parse_scenario(result, user_data, -1); if (ret < 0) { - _E("failed to parse [PmqosScenario] section : %d", ret); + _E("failed to parse [PassScenario] section : %d", ret); return ret; } goto out; diff --git a/src/pmqos/pmqos.conf b/src/pmqos/pmqos.conf index ffeeb64..b55f023 100644 --- a/src/pmqos/pmqos.conf +++ b/src/pmqos/pmqos.conf @@ -1,9 +1,4 @@ -[PMQOS] - -############################ -### Add list of scenario ### -############################ -[PmqosScenario] +[PassScenario] # set to "yes" scenario_support (Default value is no) # set scenario_num to be tested scenario_support=yes -- 2.7.4 From 1f38794699cadc1e2c1c775d17093baa7e755583 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Sat, 4 Feb 2017 20:10:12 +0900 Subject: [PATCH 16/16] pmqos: Rename the pmqos filename from 'pmqos.conf' to 'pass-pmqos.conf' This patch just renames the file of pmqos configuration file to keep the consistency of the format of pass configuration file. Change-Id: Ib195e698c389ff5f044b8b3bad5cc27600ceb5ad Signed-off-by: Chanwoo Choi --- CMakeLists.txt | 2 +- packaging/pass.spec | 2 +- src/pmqos/{pmqos.conf => pass-pmqos.conf} | 0 src/pmqos/pmqos.c | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/pmqos/{pmqos.conf => pass-pmqos.conf} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2b683a..2116f1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,7 +158,7 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster1.conf DESTINATIO INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster2.conf DESTINATION /etc/pass) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster3.conf DESTINATION /etc/pass) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pass/pass-cluster4.conf DESTINATION /etc/pass) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pmqos/pmqos.conf DESTINATION /etc/pass) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pmqos/pass-pmqos.conf DESTINATION /etc/pass) CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) diff --git a/packaging/pass.spec b/packaging/pass.spec index d87e4dd..07677d2 100644 --- a/packaging/pass.spec +++ b/packaging/pass.spec @@ -117,7 +117,7 @@ systemctl daemon-reload %config %{_sysconfdir}/pass/pass-cluster2.conf %config %{_sysconfdir}/pass/pass-cluster3.conf %config %{_sysconfdir}/pass/pass-cluster4.conf -%config %{_sysconfdir}/pass/pmqos.conf +%config %{_sysconfdir}/pass/pass-pmqos.conf %{_bindir}/%{daemon_name} %{_unitdir}/multi-user.target.wants/%{daemon_name}.service %{_unitdir}/sockets.target.wants/%{daemon_name}.socket diff --git a/src/pmqos/pmqos.conf b/src/pmqos/pass-pmqos.conf similarity index 100% rename from src/pmqos/pmqos.conf rename to src/pmqos/pass-pmqos.conf diff --git a/src/pmqos/pmqos.c b/src/pmqos/pmqos.c index dff3894..395a513 100644 --- a/src/pmqos/pmqos.c +++ b/src/pmqos/pmqos.c @@ -34,7 +34,7 @@ #define DEFAULT_PMQOS_TIMER 3000 -#define PMQOS_CONF_PATH "/etc/pass/pmqos.conf" +#define PMQOS_CONF_PATH "/etc/pass/pass-pmqos.conf" #define MILLISECONDS(tv) ((tv.tv_sec)*1000 + (tv.tv_nsec)/1000000) #define DELTA(a, b) (MILLISECONDS(a) - MILLISECONDS(b)) -- 2.7.4