Commit Graph

726 Commits

Author SHA1 Message Date
Michael Bestas
02c930a77d sdm845-common: manifest: Remove Trust interface entry
This has been turned into a VINTF fragment.

Change-Id: Iaf53a2e1fbac75d53ec11d4c56c51230f4758daf
2021-01-05 20:39:50 +01:00
Ethan Chen
507c2cc14d sdm845-common: Remove bogus tombstone directory directives
* /data/tombstones and /data/vendor/tombstones are both created by
  the system's init.rc.
* Creating /tombstones at the root isn't allowed since the root is
  a ramdisk and mounted read-only.

Change-Id: I6c3a287056a2264d9e9ffe4557ecca8c6e03c0bb
2021-01-04 23:50:28 +01:00
Luca Stefani
f9642f6da0 sdm845-common: Enable IWLAN assisted mode
Change-Id: Id9d8d9d2ed27dad2754abfa3887ee1a1ff97875a
2021-01-04 22:03:19 +00:00
Vladimir Oltean
76dc2a3f2b sdm845-common: sepolicy: allow uevent to control sysfs_mmc_host via vold
Change-Id: Iafea09efae38fb82f4019c6d3b3b4bb756cdca0b
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
2021-01-04 17:26:58 +00:00
Bruno Martins
8a6c03cf61 sdm845-common: sepolicy: Resolve additional IMS related denials
Change-Id: I34baa7c7c32bd40c89fc5a2038cdd533b66b91e8
2021-01-04 17:26:58 +00:00
Bruno Martins
b43d7d6422 sdm845-common: Move CNE and DPM properties around
CNE blobs are shipped in /vendor and DPM blobs have been recently
moved to /system_ext.

Change-Id: Ide4881bb4bad52f874b70f77d5fd79fd58326862
2021-01-03 21:50:13 +01:00
Chenyang Zhong
d0553fba54 sdm845-common: rootdir: drop boot-time toggle on clkscale_enable
Clock scaling has been disabled in kernel to avoid workqueue
overheads.

ref: "Disable clock scaling to avoid costly workqueue overheads."
053b8a0d2a

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I31f3191ec5a0e4461048d97cb264cbfb284b9952
2021-01-03 18:26:28 +01:00
Chenyang Zhong
ac26728b47 sdm845-common: rootdir: use {up,down}_rate_limit_us
CAF replaced rate_limit_us with up_rate_limit_us and
down_rate_limit_us in msm-4.9 kernel with commit:

"ANDROID: cpufreq: schedutil: add up/down frequency transition rate limits"
ref: a37cf5fe1a

Therefore, update the node in init.qcom.power.rc as well.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I26c846d7885b5308d5f8a86e7a9b43cdb6346610
2021-01-03 18:26:22 +01:00
Vijay Dandiga
3ae156236a sdm845-common: init.qcom.power.rc: Disable watermark_scale_factor
Disable WSF, because we are using EFK.

Change-Id: If6a29fbaadf6ee2190853d2bc0d4d94dd98873b8
2021-01-03 18:24:47 +01:00
Vijayavardhan Vennapusa
379089bb47 sdm845-common: init.qcom.usb.sh: Set streaming_maxburst for UVC to 10
Currently streaming_maxburst is set to 1 for UVC. Increase it
to 10 to get better throughput numbers for UVC.

Change-Id: I76458cca14953179c65119032bcba401dd8d4929
2021-01-03 17:47:26 +01:00
Vijayavardhan Vennapusa
e0478da34e sdm845-common: init.qcom.usb.sh: Add support for 1080p and 4k MJPEG format
Add required changes to add support for 1080p and 4K MJPEG format.
Also fix wHeight issue for UVC streaming, else streaming won't work
for 720p resolution.

Change-Id: Ie2b911e5940babe58156dc84df4415b34d2a7103
2021-01-03 17:46:43 +01:00
Jack Pham
1492441483 sdm845-common: init.qcom.usb.rc: Add support for PIDs 90E8 and 90E9
Add the following compositions:

0x90E8 - RNDIS + DIAG + QDSS MSM + DUN + DPL
0x90E9 - RNDIS + DIAG + QDSS MSM + DUN + DPL + ADB

Change-Id: I22e5109364e0f742499cbd33d85e4ad13065eae1
2021-01-03 15:13:22 +00:00
Sriharsha Allenki
41cdc794be sdm845-common: init.qcom.usb.rc: Fix fallback to default composition from RNDIS
If the sys.usb.state is set to any other value other than
rndis(rndis,adb) when tethering is enabled through UI, the
USB device manager falls back to the default or previous
composition.
If a RNDIS is enabled with along with other debug functions
using the persist.vendor.usb.config.extra, set the
sys.usb.state to rndis(rndis,adb) irrespective of the config
that is being enabled to prevent the fallback.

