Commit Graph

736 Commits

Author SHA1 Message Date
Wang Han
cb263621b9 sdm845-common: Remove custom vsync offsets
* The values are kanged from hammerhead and may introduce
   latency as it is not selected for any of our panels
   and stock does not set these values in the first place.

Change-Id: Iee854ea77d1e8216c8f01aee2f71a178ffcfaf5c
2020-06-26 18:20:43 +01:00
Sujin Panicker
c2ee9c019e sdm845-common: media: Fix rank of QC OMX components
Rank OMX SW codecs higher than C2 codecs except for opus codec.

Change-Id: Ided16f454fcb3b760076500e87759bcbb44f75ed
2020-06-20 15:51:09 +01:00
Suren Baghdasaryan
4dbe15b441 sdm845-common: Increase ro.lmk.medium to prevent kills at medium vmpressure
Setting ro.lmk.medium to 800 to prevent important processes from being
killed at medium vmpressure levels.

Bug: 77299493
Test: lmkd_unit_test
Merged-In: I37e1651a0a2b148a852e5bde86501024d4f87bbf
Change-Id: I37e1651a0a2b148a852e5bde86501024d4f87bbf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit c954ec2eb318518cfa5c6f64a688fd8c809e91c5)
2020-06-15 08:51:42 +02:00
LuK1337
77bd24b159 Revert "sdm845-common: Enable qti-telephony-common aosp_usr_pref_sel"
* Seems like mobile data doesn't get toggled
  properly after doing this...

This reverts commit f5e6804eff.

Change-Id: I833a2d79c3d1b1ff2a0cb0b94f44d0eda9efab03
2020-06-06 18:29:14 +02:00
Bruno Martins
d7ecc15075 sdm845-common: Update to MIUI V11.0.5.0.QDGMIXM global stable blobs
Reflect the new source of blobs and matching vendor SPL.

Change-Id: Ic6149e0638e401bd10895abcf1028ced66a54797
2020-06-03 21:34:47 +02:00
LuK1337
f5e6804eff sdm845-common: Enable qti-telephony-common aosp_usr_pref_sel
* That allows us to set calling account to 'Ask every time'
  without it being reset to sub 1 every boot.

Change-Id: Ifb204fd07ec232fe3c55a92b6fc286786782c28b
2020-05-27 16:38:25 +02:00
Bruno Martins
5105108390 sdm845-common: sepolicy: Label additional fingerprint sensor props
Change-Id: I71c2a29668e2cea7b8fbb9f598eefda4d729f040
2020-05-25 22:04:42 +01:00
TheScarastic
eeb430c35f sdm845-common: fod: Always use HBM
Change-Id: If021076e52bba92265860f6d6104374d2ff5eb81
2020-05-25 21:19:34 +01:00
Demon000
c5afd59f64 sdm845-common: Implement in-screen fingerprint HAL
Change-Id: If38552f7f702c688850bfe778a7fbb08c2835c0e
2020-05-25 21:19:34 +01:00
Pig
be2e5896a3 sdm845-common: fingerprint: Add Xiaomi fingerprintextension support
Co-authored-by: C457 <android.c357@gmail.com>
Change-Id: Ie9deb0dfcc689034cd3c4b9095e319130ba8d8cd
2020-05-25 21:19:34 +01:00
Bruno Martins
5673a03633 sdm845-common: fingerprint: Allow loading FOD modules
As seen in the vendor image dumps, equuleus ships with goodix_fod
and ursa with goodix_fod or synaptics.

Change-Id: I2ccef59698a570dcb35c331dd7994fb7f7af68f0
2020-05-25 21:19:34 +01:00
sdv22
643f91b165 sdm845-common: Drop BUILD_WITHOUT_VENDOR board flag
This is no longer a thing in CAF HALs and is currently causing breakage
since the HALs are now guarded with this flag.

Change-Id: I740e2f122a6d3a1896dc11f06d87949553ab7bb1
2020-05-25 21:19:34 +01:00
Bruno Martins
63050f58df sdm845-common: Specify the source of common blobs
Change-Id: I38bd7d529f8ac47f108b111f7dbec07141839cd7
2020-05-24 10:18:02 +02:00
Bruno Martins
1be278d083 sdm845-common: Also allow extracting target device blobs only
Change-Id: Ib5157b1e182ac6faf212793871ddff28fc32063d
2020-05-24 10:17:08 +02:00
Michael Bestas
e882c6338d sdm845-common: sepolicy: Label fpc_kpi property
Change-Id: I627b2059af7ef2e879bc730523ac99f69853193d
2020-05-22 10:17:11 +02:00
LuK1337
c036c4f8eb sdm845-common: fingerprint: Don't set ro.boot.fpsensor
* It's useless.

