powerhint: provide android-mainline versions for Oriole & Raven
The android-mainline kernel doesn't provide the scheduler vendor hooks,
and therefore the pixel drivers don't expose anything below
/proc/vendor_sched/. This causes powerpower-libperfmgr to emit *a lot*
of warnings to logcat regarding failures to write to nodes below
/proc/vendor_sched/.
As a solution, provide a -mainline version of powerhint.json for the
two platforms supported by android-mainline.
The new files are based on revision f56bbd1bfb
("disable vendor idle
balancer") of powerhint.json and have all nodes and actions referring
to /proc/vendor_sched/ removed using the following jq commands:
for f in powerhint-oriole.json powerhint-raven.json ; do \
fdst="$(basename "${f}" .json)-mainline.json"
names=$(jq '."Nodes"[] | select(."Path" | startswith("/proc/vendor_sched/")).Name' "${f}" \
| tr '\n' ' ' \
| sed -e 's|" "|", "|g')
jq '. | del( ."Actions"[] | select(."Node"==('"${names}"')))' "${f}" > "${fdst}"
jq '. | del( ."Nodes"[] | select(."Path" | startswith("/proc/vendor_sched/")) )' "${fdst}" > "${fdst}2"
mv "${fdst}2" "${fdst}"
done
The -mainline version will be picked based on a boot property set by
the mainline kernel.
Bug: 265961701
Test: adb shell -nT getprop vendor.powerhal.config
adb logcat -b all -D 'libperfmgr:V powerhal-libperfmgr:V *:S'
m libperfmgr_test \
&& adb push \
out/target/product/oriole/data/nativetest64/libperfmgr_test/libperfmgr_test \
/data/libperfmgr_test \
&& adb shell /data/libperfmgr_test
Change-Id: Ice07444e38194e5fcf2127e935afdd4d29ff8e87
Signed-off-by: André Draszik <draszik@google.com>
This commit is contained in:
parent
83eaed4b9e
commit
e3f5d8ab1c
6 changed files with 2721 additions and 2 deletions
|
@ -8,6 +8,9 @@ on init
|
|||
# nvmem dump
|
||||
chown system system /sys/bus/nvmem/devices/4-00500/nvmem
|
||||
|
||||
on init && property:ro.boot.vh_sched_available=0
|
||||
setprop vendor.powerhal.config powerhint-mainline.json
|
||||
|
||||
# Toggle glove_mode according to touch_sensitivity_mode
|
||||
on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
|
||||
write /sys/class/spi_master/spi11/spi11.0/glove_mode 00
|
||||
|
|
|
@ -11,6 +11,9 @@ on init
|
|||
# Power Stats HAL
|
||||
chown system system /sys/devices/platform/10d30000.spi/spi_master/spi10/spi10.0/uwb/power_stats
|
||||
|
||||
on init && property:ro.boot.vh_sched_available=0
|
||||
setprop vendor.powerhal.config powerhint-mainline.json
|
||||
|
||||
on fs
|
||||
# Face
|
||||
exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/faceauth.app
|
||||
|
|
|
@ -72,7 +72,8 @@ PRODUCT_COPY_FILES += \
|
|||
|
||||
# Power HAL config
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/raviole/powerhint-oriole.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
|
||||
device/google/raviole/powerhint-oriole.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json \
|
||||
device/google/raviole/powerhint-oriole-mainline.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint-mainline.json \
|
||||
|
||||
# Bluetooth sepolicy
|
||||
include device/google/gs101-sepolicy/oriole-sepolicy.mk
|
||||
|
|
|
@ -79,7 +79,8 @@ PRODUCT_COPY_FILES += \
|
|||
|
||||
# Power HAL config
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/raviole/powerhint-raven.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
|
||||
device/google/raviole/powerhint-raven.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json \
|
||||
device/google/raviole/powerhint-raven-mainline.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint-mainline.json
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
UwbOverlayR4
|
||||
|
|
1365
powerhint-oriole-mainline.json
Normal file
1365
powerhint-oriole-mainline.json
Normal file
File diff suppressed because it is too large
Load diff
1346
powerhint-raven-mainline.json
Normal file
1346
powerhint-raven-mainline.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue