Commit Graph

565 Commits

Author SHA1 Message Date
Jesse Chan
98b4439255 sm7250-common: overlay: configure SQLite to operate in MEMORY mode
This change yields considerable SQLite performance gains. It
should be generally safe as this device has irremovable battery.

Some OEMs have been doing this for years.

Change-Id: I541709fc771d4b501b56b8555e5e8a04486d0293
2021-12-01 13:02:03 +01:00
Albert I
f7aec98ac7 sm7250-common: Remove MIUI packages from auxpackagelist
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ic1a01044ce0f862e8d6e279b6f1a1f163e438931
2021-12-01 13:02:03 +01:00
Albert I
a909d7b427 sm7250-common: fstab: Handle avb= fs_mgr flags correctly
Specifying avb=<vbmeta-partition> is only necessary for first entry of
partition groups that use same vbmeta partition. The following entry can have
<vbmeta-parititon> part omitted.

Test: None
Link: https://source.android.com/devices/architecture/kernel/mounting-partitions-early#fstab-entries
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I5a42fd3de72c400acfae56d6a1e1b85c22a79537
2021-12-01 13:02:03 +01:00
Albert I
d7cdf4b75a sm7250-common: fstab: A-only userdata: nodiscard -> discard
Why it has to be different by itself?

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Iab39004489695da6bde7729f7eb0a65645067b0f
2021-12-01 13:02:03 +01:00
Nolen Johnson
124e049414 sm7250-common: Simplify AVB flag logic
* AVB's `--flags 3` argument builds a disabled VBMeta with
  disabled hashtree, so no need to set both flags individually.

Change-Id: Ibe9ee322a5af58f13e76d53e18dee49451fe8838
2021-12-01 13:02:03 +01:00
Albert I
7d020bc1a8 sm7250-common: Extend vbmeta_system to include product
* matches Qualcomm configuration

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I94604c130794c6b3f87a971be7057854d4920ddb
2021-12-01 13:02:03 +01:00
Albert I
f99724e748 sm7250-common: Import NVRAM blobs
Required to retrieve MAC addresses and save them somewhere in /data/vendor
so stock QTI Bluetooth HAL can read and set correct one, otherwise the HAL
will set a randomized one that always starts with ff:dd.

cnss-daemon isn't affected since nv_mac will write directly to
/mnt/vendor/persist/wlan_mac.bin to be read by WLAN driver.

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I2d95de397c3bab9e3c55171bf0ff833346bef32e
2021-12-01 13:02:03 +01:00
Albert I
d575bac965 sm7250-common: Remove unused pnscr configuration
With pnscr executable itself not imported, these files are useless

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Iacdb690be905dcb5d4eb9a25a606237de5b0110d
2021-12-01 13:02:03 +01:00
Albert I
a91e60f541 sm7250-common: Re-order and update blobs list
* Add missing blobs
* Remove unused blobs

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I653413267d90f6ae737bb982c2d647b2ce2c5749
2021-12-01 13:02:03 +01:00
Albert I
a0d1c94773 sm7250-common: Wire up hardware permissions
Don't advertise (aka copy here) permissions which physical sensors nor
features are either present or available, especially for barometer sensor
which doesn't exist on alioth and apollo. Copy missing permissions for
Wi-Fi, too.

Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Iffc6c8bb696985099738c20140c68a0fe2188899
2021-12-01 13:02:03 +01:00
Albert I
fee02a9e72 sm7250-common: Commonize batterysecret
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I1606bf6669a6b4c229a8783c2598b174df01a1aa
2021-12-01 13:02:03 +01:00
xSylla
27e0587a37 sm7250-common: Commonize HVDCP controller
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Elliott Hughes
6218cdf9f4 sm7250-common: ueventd: Fix EntropyMixer.
/dev/hw_random should be readable by system_server for EntropyMixer to
be able to use it.

Bug: http://b/179086242
Test: adb shell logcat | grep Entropy
Test: android.permission.cts.FileSystemPermissionTest#testDevHwRandomLockedDown
Change-Id: I7dd7faf300f5ce3cab8d02c69be7915238cf61da
2021-12-01 13:02:03 +01:00
xSylla
c74a5a4f8f sm7250-common: sepolicy: Drop Motor hal
*There are no devices on lito that use motor

Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
9b33d47fff sm7250-common: Drop M4DEFS
Change-Id: I43c99687e099d029d99a807bb5384151601c9d36
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
274205fbfa sm7250-common: fod: We don't use wakelock anymore
Change-Id: I805488ef50d5753e070df8efdcf0e2293ef06279
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
53f39f7889 sm7250-common: Kill touchfeature
Change-Id: Iea8dbe1a69906627ffdabca70ecea624435fc53e
2021-12-01 13:02:03 +01:00
Bruno Martins
51a9e88374 sm7250-common: Drop TARGET_QTI_USB_SUPPORTS_AUDIO_ACCESSORY
It is no longer necessary as per the latest QTI USB HAL update
(LA.UM.9.12.r1-11500-SMxx50.0).