Change-Id: I29357c1fbbd7752f3631d9b7f1ce63b61bb41cd0
2020-05-21 22:26:56 +01:00
Bruno Martins
0ed548280a sdm845-common: Drop no longer needed fingerprint blobs
Change-Id: I929173154ccc661214c6690c5f9386891a5ab374
2020-05-21 22:22:46 +02:00
LuK1337
dc1dc760b9 sdm845-common: Make fingerprint HIDL fully treble compliant
This is more like a hack, also observed in the stock HAL, for pre-P shipped devices
because those have fpdata store path set to /data/system/users/ by the FingerprintService.

Force treble compliant path and thus avoid using data_between_core_and_vendor_violators
attribute:

 > typeattribute hal_fingerprint_default data_between_core_and_vendor_violators;
 > # access to /data/system/users/[0-9]+/fpdata
 > allow hal_fingerprint_default fingerprintd_data_file:dir rw_dir_perms;
 > allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms;

Change-Id: I388f993de7f95fc68007d945f5a9cc975afde120
2020-05-20 08:39:28 +01:00
Demon Singur
f1cfbb82e7 sdm845-common: Import fingerprint HIDL
Change-Id: I733eea70dc637fa61c2e3a8036100de7febd71a9
2020-05-20 08:29:03 +01:00
Bruno Martins
81a8e1e8a5 sdm845-common: parts: Make thermal profiles naming completely generic
Drop the reference to YouTube because that's product-specific.
Moreover, the purpose of such thermal profile should be video streaming,
so name it in that generic way.

Change-Id: Ifa8c97a2d231a24fda016a876c06b59825a068a6
2020-05-17 00:10:23 +02:00
Bruno Martins
d47b02adf1 sdm845-common: parts: Prevent NPE before DiracSound is initialized
There can be an edge case where the BOOT_COMPLETED intent is not
yet received and user tries to open Dirac sound settings. Avoid
letting it crash by making sure init is executed before showing the
preference screen.

Change-Id: I77e6bdd0c61994338f0dbbce4bfa532d84b8afb7
2020-05-16 15:16:56 +02:00
TheScarastic
29005bc46e sdm845-common: parts: Implement dynamic thermal profiles
Change-Id: I4667b24a8a29a418796dc51b245ede0aca51eea6
2020-05-16 11:57:16 +01:00
TheScarastic
8d3b68eacc sdm845-common: parts: Add DiracSound backend
Special thanks to vasishath for his base work on mi3

Change-Id: Id81e60a18dc34c991b82a5a2685c9041222a6ea7
2020-05-16 11:56:42 +01:00
Joey
84a39ce4a8 sdm845-common: parts: Introduce Dirac preferences
Add a frontend for Dirac sound optimization settings.
Inject into sound preferences through settings IA.

Change-Id: I37f6e64fa440c43dbe238cc65af5f9b0bbd60d83
Signed-off-by: Joey <joey@lineageos.org>
2020-05-16 11:11:30 +01:00
Bruno Martins
91641cb221 sdm845-common: sepolicy: Redo health nodes labelling
Move labels to genfscon to reduce the overhead inevitably
introduced with the extensive regex.