Change-Id: Ib4e120895e62fc14ac11941b6b46cc7f0460ede8
2021-01-03 15:13:22 +00:00
Ajay Agarwal
c11209ff41 sdm845-common: init.qcom.usb.rc: Add support for USB PID 0x9020
0x9020 composition includes DIAG + ADB + DUN + NMEA. Add support
for the same.

Change-Id: I83f265387e814bc96c25e0619f1b03103d818c20
2021-01-03 15:13:22 +00:00
Jack Pham
d3edfa00f0 sdm845-common: init.qcom.usb: Fix dac_override SELinux denials in charger mode
The following SELinux denials are seen when booting into charger mode:

type=1400 audit(1746.159:22): avc: denied { dac_read_search } for
 comm="init.qcom.usb.s" capability=2 scontext=u:r:vendor_qti_init_shell:s0
 tcontext=u:r:vendor_qti_init_shell:s0 tclass=capability permissive=0
type=1400 audit(1746.159:23): avc: denied { dac_override } for
 comm="init.qcom.usb.s" capability=1 scontext=u:r:vendor_qti_init_shell:s0
 tcontext=u:r:vendor_qti_init_shell:s0 tclass=capability permissive=0
type=1400 audit(1746.267:24): avc: denied { dac_read_search } for
 comm="init.qcom.usb.s" capability=2 scontext=u:r:vendor_qti_init_shell:s0
 tcontext=u:r:vendor_qti_init_shell:s0 tclass=capability permissive=0
type=1400 audit(1746.267:25): avc: denied { dac_override } for
 comm="init.qcom.usb.s" capability=1 scontext=u:r:vendor_qti_init_shell:s0
 tcontext=u:r:vendor_qti_init_shell:s0 tclass=capability permissive=0

The DAC errors indicate that there is some kind of access, usually
by root, to a file or directory where the ownership is given to another
user/group which is not root. So since root may not have explicit
permission to access it has to override the default access control
which is flagged by SELinux.

In charger mode, like in normal boot, the init.qcom.usb.sh script
executes in the same process as init, so it is executing as root.
The script is trying to read/write to the ConfigFS string entries.
The fix for these denials is to ensure that any files/directories
being accessed by the script give root permission to access the same.
Hence remove the shell/shell ownership change when creating the USB
gadget and config subdirectories in ConfigFS.

While at it also remove mounting of ADB FFS and the ConfigFS function
instance as we are not enabling ADB in charger mode.

Change-Id: I33d6a9ce8e1bb4594a053156d46688ab11c5491d
2021-01-03 15:13:22 +00:00
Jack Pham
a7b0f740fb sdm845-common: init.qcom.usb.rc: Set MaxPower to 900mA
On some targets (such as GKI) the default bMaxPower is not able to be
hard-coded using the kernel config USB_GADGET_VBUS_DRAW. Instead we can
set this value via USB ConfigFS.

Change-Id: I467dab4fa85e7d07837f6afb6d58c73812619022
2021-01-03 15:13:22 +00:00
Jack Pham
3ba489d95a sdm845-common: init.qcom.usb.rc: New compositions for PIDs 9110 and 9111
Add the following compositions:

0x9110 - DIAG + DIAG CNSS + DUN + RMNET + ADPL + QDSS MSM (Trace) + ADB
0x9111 - DIAG + DIAG CNSS + DUN + RMNET + ADPL + QDSS MSM (Trace)

Change-Id: Id67f4bf67a40813d763f9f2a3374816f93b84a15
2021-01-03 15:13:22 +00:00
Mayank Rana
cfad99b599 sdm845-common: init.qcom.usb.rc: Update usage of USB MTP/PTP with USB F_FS driver
This change adds rules to move usage of USB MTP/PTP functionality
with USB F_FS driver instead of F_MTP/F_PTP drivers. It selects
functionfs based MTP/PTP functionality based on vendor.usb.use_ffs_mtp
property value. Set vendor.usb.use_ffs_mtp to true for Lahaina platform.

sys.usb.mtp.device_type is used by MTP server to provide perceived
device type information to host. Use correct sys.usb.mtp.device_type
property and set value 3 ( 2 - media player and 3 - Mobile handset).

