Commit Graph

179 Commits

Author SHA1 Message Date
Bruno Martins
4d52648b13 sdm845-common: Create RFS symlinks
Change-Id: Ica1d4a9893f526ab98c5ef07e18d51dbf74c8e93
2019-03-14 10:58:22 +01:00
Ameya Thakur
935c350882 sdm845-common: Generate non-hlos image mount points for A/B builds
On builds where A/B support is enabled the system image acts as the
rootfs. In this case we can no longer create the non-hlos image mount
points at run time as we used to. We now create them as part of the
build itself.

Change-Id: I30d98f7c50fca3ce7117b9b8d87150655bb5b440
2019-03-13 19:45:17 +00:00
tomascus
5a704c4ac3 sdm845-common: power: Don't use SCROLL_PREFILING
The current use of the SCROLL_PREFILING hint hurts scroll performance
and results in a lot of dropped frames.

The hint ID corresponding to SCROLL_PREFILING only takes into effect for
a default timeout value of 80 ms (as found in perfboostsconfig.xml),
while the duration value in the process_interaction_hint function runs
for a much longer time, from 1500 ms up to 5000 ms (bounds of
kMinFlingDuration and kMaxInteractiveDuration). During the period
of time, when the timeout value has elapsed and current time is less
than duration, another interaction hint cannot be processed. Therefore,
if the user decides to scroll during this period, high frame drops can be
experienced as the CPU freq isn't raised by processing another hint to
account for this additional scrolling.
By only using SCROLL_VERTICAL, fluidity can be maintained, improving user
experience.

Change-Id: I2fbde8b2db6710d262e9a058e0bc9c02e524648c
2019-03-06 23:45:23 +00:00
tomascus
607158687a sdm845-common: power: Release launch boost perflock when launch is completed
Currently, the launch boost perflock is held for a fixed duration, either
specified in perfboostsconfig.xml for perf HAL platforms or hardcoded in the
powerHAL for non-perf HAL platforms.

Using a fixed duration for this perflock has two shortcomings:
* perflock can be held for too long, causing the CPU freq and other resources
  to be boosted for too long even if the application has finished launching,
  resulting in excessive battery drainage
* perflock can be held not long enough if it takes more than the timeout
  time to finish launch

The framework sends out a powerhint for both when launch starts and when
launch ends. The launch finish hint can be used to signal when to release the
perflock.

Reference: Wahoo power-libperfmgr

Change-Id: I405cc453c5f58d9fb2583b9c6017f3964a0ce024
2019-03-06 23:45:23 +00:00
Giuseppe Barillari
d5b042464f sdm845-common: Override stock power HAL service definition
The service must be made part of the input group,
so that the power HAL can access the input nodes present
in the different targets.

Change-Id: I30a7bde8aebac4b76cbf59f5f795ea245aba1014
Signed-off-by: Giuseppe Barillari <joe2k01dev@gmail.com>
2019-03-06 11:14:23 +01:00
Giuseppe Barillari
8999a92ba0 sdm845-common: Decommonize tap to wake node path
Signed-off-by: Giuseppe Barillari <joe2k01dev@gmail.com>
Change-Id: I74beac5a38f9f9df31e83f7e81115c61109c28cb
2019-03-06 11:14:23 +01:00
Ananth Raghavan Subramanian
d1a289d2fb sdm845-common: power: Clean up code and add generic hint handling
Removed unused code and added generic hint handling to power.c file,
does not need to be device specific anymore.

Change-Id: I0d4e2a73de0ce4d3735314d2e49ba58c23eb313c
2019-02-26 19:33:51 +00:00
Rajashekar Adi
69bcde86de sdm845-common: power: Fix for VNDK compliance issue
VNDK flag enablement for P upgrade

Change-Id: I033c3d9c8a1ee1e7f52a6398ae989becd66d161e
2019-02-26 19:33:51 +00:00
Vinay Verma
9b946f5c95 sdm845-common: power: Fix VNDK compilation errors
VNDK restrictions doesn't includes standard headers by
default, add them explicitly.

Change-Id: I4c72a28ffa141ecadcfe47cc7c1f62f2a0c8576e
2019-02-26 19:33:51 +00:00
Artem Borisov
807d0b3b87 sdm845-common: Add QCOM's WFD implementation
* Sadly, out-of-the-box Miracast support was killed in P, so
  we need this to keep Wi-Fi display feature working.

