Skip to content

Commit 78bc3f0

Browse files
authored
Add cpu-online resource (#253)
Signed-off-by: Kartik Nema <kartnema@qti.qualcomm.com>
1 parent b821d09 commit 78bc3f0

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

configs/ResourcesConfig.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ ResourceConfigs:
142142
Policy: "lower_is_better"
143143
ApplyType: "cluster"
144144

145+
- ResType: "0x04"
146+
ResID: "0x0003"
147+
Name: "RES_CPU_ONLINE_PER_CORE"
148+
Path: "/sys/devices/system/cpu/cpu%d/online"
149+
Supported: true
150+
Permissions: "third_party"
151+
Modes: ["display_on", "doze"]
152+
Policy: "instant_apply"
153+
ApplyType: "core"
154+
145155
- ResType: "0x05"
146156
ResID: "0x0000"
147157
Name: "RES_DEVFREQ_GPU_MAX"

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ The following resource codes are supported resources or operations on upstream L
247247
| RES_SCALE_MIN_FREQ | 0x 00 04 0000 |
248248
| RES_SCALE_MAX_FREQ | 0x 00 04 0001 |
249249
| RES_RATE_LIMIT_US | 0x 00 04 0002 |
250+
| RES_CPU_ONLINE_PER_CORE | 0x 00 04 0003 |
250251
| RES_DEVFREQ_GPU_MAX | 0x 00 05 0000 |
251252
| RES_DEVFREQ_GPU_MIN | 0x 00 05 0001 |
252253
| RES_DEVFREQ_GPU_POLL_INTV | 0x 00 05 0002 |

modula/Common/Include/UrmPlatformAL.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ enum Modes {
166166
X(RES_SCALE_MIN_FREQ, 0x00040000) \
167167
X(RES_SCALE_MAX_FREQ, 0x00040001) \
168168
X(RES_RATE_LIMIT_US, 0x00040002) \
169-
X(RES_CPU_IDLE_DISABLE_ST0, 0x00040003) \
170-
X(RES_CPU_IDLE_DISABLE_ST1, 0x00040004) \
171-
X(RES_CPU_IDLE_DISABLE_ST2, 0x00040005) \
169+
X(RES_CPU_ONLINE_PER_CORE, 0x00040003) \
170+
X(RES_CPU_IDLE_DISABLE_ST0, 0x00010002) \
171+
X(RES_CPU_IDLE_DISABLE_ST1, 0x00010003) \
172+
X(RES_CPU_IDLE_DISABLE_ST2, 0x00010004) \
172173
X(RES_SCHED_UTIL_CLAMP_MIN, 0x00030000) \
173174
X(RES_SCHED_UTIL_CLAMP_MAX, 0x00030001) \
174175
X(RES_SCHED_ENERGY_AWARE, 0x00030002) \

0 commit comments

Comments
 (0)