pass: gov: Add new GOV_HOTPLUG_ONLY definition 40/114340/1
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 13 Feb 2017 02:06:29 +0000 (11:06 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 13 Feb 2017 05:08:59 +0000 (14:08 +0900)
This patch adds the new GOV_HOTPLUG_ONLY definition which uses
the hotplug interface for h/w resource such as CPU without
the runtime governors such as GOV_RADIATION, GOV_STEP.

- Detailed description of the PASS governor
: The PASS governor contains both the hotplug and runtime governor
for each resource
------------------------------------------------------------------
Governor name    | Hotplug interface | PASS Runtime governor     |
------------------------------------------------------------------
GOV_DUMMY        | Un-used           | Un-used                   |
GOV_HOTPLUG_ONLY | Used              | Un-used                   |
GOV_RADIATION    | Used              | Used (Radiation governor) |
GOV_STEP         | Used              | Used (Step governor)      |
------------------------------------------------------------------

For example,
- GOV_DUMMY        for TM1/TM2's BUS/GPU resource
- GOV_HOTPLUG_ONLY for TM1's CPU resource
- GOV_RADIATION    for TM2's big.LITTLE CPU resource
- GOV_STEP         for TM2's big.LITTLE CPU resource

Change-Id: Id8caebcf32f00a19dbf63192a6d952384df21bf7
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-gov.c
src/pass/pass.h

index 506a563..0745138 100644 (file)
@@ -191,6 +191,7 @@ struct pass_hotplug* pass_get_hotplug(struct pass_policy *policy,
        switch (type) {
        case PASS_GOV_DUMMY:
                return NULL;
+       case PASS_GOV_HOTPLUG_ONLY:
        case PASS_GOV_STEP:
        case PASS_GOV_RADIATION:
                hotplug = calloc(1, sizeof(struct pass_hotplug));
@@ -688,6 +689,7 @@ struct pass_governor* pass_get_governor(struct pass_policy *policy,
 {
        switch (type) {
        case PASS_GOV_DUMMY:
+       case PASS_GOV_HOTPLUG_ONLY:
                return &pass_gov_dummy;
        case PASS_GOV_STEP:
                return &pass_gov_step;
index 081acaa..b7719e5 100644 (file)
@@ -52,7 +52,8 @@ enum pass_state {
  * PASS Governor type
  */
 enum pass_gov_type {
-       PASS_GOV_DUMMY = 0,
+       PASS_GOV_DUMMY = -1,
+       PASS_GOV_HOTPLUG_ONLY = 0,
        PASS_GOV_STEP = 1,
        PASS_GOV_RADIATION = 2,