Change-Id: Ieff24313d55a60ca1898430113f0a8b00acfc6a0
2019-02-26 10:39:26 +01:00
Praveen Chavan
d2dcfe6fa4 sdm845-common: mediacodec: Allow syscalls needed by OMX component
perf daemon needs uname, ueventd, timer_create,
timer_settime, rt_sigtimedwait syscalls. Add them
to media.codec's whitelist.

CRs-Fixed: 2062950
Change-Id: Ib07d73140470d9def0d9411469ee1525e13f4bc7
2019-02-23 22:34:00 +00:00
Umesh Pandey
1a4cc984e7 sdm845-common: mediacodec: Allow syscall for VPP
Add inotify_intl, inotify_add_watch and inotify_rm_watch for VPP.

CRs-Fixed: 2058795
Change-Id: I294b03f4a46020a022cacf1267ebf68b0bdd6e19
2019-02-23 22:34:00 +00:00
Amit Shekhar
2450f26ee9 sdm845-common: Add system call to the SE whitelist
Add system call to the SE policy whitelist

Change-Id: I1793d20c49f838929aa0dc1720eb062535ae8f09
CRs-Fixed: 2050577
2019-02-23 22:34:00 +00:00
Amit Shekhar
8cccc37437 sdm845-common: mediacodec: Allow select and eventfd syscalls
Add pselect6 and eventfd2 syscalls
Includes following:
mediacodec: allow sendto and recvfrom syscalls
mediacodec: allow lseek syscall
mediaextractor: allow pread64 and readlinkat syscalls
mediacodec: allow getdents64, sysinfo and getcwd

Vendor extended policy files are separated from the aosp
and will now reside in /vendor

Change-Id: If59d04b36d744efb74209ae36e76dd16cb18f606
CRs-Fixed: 2027600
2019-02-23 22:34:00 +00:00
padarshr
b6b2ed17aa sdm845-common: Add device compatibility matrix.
Add device compatibility matrix to common project and
targets can point the build variable DEVICE_MATRIX_FILE to
this file to build device compatibility matrix.

Change-Id: If8e75c5ee8de0ef50d6937ffbd6453fb3f5eb648
2019-02-22 22:11:03 +00:00
Shaikh Shadul
96d21d9097 sdm845-common: config.fs: Add mapping for sensors daemon
Set filesystem configuration for sensors daemon binary.

Change-Id: I499ad9b987a43e79b8037da5761e14e97b2ef9c9
2019-02-22 22:11:03 +00:00
Baili Feng
581f14a21f sdm845-common: Allow xtwifi-client to access wake alarm
Add WAKE_ALARM for xtwifi-client
CRs-Fixed: 2109587

Change-Id: If42eb7f0890d32511e5082498f8edb9c11b72d52
2019-02-22 22:11:03 +00:00
Bruno Martins
01e0667bd3 sdm845-common: Remove unused jars and not required libs
Change-Id: I6de33d6782cca86ba59ab76cb901b635de8446e0
2019-02-21 23:18:06 +00:00
Bruno Martins
da01ce8c5f sdm845-common: Add dependencies required by MIUI 9.2.15 vendor images
Change-Id: If42872a196df57e94afe1aecd816098bb7a80d8c
2019-02-21 22:58:04 +00:00
Bruno Martins
8b2d4986c2 sdm845-common: Sync framework compatibility matrix with MIUI 9.2.15
Change-Id: Ifc3a832a2f84cbe36a6f785ce4b72d83f9a7986c
2019-02-21 22:56:28 +00:00
Luca Stefani
0c11507a79 sdm845-common: sepolicy: Address all neverallows
Change-Id: I7320018af86e0fe689aa94a1dc4f174bc814a2cd
2019-02-10 13:36:18 +00:00
TheScarastic
86c208962d sdm845-common: Disable diag services in a better way
Instead of bind mounting /dev/null over the vendor binaries,
force the services to be stopped right whenever those are running.
This also reverts commit 1501593 and workarounds the neverallows,
because system init can't bind mount vendor exec files.

Change-Id: Ia5e723b837e547b9e2cebe47accdaa2356e1d694
2019-02-10 13:25:02 +00:00
Bruno Martins
edc5c7c71b sdm845-common: Replace SunlightEnhancement class with LiveDisplay HAL
* Manifest entries must now be set per device.

