126 Commits

Author SHA1 Message Date
thepriyanshujangid
7319331888 redwood: Switch to QTI power hal
Signed-off-by: thepriyanshujangid <priyanshujangid@yahoo.com>
2025-10-12 18:31:54 +05:30
kamikaonashi
52eeea9216 redwood: rootdir: dont stop statsd anymore
on Android 16, this causes logspam of "W libc    : Unable to set property "ctl.interface_start" to "aidl/stats": PROP_ERROR_HANDLE_CONTROL_MESSAGE (0x20)"
did google fix the battery drain?

Signed-off-by: thepriyanshujangid <priyanshujangid@yahoo.com>
2025-10-12 18:31:54 +05:30
Silesh K Nair
116f525dea redwood: rootdir: Prefer deep over s2idle for yupik 2025-10-12 18:31:54 +05:30
Chenyang Zhong
32c9ac8cc2 redwood: rootdir: switch to lz4kd for zram
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2025-10-12 18:31:54 +05:30
chrisl7
25d218e190 redwood: Import XiaomiParts from surya device tree 2025-08-27 10:12:19 +05:30
Dhina17
8b66ff518e redwood: Implement torch light control
Signed-off-by: rahul <rahul@aospa.co>
Co-Authored-By: rahul <rahul@aospa.co>
Co-Authored-By: John Galt <7730016+realjohngalt@users.noreply.github.com>
2025-08-27 10:12:18 +05:30
xboxfanj
2fd4422b9c redwood: Increase CPU Boost duration from 120ms to 200ms
* Follow https://gerrit.aospa.co/c/AOSPA/android_device_qcom_common/+/36970
2025-08-27 10:12:18 +05:30
Jake Weinstein
3efca0204d redwood: Do not balance msm_drm and kgsl_3d0 IRQs
These are critical for display performance and should not be balanced
in order to improve latency and responsiveness.

And also affine them.

Change-Id: If49ecb8757d133a7fad0d7946837b35403e57c2a
2025-08-27 10:12:18 +05:30
Wei Wang
b2bcbfab47 redwood: Switch to lineage power-libperfmgr 2025-08-27 10:12:18 +05:30
Adithya R
d3e1cf74a2 redwood: rootdir: Move citsensorservice to background cpuset
This service hogs a considerable amount of CPU all the time as its
busy calculating compensation for our under-display light sensor
(and also spamming logcat, which we can take care of later).

  PID USER         PR  NI VIRT  RES  SHR S[%CPU] %MEM     TIME+ ARGS
 1969 system 20 0 12G 9.2M 9.0M S 4.6 0.1 1:13.15
vendor.xiaomi.sensor.citsensorservice@2.0-service

Move it to background CPU set like the sensors multihal to lower
power consumption from big cores.

Change-Id: I8c7b2835b2b53654642ac20fd97df3b8a5ad96eb
2025-08-27 10:12:18 +05:30
feiyuchen
9f000f0ac4 redwood: rootdir: Add "system" group to Audio HAL
needed for using EdgeTpu.
Due to this code goes to AOSP, please see CL details and test result in
b/289097511#comment24.

Bug: 289097511
Change-Id: Ie0969309346cd85b4bb8ac71860a529710c73345
2025-08-27 10:12:18 +05:30
Andy Hung
619dbd8b68 redwood: rootdir: Optimize for Spatial Audio
Add CAP_SYS_NICE.
Allow util_clamp_min for Spatializer Effect worker thread.
Reduce glitches caused by core migration.
Reduce power consumption as Spatializer Effect is DSP compute bound.
This change only affects Spatial Audio Effect processing.

Test: instrumented
Test: adb shell 'uclampset -a -p $(pgrep -of
android.hardware.audio.service)'
Test: adb shell cat "/proc/$(adb shell pgrep -of
android.hardware.audio.service)/status"
Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)'
Bug: 181148259
Bug: 260918856
Bug: 261228892
Bug: 261686532
Bug: 262803152
Merged-In: I59ea99e8a1720f61954747f6c29e14cfea9a0f56
Change-Id: I59ea99e8a1720f61954747f6c29e14cfea9a0f56