Change-Id: I3caf226de247ac45bdcb9b35ab3a4c5b959dc1dd
2021-12-01 13:02:03 +01:00
Bruno Martins
22b9e2fa86 sm7250-common: Unset BOARD_VNDK_VERSION
PRODUCT_USE_VNDK will be true in Android-P or later launching devices
and consequently BOARD_VNDK_VERSION will be set to 'current'.

Change-Id: Iaed3eb4875c00742903627d63b4f2968e356781b
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
84f14b1b39 sm7250-common: Enable TARGET_USES_FOD_ZPOS for FOD devices
Change-Id: Iaf830b7fe46ce42e413aeb9df3e85680735751e8
2021-12-01 13:02:03 +01:00
Demon000
d420784581 sm7250-common: fod: set nit value on sysfs notification
Change-Id: I78069d10677c6704b0bb080ecf76ecbbfd0b2212
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
ea2450e8c5 sm7250-common: fod: Kill touchfeature hooks
Change-Id: Ic935e9165a25f1cfd30002c3df893db1d73ef0d9
2021-12-01 13:02:03 +01:00
Vincent Vidal
423e16f202 sm7250-common: fod: Use FOD_PRESSED_LAYER_ZORDER instead of magic number
Change-Id: I62205bb29c610baaabd1647826f5285c4f639ae7
2021-12-01 13:02:03 +01:00
TheScarastic
29765ee81b sm7250-common: fod: Prepare for in kernel dim and hbm
Change-Id: Id92963ff70a379e02897596b6719a0f3dab37ab2
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
0af33e2d34 Revert "sm8250-common: sepolicy: Bring back displayfeature policies"
This reverts commit 2fd2065970.

Change-Id: If2117ae70378a4e3a4c9ace1cfbe1cf6f36f7ecd
2021-12-01 13:02:03 +01:00
TheScarastic
7eaae54a2b Revert "sm8250-common: Add FODService"
This reverts commit 06f816fd6b.

Change-Id: I75216f8439bdf2fa23b478889e6800014e08226a
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
3025a7063d Revert "sm8250-common: fod: Readd displayfeature hook"
This reverts commit 2a540b832e.

Change-Id: I24e9af15781093533767aa17abfdbb2752f3c160
2021-12-01 13:02:03 +01:00
xSylla
2daeb3ea42 sm7250-common: Update public libraries from monet V12.5.1.0.RJIMIXM
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
568d3785e7 sm7250-common: lights: Import changes from sm8150-common
Change-Id: Ie33f4a9eeecf4632b8eb941d96870db2ae4860ac
2021-12-01 13:02:03 +01:00
doc HD
9b1964a51e sm7250-common: sepolicy: Allow system server to read Fast Charging status
Change-Id: I379dd8f0f49b7f9eee06067bd41e773e8f5e933d
Signed-off-by: xSylla <syllamodder@gmail.com>
2021-12-01 13:02:03 +01:00
xSylla
9041b534f9 sm7250-common: Add back audio.feature props into vendor.prop 2021-12-01 13:02:03 +01:00
mikairyuu
dc8a8fbbbb sm7250-common: fod: Remove "fpc: keep fpc in system-background"
While Google found that fingerprint HAL is insensitive to
increased CPU throughput, we have not found that to be the
case. Allowing more CPUs makes fingerprint unlock up to
2x faster in some tests.

SM8250 device with fingerprint on display:
- Before: 3128ms
- After: 944ms

SDM845 device with fingerprint on the power button:
- Before: 1146ms
- After: 688ms
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
257c3ebaf4 sm7250-common: Add a minimal framework compatibility matrix
* Made with https://gist.github.com/SebaUbuntu/ec053a00a9988eaea091fb1cc1f19324