Change-Id: I17b0215ad78d86989c146291552c5e6e7b6a689d
2019-02-07 10:03:17 +01:00
Bruno Martins
439a75cfd4 sdm845-common: Satisfy LiveDisplay with neverallows addressed
* On TREBLE devices, most coredomains should not access vendor_files.
   For this reason, vendor.display.color@1.0.so must be present in /system
   so that libsdm-disp-apis.so can dlopen it.

Change-Id: I850b123ea23dd3e7cc74ee9708e781748561df06
2019-02-04 22:43:58 +00:00
Joey
fc0d900644 sdm845-common: Build Trust HAL (system variant)
Change-Id: I2a426b2c2dda70f41e3c3ea6f85905b0daf65f0d
Signed-off-by: Joey <joey@lineageos.org>
2019-02-04 20:50:33 +01:00
Bruno Martins
83fbc69376 sdm845-common: Migrate to livedisplay 2.0
Change-Id: I513c284c534ce3abc27bf374513280171454f4d1
2019-02-04 19:38:18 +00:00
Bruno Martins
7131c7c8bd sdm845-common: sepolicy: Adapt for global LiveDisplay HAL rules
Change-Id: Ia2f70d3f73d96d70f1b4ea6f31f0e8572ddc1957
2019-02-01 19:57:58 +00:00
Giuseppe Barillari
ad8dd84182 sdm845-common: sepolicy: Move hal_power_default back to hal_power
Change-Id: Ibf1e11111466377ecd6090c2956d638f9500bfc3
Signed-off-by: Giuseppe Barillari <joe2k01dev@gmail.com>
2019-01-31 21:28:18 +01:00
TheScarastic
cdd2d459d5 sdm845-common: Switch to more generic dt2w node
Change-Id: I08c874f3ca50fad1db820ddd85ef0f5d7ccf0ed2
2019-01-31 00:38:14 +01:00
dianlujitao
d7af84b53b sdm845-common: sepolicy: Label vendor.camera.aux.packageblacklist
Change-Id: I07b82e0ba4a8e16faf67c64e0ffe73a690b38064
2019-01-21 19:49:16 +00:00
Henrique Silva
6d6984b261 sdm845-common: parts: doze: Fix AoD default pref
* Fixes non-working pulse notifications from sensors until user toggles
  the main switch and also sets the proper initial status of the
  AoD preference for the devices that have the feature available.

Signed-off-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
Change-Id: I8e554decca3734b165fdc722d904d90713666db9
2019-01-19 02:00:52 +01:00
dianlujitao
ed8e3f6165 sdm845-common: sepolicy: Allow system_server to read vendor camera props
Change-Id: I43a2404d9399a931b03e1d2c8589d0d4adb10fc3
2019-01-19 00:37:40 +00:00
Bruno Martins
38c5e76daf sdm845-common: sepolicy: Label special rootfs files
* This is needed for system-as-root enabled builds to complete.

Change-Id: I50dcc45b3c3b8c8fa673de794e6a64582fcd9dd2
2019-01-13 14:40:43 +01:00
Michael Bestas
de58adc362 sdm845-common: Set TARGET_PROVIDES_QTI_TELEPHONY_JAR
* Avoids the following warnings on every single rebuild of anything:
build/core/Makefile:28: warning: overriding commands for target
 `/out/lineage-16.0/target/product/polaris/system/framework/qti-telephony-common.jar'
build/core/base_rules.mk:412: warning: ignoring old commands for target
 `/out/lineage-16.0/target/product/polaris/system/framework/qti-telephony-common.jar'

Change-Id: Idffe1a95d5ddac0ef3d6c74e3d55293b553e51ba
2019-01-13 00:17:20 +01:00
TheScarastic
66332b17a9 sdm845-common: Commonize display post-processing properties
* Xiaomi is inheriting them from common tree

Change-Id: I07f732c79d6493c4a1372d3faa1bb81a630010fd
2019-01-12 11:54:26 +01:00
Bruno Martins
a0d7bcb47f sdm845-common: Add support for high brightness mode (HBM)
Change-Id: I2b66142a024390a8992e6b940a7c06092e45aad3
2019-01-12 01:47:36 +01:00
Bruno Martins
07f913c6d0 sdm845-common: Add support for equuleus and perseus
Change-Id: Ie13bb76bd338f1f971eb366962677e287f0c0471
2019-01-12 00:52:06 +01:00
Bruno Martins
be65d0a523 sdm845-common: Prepare for compatibility with system-as-root targets
* All new devices launching with Android 9 must use system-as-root,
   which is the case of MIX 3 (perseus). Move stuff that goes against
   such setup to the individual device trees.