Change-Id: I21697423e8c20b34040c5a6641126918b0d75bb5
2025-08-27 10:12:18 +05:30
emilchung
d4684aa8b7 redwood: rootdir: add context_hub into audio hal group
While implementing the capo nanoapp for audio configuration, we met
some chre socket connected error due to the access group denied.

Add context_hub group for audio hal to connect chre socket.

go/capo-algo

Bug: 141128522
Bug: 149069556
Test: FULL build with audio hal part and local prebuilts nanoapp.
Test: Audio HAL communicates normally with CHRE socket.
Change-Id: Iea84411682f4c3e08f8b37a5b21818b0e9b04983
2025-08-27 10:12:18 +05:30
Giovanni Ricca
8217f8394d redwood: sepolicy: Drop vendor_sysfs_double_tap definition
* We use `/dev/xiaomi-touch` to handle dt2w.

Change-Id: I86f733ad1b0a1d28de67e39b987a8bf19a9dcd5b
2025-08-27 10:12:18 +05:30
Chenyang Zhong
2afcd39464 redwood: rootdir: import diag related usb entries
Looks like apps like Network Signal Guru connects to the diag-router
through an emulated(?) USB device.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2025-08-27 10:12:18 +05:30
dianlujitao
f67dfeae4c redwood: Nuke ATFWD
It's normally not used at all.

Change-Id: Idb824b3b8c783b6ac962e604df05f9154beb4ed2
Signed-off-by: iHSAN <ihsanulrahman@gmail.com>
2025-08-27 10:12:18 +05:30
Sebastiano Barezzi
034d67654a redwood: Partially revert "Move to QTI health AIDL service"
https://github.com/LineageOS/android_system_core/blob/lineage-21.0/init/init.cpp#L1099

This partially reverts commit 4aca996701ea82f0d8dbe1b26715354442d166ab.

Change-Id: I284f80f364e9057a8373a015f0acaee3ef9e395d
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
2025-08-27 10:12:18 +05:30
SVB
ed5621a508 redwood: rootdir: Allow all filesystems for USB-OTG
Change-Id: Ie9cef57485c337c39bae559a71582b4c66127d85
2025-08-27 10:12:18 +05:30
Alexander Koskovich
8035432d8f redwood: rootdir: Drop vm-bootsys from fstab
* Unused, and e2fsck is angry that it can't be opened
   because of lack of SEPolicy anyways.

Change-Id: I53d12572ca11f277a09b06b41e821d6acffcd121
2025-08-27 10:12:18 +05:30
Terminator-J
e2e78156b6 redwood: rootdir: Fix the battery drain due to statsd...?
- Could it really be so simple?
2025-08-27 07:36:13 +05:30
basamaryan
d536d719c2 redwood: rootdir: Fix PowerOffAlarm 2025-08-27 07:36:13 +05:30
Michael Bestas
18a17aa9f1 redwood: Build Lineage Health HAL
Change-Id: I70cc903a03ac9fa3303bb8fa039c9de4806449bf
Signed-off-by: thepriyanshujangid <priyanshujangid@yahoo.com>
2025-08-27 07:36:13 +05:30
Adithya R
fed34b7fdb redwood: rootdir: Enable predicted load boosting for yupik
Why should only lahaina have all the fun ?;)
2025-08-27 07:36:12 +05:30
Andy Hung
97b87675ac redwood: rootdir: audio HAL: Enable RT priority inheritance 2025-08-27 07:36:12 +05:30
Zhou Song
0ed8851741 redwood: rootdir: audio Start audio rpc daemon early to improve performance
Audio HAL initialization relies on rpc daemon to load
dynamic libs, if daemon is not ready when HAL tries
to load libs, HAL has to wait until that finished.
Start this daemon early can smooth boot up of audio HAL
process, as this can save time for dynamic libs loading.