On the other hand, power_supply/dc/* sysfs nodes were already
labelled in device/qcom/sepolicy and changing its labels was
causing undesired denials while /vendor/bin/init.qti.chg_policy.sh
script tried to update the nodes ownership as seen bellow:

  W chown   : type=1400 audit(0.0:25): avc: denied { setattr } for name="current_max" dev="sysfs" ino=57421 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:sysfs_wireless_supply:s0 tclass=file permissive=0
  W chown   : type=1400 audit(0.0:26): avc: denied { setattr } for name="dc_adapter" dev="sysfs" ino=57426 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:sysfs_wireless_supply:s0 tclass=file permissive=0
  W chown   : type=1400 audit(0.0:27): avc: denied { setattr } for name="input_current_now" dev="sysfs" ino=57424 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:sysfs_wireless_supply:s0 tclass=file permissive=0
  W chown   : type=1400 audit(0.0:28): avc: denied { setattr } for name="input_suspend" dev="sysfs" ino=57423 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:sysfs_wireless_supply:s0 tclass=file permissive=0

Change-Id: Ia763482e9890e232ab0e2ef0afdc3699bcec4fc0
2020-05-15 11:54:10 +02:00
Pig
ba0508a9d2 sdm845-common: sepolicy: Address annoying rild denials
Change-Id: Ied905092ace838eb006abccb2f0eb34f306617a0
2020-05-15 00:48:08 +01:00
Pig
face426417 sdm845-common: sepolicy: Correct some Xiaomi specific labels
Change-Id: Ic97df715647e83ff4b0161a8da8374687995daef
2020-05-15 00:44:40 +01:00
dianlujitao
5bdf0ecf25 sdm845-common: sepolicy: Label Xiaomi specific global props
Change-Id: I00e33e4aaf76fda6a7d60e7b814e08f69956813d
2020-05-15 00:20:17 +01:00
Michael Bestas
d359d7b9c1 sdm845-common: sepolicy: Ignore thermal-engine dac_override
Change-Id: Ie2b9f60e85b334ad3ba809b3bf6de8e70f50743a
2020-05-15 00:20:17 +01:00
Bruno Martins
15e698c8cb sdm845-common: sepolicy: Label sensors prop and allow reading it
Change-Id: Ifc95eaa2767d74c95200c86c92d1d970d8dc1e4c
2020-05-15 00:18:28 +01:00
Bruno Martins
70547f7ea6 sdm845-common: sepolicy: Address thermal-engine denials
Change-Id: I25abb62dc8c46cfc6ce8c85aa532e9e94bdf9622
2020-05-14 23:51:41 +01:00
Michael Bestas
13a0b1236d sdm845-common: sepolicy: Silence harmless QCOM denials
Change-Id: Iad1e2c0e654a4a46da76a57ece63dc4f35761d50
2020-05-14 23:31:41 +01:00
Bruno Martins
78703e0c65 sdm845-common: sepolicy: Silent rild denials
* There's no interest in allowing rild to create tombstones,
   neither to unnecessarily touch qcril.db

Change-Id: I174ce6d9fc0d12a61706922048f9155f190b31a8
2020-05-14 23:31:34 +01:00
palaych
2dee25a738 sdm845-common: sepolicy: Stop with endless debug props logspam
avc: denied { read } for name="u:object_r:sensors_dbg_prop:s0" dev="tmpfs" ino=22687 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sensors_dbg_prop:s0 tclass=file permissive=0
avc: denied { read } for name="u:object_r:sensors_dbg_prop:s0" dev="tmpfs" ino=22687 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:sensors_dbg_prop:s0 tclass=file permissive=00
libc    : Access denied finding property "persist.vendor.debug.sensors.stats"
libc    : Access denied finding property "persist.vendor.debug.sensors.ssc_latency"

Make those readable only for debug buildtype.

Change-Id: If329c140d6850ed417ae3f1b1f4d7f28f3331c48
2020-05-14 22:24:42 +01:00
Bruno Martins
2d8f882229 sdm845-common: sepolicy: Allow sensors HAL to read ASDP RPC props
This allows the following props to be read by the sensor HAL:

 W sensors@1.0-ser: type=1400 audit(0.0:308): avc: denied { read } for name="u:object_r:adsprpc_prop:s0" dev="tmpfs" ino=13281 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:adsprpc_prop:s0 tclass=file permissive=0
 W sensors@1.0-ser: type=1400 audit(0.0:309): avc: denied { read } for name="u:object_r:adsprpc_prop:s0" dev="tmpfs" ino=13281 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:adsprpc_prop:s0 tclass=file permissive=0
 E libc    : Access denied finding property "vendor.fastrpc.perf.kernel"
 E libc    : Access denied finding property "vendor.fastrpc.perf.adsp"
 E libc    : Access denied finding property "vendor.fastrpc.perf.freq"

Change-Id: Iadc621e18601285068f9b231497add238f48294b
2020-05-14 22:41:49 +02:00
Jayant Chowdhary
4cc7fba122 sdm845-common: sepolicy: Specify which ro.camera props are labelled camera_ro_prop
As a result, all ro.camera props aren't automatically labelled camera_ro_prop and some props
can be accessed by priv_app and untrusted_app.

Bug: 134899434

Test: GCA record video / audio; logcat | grep ro.camera.sound.forced

Change-Id: I79873591f312fb05786973a470427d5f4ec9bc82
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-05-14 22:41:44 +02:00
Zhijun He
5ffd0bb2c3 sdm845-common: sepolicy: camera: allow read camera ro props
Test: Google Camera app recording
Bug: 131428827
Change-Id: Id21daf56cb3a624efd0f43f8b62c2155a89365cc
2020-05-14 22:41:38 +02:00
Demon000
e38ef0410f sdm845-common: sepolicy: label property used by ril
Change-Id: I05e3a823cdfbbd995791769ea3774ebd064f6f12
2020-05-14 22:41:09 +02:00
Demon000
a90a8fba58 sdm845-common: sepolicy: label system manufacturer prop
* Needed by aux camera.
 * Xiaomi disables all camera if the manufacturer isn't Xiaomi.

Change-Id: Ife6587148824cd6b68e634ca0b999d4f380b20ce
2020-05-14 20:51:16 +01:00
palaych
143c4410c2 sdm845-common: sepolicy: Allow every app to read camera props
This makes Google Camera and ANX Camera apps happy.

Change-Id: If7b78e16f8e1f01df581be5e4e726f7e054dcf64
2020-05-14 20:51:16 +01:00
Bruno Martins
d2141e0a18 sdm845-common: sepolicy: Remove undesired camera prop label
This was basically forcing all props starting with vendor.camera. to
be labeled as camera_prop.

The side effect of doing that was the relabel of props that were
supposed to have a particular label for some reason. Take for example
vendor.camera.aux.packagelist which isn't desired to be relabeled
so to avoid having to write additional local sepolicies.

Change-Id: I1b7c952a241688f6517e1742719e77b6141e2cd2
2020-05-14 20:51:16 +01:00
Bruno Martins
998ed9e6bb sdm845-common: Drop Android LMK parameters configuration
Android LMK was disabled in the kernel in favor of Low Memory Killer Daemon (lmkd).

Change-Id: Ibd97ea48bf6cc635277a7e23fb460ee7f1737121
2020-05-10 15:14:47 +01:00
LuK1337
0a5161eaee sdm845-common: Drop SSR blobs and set SSR restart_level in init.qcom.rc
Change-Id: I32fc08c9ad36b9c8ebfc019fc87a19eece18f0b4
2020-05-10 00:52:48 +02:00
Rajeev Kumar
419ac6bdb8 sdm845-common: Enable memory stats logging in user mode LMKD
Bug: 74443701
Test: Tested manually
Merged-In: I288098e17d5fc65923758152bba5e786a75edc4c
Change-Id: I288098e17d5fc65923758152bba5e786a75edc4c
(cherry picked from commit 56395c15a57eda7aa59a7615422677d5a8075350)
2020-05-06 14:53:37 +01:00
Suren Baghdasaryan
20140390e7 sdm845-common: Switch lmkd to use minfree levels for kill decisions
Enable ro.lmk.use_minfree_levels flag to use minfree levels to decide
when lmkd should kill. This makes lmkd work the same way lowmemorykiller
kernel driver used to work.

Bug: 77299493
Bug: 75322373
Test: lmkd_unit_test
Change-Id: Ic29d7fd21af1cb6af3a7d2a175d210775a09987e
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-05-06 14:50:22 +01:00
Suren Baghdasaryan
ea3bfd323f sdm845-common: Set lmkd configuration properties
Bug: 63631020

Change-Id: I16a183e8e4625e8b98cefdc9c8a7b650556a2b55
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-05-06 14:49:23 +01:00
Madhanraj Chelladurai
885794a953 sdm845-common: Add locSll library and add permissions to device node
Change-Id: Idacac778610699af0f01d65096092328bbe8ac1d
CRs-Fixed: 2413585
2020-04-19 22:57:01 +02:00
Xiaojun Sang
066ff3dd91 sdm845-common: add aud_pasthru_adsp access for audio
Change-Id: If4cb96e00ccfaff60b08c42d92370cb46fbb9a0e
2020-04-19 22:57:01 +02:00
Pratham Pratap
c521dc4440 sdm845-common: Prevent enumeration in ADB only composition
During bootup the device first enumerates in ADB only composition
and then falls back to the persist.sys.usb.config.
Prevent this enumeration in ADB only composition during bootup
by setting the sys.usb.configfs from init.qcom.usb.rc

Change-Id: I6c93a778cc0decc6b5c256c60734b0597d753a9d
2020-04-05 14:27:28 +02:00
Ajay Agarwal
85c2452537 sdm845-common: init.msm.usb.configfs.rc: Add support for USB PID 0x9020
0x9020 composition includes DIAG + ADB + DUN + NMEA. Add support
for the same.

Change-Id: I364d4e87b63d7e5dfb394db6e92e650764b7cc96
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2020-04-05 14:27:23 +02:00