Change-Id: I005bfea4babef012e331dcc4999e5e6af6465b6e
2021-01-03 15:13:22 +00:00
Jack Pham
8caa6b6fc2 sdm845-common: init.qcom.usb.rc: Consolidate init.msm.usb.configfs.rc
Remove obsolete android_usb based property triggers now
that configfs is always used. Merge in init.msm.configfs.rc
so we now have just a single .rc init file.

Also remove all other references to /sys/class/android_usb/*.

Change-Id: I06eba8e715ccee5974dc9de8ac19df6c79ae0c45
2021-01-03 15:13:01 +00:00
Jack Pham
6720cf4628 sdm845-common: init.qcom.usb.rc: Directly exec init.qcom.usb.sh helper
Directly execute the init.qcom.usb.sh helper in the 'on boot'
and 'on charger' actions rather than spawning it as a oneshot
service. After that, directly update sys.usb.config with the
from persist.vendor.usb.config. This streamlines and guarantees
it will execute synchronously which can help avoid rare race
conditions with other USB property triggers that could execute
in parallel.

Change-Id: Iaf798b146d071b11857a4cf54fbaf7ae0d5d2431
2021-01-03 15:13:01 +00:00
Jack Pham
0d208d22dd sdm845-common: init.qcom.usb: Add FFS diag instances for mdm, mdm2
Create configFS entries for two additional diag instances
and mount their respective FunctionFS paths. The diag-router
app will read/write to these for MDM and WLAN instances,
respectively.

Change-Id: Icc896f19a76e7d154e5b9b9a2f1bfc422a3e47e3
2021-01-03 15:13:01 +00:00
Jack Pham
3c1e716b6d smd845-common: init.qcom.usb: Update diag dload with PID and serial
With support now for diag-router using USB FFS driver, the kernel
driver is no longer going to automatically update the DLOAD IMEM
with the required PID/Serial information that is used when the device
transitions into crash download mode so that a port re-enumeration
is avoided. In order to pass the same PID/Serial information, the
same kernel driver now exposes configfs attributes that userspace
can write. Hence the serial number can be written once during "on
boot", and likewise the PID can be updated whenever a composition
is selected that contains Diag as the first interface.

Change-Id: I45d52ecd30fcc4978c9bb4fbe9caa75e12c0b860
2021-01-03 15:13:01 +00:00
Jack Pham
19012fb731 sdm845-common: init.qcom.usb.rc: Support Diag over FFS
Support Diag over USB using F_FS driver by instantiating "ffs.diag"
ConfigFS instance and mounting the functionfs path for the same.
Introduce a new property 'vendor.usb.diag.func.name' which is used
to distinguish between FFS and legacy f_diag and update all Diag-
enabled compositions accordingly.

The `vendor.usb.diag.func.name` property can be overridden on
a per-target basis simply by adding the key=value to the
PRODUCT_PROPERTY_OVERRIDES build variable. This gets generated
into the /vendor/build.prop which overrides the default value of
'diag' set in /vendor/default.prop.

Change-Id: I005a441b39697b489bcd8d74b5cb26fb3b47fdf7
2021-01-03 15:12:55 +00:00
Hemant Kumar
93884ea0af sdm845-common: init.msm.usb.configfs.rc: Add USB PID 0x9044 and 0x9045
0x9044 - MSM DIAG + MDM DIAG + ADB + SmartCard CCID
0x9045 - MSM DIAG + MDM DIAG + SmartCard CCID

Change-Id: I2722ae2ea44f5e75d56af7abd64dbb52817eae16
2021-01-03 14:20:35 +00:00
Hemant Kumar
9920f336b9 sdm845-common: init.msm.usb.configfs.rc: Add new USB product ids
0x90F6 - DIAG MSM + DIAG_MDM + DIAG MDM2 + QDSS MSM + QDSS_MDM
+ DUN + DPL+ RMNET
0x90F7 - DIAG MSM + DIAG_MDM + DIAG MDM2 + QDSS MSM + QDSS_MDM
+ DUN + DPL + RMNET + ADB
0x90F8 - RNDIS + DIAG MSM + DIAG_MDM + DIAG MDM2 + QDSS MSM + QDSS_MDM
+ DUN + DPL
0x90F9 - RNDIS + DIAG MSM + DIAG_MDM + DIAG MDM2 + QDSS MSM + QDSS_MDM
+ DUN + DPL + ADB

Change-Id: I4c5c6d0377194423443b7da240b720f51651472c
2021-01-03 14:20:35 +00:00
Hemant Kumar
c8969c434a sdm845-common: init.msm.usb.configfs: Add USB PID 0x90D9
0x90D9 includes MSM DIAG, MDM DIAG and ADB.

Change-Id: I880e3fa3b27d5c4ef028be41e11cc0fddcc41f20
2021-01-03 14:20:35 +00:00
Sean Tranchetti
9d5735ecbd sdm845-common: init.qcom.rc: remove unused propery
Removes the unused large_tcp_window_size property.

Change-Id: If7dcede6089b71a3fc18572cf7e5f7571448787d
2021-01-03 14:20:35 +00:00
Bruno Martins
2c2678d92e sdm845-common: Deduplicate handheld_core_hardware.xml copy rule
Since Android 10 that this is already done while inheriting from
full_base_telephony.mk.

Change-Id: If533fbf95a9cf9798ddba24955a624d26f550d62
2021-01-03 15:12:48 +01:00
Bruno Martins
f2f7c84956 sdm845-common: fod: Include VINTF fragment
Change-Id: I914d505d50f79143fb97065f147ed8fd246bb1f3
2021-01-02 22:13:15 +01:00
Bruno Martins
6584d7b5b8 sdm845-common: fingerprint: Include VINTF fragment
Change-Id: I48ce57982e818ce06b4c57b5df700d8a4acf4284
2021-01-02 22:13:15 +01:00
Bruno Martins
09ec37c9eb sdm845-common: sepolicy: Add rules for older IMS blobs
Since Android 10 blobs are being used, org.codeaurora.ims still runs
as phone UID as seen by these denials:

  m.android.phone: type=1400 audit(0.0:2914): avc: denied { read } for name="u:object_r:qcom_ims_prop:s0" dev="tmpfs" ino=13660 scontext=u:r:radio:s0 tcontext=u:object_r:qcom_ims_prop:s0 tclass=file permissive=0
  m.android.phone: type=1400 audit(0.0:473): avc: denied { call } for scontext=u:r:radio:s0 tcontext=u:r:hal_imsrtp:s0 tclass=binder permissive=0

Change-Id: Ic8c1b7996b9e0e7b63ba2a153441c9e8467a8a31
2021-01-01 01:48:23 +01:00
Michael Bestas
9ad050b2fe sdm845-common: Switch to standalone extract utils
Align with templates while we are at it

Change-Id: Ife50623a3d1b8733f5cc76995c982d8950d39ad4
2020-12-31 17:32:37 +00:00
Anton Hansson
6bf2c85ef0 sdm845-common: Remove obsolete dex settings
This block is completely redundant because..
- WITH_DEXPREOPT := true is the default
- WITH_DEXPREOPT_PIC is never read
- DEX_PREOPT_DEFAULT := nostripping has no effect when the
  BOARD_USES_SYSTEM_OTHER_ODEX flag is set to true

Test: make
Change-Id: I618a1e395ca1a14555cd50eef1a4f1aa079b553d
2020-12-31 16:46:41 +00:00
Bruno Martins
641ef89689 sdm845-common: Use CodeAurora ImsService implementation for RCS
There is no evidence that Qualcomm devices running a rather recent IMS
stack need to include AOSP RCS packages. RCS already worked before this
change and continues to do so, but the main goal was to get rid of some
of the RCS related log spam, which was accomplished here.

Change-Id: I219546e29d288373877e9bcd194a60ef5e09f224
2020-12-31 10:48:23 +01:00
Chenyang Zhong
3a6e266413 sdm845-common: audio: add missing mixer path
For whatever reason, Xiaomi left an empty path here for the use
case of "deep-buffer-playback bt-sco-wb". This leads to audio
stuttering and error log spam of:

D audio_hw_primary: enable_audio_route: apply mixer and update path: deep-buffer-playback bt-sco-wb
D audio_route: Apply path: deep-buffer-playback bt-sco-wb
D audio_hw_primary: select_devices: done
D audio_hw_primary: start_output_stream: Opening PCM device card_id(0) device_id(0) format(0x4)
E audio_hw_primary: pcm_open_prepare_helper: pcm_prepare returned -1

...under the following use case:

* join a voice call (whatsapp, discord, etc.)
* using BT headset
* then start a video playback with audio

Therefore, add the missing mixer path from CAF's sdm845 mixer config
to link it to "deep-buffer-playback bt-sco", so that the ctl of
"SLIMBUS_7_RX Audio Mixer MultiMedia1" can be used correctly.

"<ctl name="BT SampleRate" value="KHZ_16" />" entry has been omitted
because our mixer path from stock does not have BT SampleRate set
to KHZ_8 by default.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I94e8d7f714b80380f46148a3fdd8d140a99c6bb2
2020-12-30 16:59:47 +01:00
Rohit Bandi
ab3c681f1e sdm845-common: Adding android.hardware.vr.high_performance.xml to sdm845
android.hardware.vr.high_performance.xml contains set of
features required for a VR-compatible device

Change-Id: Id3f8cdafc551077b682cb25a9316f20352aa3cdf
2020-12-30 15:12:28 +01:00
dianlujitao
8df25fa63c sdm845-common: Add vr hal to vintf manifest
Change-Id: I4b46d1d77b4d7d287d40106ffd795cfa11455166
2020-12-30 15:12:17 +01:00
Sam Mortimer
a61b42edf7 sdm845-common: pocketmode: Ensure FP is always left enabled when screen is turned on
*) If you turn the screen on whilst the device is still in a pocket the
   fp sensor stays disabled even when the device is moved out into the open.

*) This commit ensures that the FP sensor is always reenabled when the
   screen is turned on.

Change-Id: If27967a468673f29d9c1a4742cc9dda95adaab59
2020-12-30 15:06:17 +01:00
Bruno Martins
f836f3e62e sdm845-common: lights: Remove LCD backlight handling
Since composer HAL is now able to handle display brightness,
this can be removed from the lights HAL.

Change-Id: Ic10cead638382d448a94205bcec3543177d387f6
2020-12-30 10:47:12 +00:00
Bruno Martins
11360d9805 sdm845-common: Update OMX codecs and VPP blobs
Change-Id: I3a0735190cbf5fc923feb067b78bf9321cb22056
2020-12-30 10:47:12 +00:00
Sebastian Dang
dcde13429b sdm845-common: Move wfdhdcp Crypto & DRM HAL to 1.3
Change-Id: Ic1f18825f61aa1aecbb56941dd9cfe2447659a20
2020-12-30 10:47:12 +00:00
Bruno Martins
c48452042d sdm845-common: Bump WFD stack
Change-Id: I73af0bbd2e2a33e711922c579513606604feba62
2020-12-30 10:46:46 +00:00
Alastair Donaldson
b516006260 sdm845-common: Add android.software.vulkan.deqp.level, version 2020-03-01
This change sets the new Vulkan dEQP level feature flag to the value
corresponding to the Vulkan dEQP tests for Android 11.

Change-Id: I0715787b310f48c27747849ebd0724e0ca6fbbde
2020-12-30 10:38:10 +00:00
Karthi Kandasamy
55a3ad6846 sdm845-common: Update IDisplayConfig to 2.0 version
Change-Id: I8c470a9b2481a0c8b151efab222defe5816bf065
2020-12-30 10:38:10 +00:00
Karthi Kandasamy
79cee72a78 sdm845-common: Remove Qdutils_disp entry from manifest
Remove Qdutils_disp entry from manifest as implementation is removed
and its not used any more.

Change-Id: I77464cd41f795d36a7ceaa0b8264004681511d46
2020-12-30 10:38:10 +00:00
Bruno Martins
3d316ad303 sdm845-common: Move to new display HAL and update graphics blobs
Change-Id: I0ff514eef5d4a8b1287a910ba781ef77e5c584aa
2020-12-30 10:38:10 +00:00
Michael Bestas
f44df59ab2 sdm845-common: Remove libI420colorconvert
* It was only used in the long dead video editor

Change-Id: I5a3605585ede0b8f556f53cec7cf8d55d3ae4132
2020-12-30 10:37:46 +00:00
Bruno Martins
0012ed5e99 sdm845-common: Drop bitness from graphics composer service
Change-Id: I697d27a7d76aa25c979d8566d12a765c39403ae6
2020-12-28 12:11:19 +00:00
Bruno Martins
ad932e4ec4 sdm845-common: Sign Tether RROs with default cert
In analogy to commit 57653ac.

Change-Id: I18f770da2986653a70fdfa92f3be5e1199d06d08
2020-12-27 23:19:57 +01:00
David Su
57653ac069 sdm845-common: Don't sign Wifi RROs with platform cert
Preinstalled overlays needn't be signed with the same cert
as the package it overlays, simply being preinstalled is
enough. Sign with the default cert instead for now, which
provides fewer special privileges.

Bug: 162195999
Test: verify values still overlaid correctly
Change-Id: I017491fd383551c5aadf8648edb900e0c12a27b8
2020-12-27 22:14:56 +00:00