Change-Id: I180d19e7939ee0c3e9f1aeb04a854f8aaf444235
2021-12-01 13:02:03 +01:00
Alexander Koskovich
0e69772f7b sm7250-common: Disable the usage of ConfigStore.
* As per commit 11a113a67e ("Add disable_configstore").

[SebaUbuntu] Remove manifest entry as well

Change-Id: I5482989a8a96227a3e2a5317eacf613c641bfa8e
2021-12-01 13:02:03 +01:00
Albert I
b457289c98 sm7250-common: Move Goodix fingerprint extension to FOD VINTF fragment
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I41f5b7a927f6fa41a40baf27b458a162ef81a231
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
00fc4934cf sm7250-common: Readd 32bit SCVE and VPP blobs
* Needed for some hardware accelerated codecs

Change-Id: Id0f9ec8541f24b3aad2f80a9bcb2c0d4e3343cf5
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
88b57a99f0 sm7250-common: libqti-perfd-client: Move to C
* Why bothering with C++ mangling when we can just build it as a standard C library?

Change-Id: I45ea977edf7ea7fab6fece76f3049654a8d24c5d
2021-12-01 13:02:03 +01:00
Chenyang Zhong
25e8b87a42 sm7250-common: libqti-perfd-client: return a dummy value
Return a positive integer for perf lock acquire and release so
that Goodix/FPC fingerprint sensor blobs will not complain.

Goodix:
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_acquire: Failed to acquire perf lock, err: 0
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_release: Perf lock release error 0

FPC:
E fpc_tac : fpc_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
E fpc_tac : fpc_perf_lock_release: Perf lock release error 0

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I861672e9a738c2204755d802670f4b28b662f286
2021-12-01 13:02:03 +01:00
Bruno Martins
53fe0183cd sm7250-common: libqti-perfd-client: Remove namespace declaration
It's pointless when using extern "C".

Change-Id: Ibdf9f06a70aa3a75687b33781c78cf2172bb334d
2021-12-01 13:02:03 +01:00
Lucchetto
ddf88c391f sm7250-common: Create dummy libqti-perfd-client
* proprietary perfd blobs can finally be nuked without breaking goodix
* we could even map the functions to use libperfmgr powerhints in the future

Change-Id: I124652f3041761966a3e3bd97c757fecc39cc5fb
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
96a5110ad5 sm7250-common: Stop building vendor.qti.hardware.perf lib
* We dropped QTI perf stack

Change-Id: Ie71344aa05888adb7ad76ad66693547fc50a0025
2021-12-01 13:02:03 +01:00
xSylla
16c47a1821 sm7250-common: Adapt powerhint for Xiaomi SM7250 2021-12-01 13:02:03 +01:00
KakatkarAkshay
70090e239a sm7250-common: Import powerhint.json from android-11.0.0_r32
Change-Id: I552870c130ceaac4d20322acf6d1da22ad5017ec
2021-12-01 13:02:03 +01:00
Bruno Martins
eb9b493f49 sm7250-common: Drop I/O prefetcher
This depends on the already removed QTI perf stack.

Change-Id: I06b9a57f868e77bbcbb77c3970aec723404689f4
2021-12-01 13:02:03 +01:00
Wei Wang
8654b374e5 sm7250-common: Remove QTI perfd
Bug: 69270928
Test: Build and boot device and test camera
Change-Id: I87b283206f462fb5c8ec9cdd303ae2934fe9bfc4
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
01ff578960 sm7250-common: Declare BOARD_VENDOR
* Needed for xiaomi-perfmgr power AIDL guards

Change-Id: Idbb48e0f9b01090a456ad5d3f2d51f4dfab55672
2021-12-01 13:02:03 +01:00
Bruno Martins
74161382a4 sm7250-common: Migrate to Xiaomi power AIDL HAL
Change-Id: I42170d51a517170b58d532addd9c38496e43457c
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
32753ad28c sm7250-common: Build custom lights AIDL
Change-Id: Id7d8c2c5c141dba8006eb6e800dcd8777e1441d6
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
44ef4a8cdd sm7250-common: Kill custom liblights
Change-Id: If4118d490de290780c9f3a46c65f178c6206fa88
2021-12-01 13:02:03 +01:00
Sebastiano Barezzi
b1b0b7af2b sm7250-common: lights: Wire it up
* Heavily inspired by CAF liblights
* Also properly implemented white LED support
* Added chowns where needed (AOSP init.rc already sets some)

Change-Id: Ib9ff8accb163563e19d754f581805bde586d30a9
2021-12-01 13:02:03 +01:00