Change-Id: I1178d0ac197634547e5771b3ae4e9cf6e15db3c8
2019-01-12 00:50:01 +01:00
Luca Stefani
0f2de0d635 sdm845-common: doze: Check if AOD is enabled after boot
* The service should not start if AOD has been turned on by the user.

Change-Id: I79307adbcda57e663287714ef15830da4f285131
2019-01-09 01:06:42 +01:00
Luca Stefani
ad3c6f559b sdm845-common: doze: Move DozeUtils.checkDozeService in an handler
* There's no need to manually write to the gestures prefs
  as long we are sure the handler is run after we return true
  in the onPreferenceChangeListner

Change-Id: I090c0c6c91267aff69c45365b95b5f5e26d07b07
2019-01-08 21:21:14 +00:00
Luca Stefani
c1ee5ce2d1 sdm845-common: doze: Make AOD preference not persistent
Change-Id: I9d80e94de02d35c85765302a01b53020824dd0ff
2019-01-08 21:21:11 +00:00
Bruno Martins
f77c8a022d sdm845-common: Declare STATE_DOZE support
* This is required for Ambient Display to work properly.

Change-Id: Ibad86be4e1c43a221fc2224d0a8f8ca2c938a6c7
2019-01-07 13:56:56 +01:00
Bruno Martins
efb5481819 sdm845-common: parts: Add AOD support to Ambient Display
* This makes the always on display mode feature visible for those
   devices that explicitly set it as available via AOSP overlay.
   Should only be enabled on devices where the display has been tuned
   to be power efficient in DOZE and/or DOZE_SUSPEND states.

Change-Id: If543936f9421dd7a6c0be594f7cb76afb227e34b
2019-01-06 16:26:48 +01:00
Joey
8d88c66b5d sdm845-common: parts: Match Pie settings UI
Change-Id: Ia1cde37923c55faf057189f7085b69522e2802ef
2019-01-06 15:32:39 +01:00
Bruno Martins
b783b4feec sdm845-common: Convert XiaomiDoze into XiaomiParts
* This is the preparation for turning the package into
   an unified device-settings app.

Change-Id: I425ad525edcc63c2dcccd1e2fb8459f442744970
2019-01-06 15:32:39 +01:00
Wei Wang
7690a1c964 sdm845-common: power: Use monotonic time for interaction boost
Using the wall clock will cause boosts to be disabled
when/if the clock is adjusted backward.

Bug: 29191415
Bug: 29208304
Change-Id: I8af5f40b46d996ce7bccb8324fc186e2f3a5b267
2019-01-05 20:01:37 +00:00
BeYkeRYkt
cbf9d771a4 sdm845-common: power: Handle launch and interaction hints
* MP-CTL does not handle POWER_HINT_INTERACTION and POWER_HINT_LAUNCH
   directly. Requests for processing are sent by Qualcomm BoostFramework
   (QPerformance) at the framework service level. Since we do not have
   BoostFramework, process POWER_HINT_INTERACTION and POWER_HINT_LAUNCH
   in PowerHAL to ensure a sufficient level of performance.
 * For proper operation, perfboostsconfig.xml file is required.

Change-Id: I9fedcbaa189147c91d932711c831c2ce038a7ec7
2019-01-05 20:01:37 +00:00
Garik Badalyan
fff1fca06c sdm845-common: White-list telephony modules.
Some telephony modules require access to
platform APIs, i.e. @hide, and hence need
to be white-listed. This change white lists
these packages.

Change-Id: I1dfd9478b59f52350e4e7ecfdb2b80f1178cfd9c
CRs-Fixed: 2219897
2019-01-03 12:05:31 +00:00
Bruno Martins
7c437713b5 sdm845-common: Build system variant of LiveDisplay HAL
Change-Id: I2d9056950338eafb06e857c4028d2c4d31cb6d77
2019-01-02 11:11:37 +00:00
dianlujitao
c8bb263e5b sdm845-common: Support Alipay and WeChat fingerprint payment
* IFAA manager is based on OnePlusOSS, but adapted for Xiaomi's mlipay
   interface.

Change-Id: Ied17d6456561bb399e4dd4a868d57a48d2d51db2
2019-01-02 06:35:04 +01:00