Change-Id: Id05ffc46fab812a718b6cb601e0610974b123679
Signed-off-by: JaswalAshish <ashish@m.ms.evolution-x.org>
2025-08-27 07:36:12 +05:30
theangelofdead01
01b7f93b5b redwood: rootdir: Remove some data cache
fix some string issues on dirty flash update ROM zips

Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
Signed-off-by: aswin7469 <aswinas@pixysos.com>
2025-08-27 07:36:12 +05:30
Mao Jinlong
23a218793d redwood: rootdir: Add vendor prefix to batterysecret and mi_thermald 2025-08-27 07:36:12 +05:30
Randall Huang
b8c7409e03 redwood: rootdir: fstab: Set data=journal,commit=1 for /metadata
Since Ext4 doesn't implement "-o sync", it commits metadata at every 5 secs.
This may cause /metadata corruption.

Bug: 162883014
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Randall Huang <huangrandall@google.com>
Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Signed-off-by: ralph950412 <ralph950412@gmail.com>
Change-Id: Icd38754bad1b1529d01165ea8c703c214d20bb4b
2025-08-27 07:36:12 +05:30
Pranav Vashi
694041f782 redwood: rootdir: Reset readahead values for 128 always 2025-08-27 07:36:12 +05:30
Jake Weinstein
2c7fe4fdc8 redwood: rootdir: Disable multiple kswapd threads
https://lore.kernel.org/lkml/20180403133115.GA5501@dhcp22.suse.cz/
2025-08-27 07:36:12 +05:30
Astridxx
20c9529d29 redwood: rootdir: Use /vendor/bin/ where possible 2025-08-27 07:36:12 +05:30
Jake Weinstein
f8f37e0e2c redwood: rootdir: Use foreground uclamp for hwcomposer
Matches SF, makes sure rendering always
has enough capacity.

Also switches to task_profiles.
2025-08-27 07:36:12 +05:30
Vishalcj17
d51bba5dd8 redwood: rootdir: Switch hwcomposer to foreground CPU set
* Greatly affects the performance/latency of the display
   considering you have foreground set to 0-6 cores on <SM7350
   whilst being power efficient.

 * This shows an improvement on HWUI graph and even jankbench.
2025-08-27 07:36:12 +05:30
Jake Weinstein
08eb30d1bf redwood: rootdir: Disable multiple kswapd threads
https://lore.kernel.org/lkml/20180403133115.GA5501@dhcp22.suse.cz/
2025-08-27 07:36:12 +05:30
Vivekachooz
af3ef441eb redwood: rootdir: Set swappiness to a lower value of 60
* Setting swappiness to 100 cause aggressive swap writing which
  further leads to unusual lags
2025-08-27 07:36:12 +05:30
Jake Weinstein
559ac48e8d redwood: rootdir: Move background cpuset to CPU0-1
Background tasks are not UX-critical.
Free up cores to work on more important
UX tasks.
2025-08-27 07:36:12 +05:30
Adithya R
3d548deaef redwood: rootdir: Move citsensorservice to background cpuset
This service hogs a considerable amount of CPU all the time as its
busy calculating compensation for our under-display light sensor
(and also spamming logcat, which we can take care of later).

  PID USER         PR  NI VIRT  RES  SHR S[%CPU] %MEM     TIME+ ARGS
 1969 system       20   0  12G 9.2M 9.0M S  4.6   0.1   1:13.15 vendor.xiaomi.sensor.citsensorservice@1.1-service

Move it to background CPU set like the sensors multihal to lower
power consumption from big cores.
2025-08-27 07:36:12 +05:30
Jake Weinstein
1eb570f4b3 redwood: rootdir: Make less cores available for background tasks
With SurfaceFlinger and HWC on the foreground cpuset,
important rendering tasks are moved off of the background
cpusets, so let's reserve one little core for foreground
and top-app.

Change-Id: I4f0982f3ff4dce756095667df0d08f18817b896a
2025-08-27 07:36:12 +05:30
Jake Weinstein
f18c481210 redwood: rootdir: Do not allow restricted tasks to run on big cores
The restricted cpuset is for system tasks that are
throttled because the screen is off. Google only
runs these tasks on the little cluster
to save power and we will follow suit.
2025-08-27 07:36:12 +05:30
Chenyang Zhong
a19e24caac redwood: rootdir: avoid migrating foreground tasks to X1
The Cortex-X1 core is quite power hungary. Let's only use it for
top-app tasks. Avoid migrating foreground tasks to X1 to reduce
unnecessary bumps of X1's frequency and save some battery.
2025-08-27 07:36:12 +05:30
Rick Yiu
7fa32de90d redwood: Remove some camera-daemon commands
Those commands have moved to init.rc.

Bug: 170507876
Bug: 171740453
Test: build pass
Change-Id: Icfe520e7f7367461607cc8fb5e524d9699e79124
2025-08-27 07:36:12 +05:30
Bruno Martins
fe5f2e3edc redwood: Switch to QTI health AIDL service
The health AIDL HAL service provides functionalities of charger,
therefore system charger at /system/bin/charger is deprecated.
On top of that, QTI health AIDL HAL service enables suspend by
default, the equivalent of setting ro.charger.enable_suspend
for legacy charger.

Change-Id: I59c23e7974cea1174b0161f31a535fa3afa1e5c9
2025-08-27 07:36:12 +05:30
Jens Reidel
80ffbef28f redwood: Disable NFC for redwoodin
[Tashar02]:
- In sm8350 family, redwood is an exception where the Indian variant
  does not contain NFC; only the China and Global variant do.
- This patch is imported from [1] and adapted to sm8350-common accordingly
  based on patchset [2].

[1] https://github.com/cupid-development/android_device_xiaomi_sm8450-common
[2] sm8450-common: Allow choosing NFC supported SKUs
    sm8450-common: Build nxp nfc service from source
    sm8450-common: Remove more nfc related features for non nfc skus
    sm8450-common: Don't override nfc services for no nfc skus
    sm8450-common: Drop nfc services from manifest since they have fragments

Change-Id: Ia14a6c93e6320c8dfa1df2957e19b51a267c2234
Co-authored-by: Arian <arian.kulmer@web.de>
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: thepriyanshujangid <priyanshujangid@yahoo.com>
2025-08-27 07:35:37 +05:30
TheStrechh
80662f0f8f redwood: rootdir: Add missing camera dir
* redwood needed for camera works
2025-08-17 16:42:02 +05:30
ad1tyas1ngh
0d99524444 redwood: rootdir: We don't have panel1-backlight
Signed-off-by: ad1tyas1ngh <adityasingh1768@gmail.com>
2025-05-23 17:21:21 +05:30
TheStrechh
a2b13a302a redwood: rootdir: we use yupik post_boot
* redwood is sm7325/yupik platform so having lahaina/shima is useless.
2024-09-29 19:18:44 +05:30
TheStrechh
a1e3a93ca2 redwood: Drop fingerprint fpc stuff 2024-09-29 19:18:44 +05:30
TheStrechh
ecc0204269 redwood: Drop udfps 2024-04-10 18:02:23 +05:30
thepriyanshujangid
e2135b5197 redwood: Drop Build Lineage Health HAL
This reverts commit 34f8a45de0.
2024-04-10 18:02:23 +05:30
thepriyanshujangid
b24144bda0 redwood: Drop Switch to /vendor_dlkm for kernel modules
This reverts commit 8bd2080cc3.
2024-04-10 18:02:23 +05:30