Commit Graph

1726 Commits

Author SHA1 Message Date
Hernán Castañón c73236a6a1 common: sdclang: switch to SDClang 3.9
Based on our tests SDClang 4.0 isn't ready yet,
as it breaks many important stuff like the camera.

We will use SDClang 3.9 as primary one.

Change-Id: Ia7de336f6f12ddb5fa67164f221599e88c4ed500
Signed-off-by: Hernán Castañón <herna@paranoidandroid.co>
2017-11-25 18:31:35 +01:00
Neeraj Soni e8638d9388 cryptfs_hw: Wait for qseecom daemon to start FDE operation
FDE operation requires listener services. Qseecom daemon
should be up and running to ensure all listeners are
registered and running.

Change-Id: I45637fe25a4ccc9a9ae4939449d310b9a7313e10
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-11-11 08:17:58 -05:00
AnilKumar Chimata e1de49e841 cryptfs_hw: Fix compilation error
Fix compilation error for qseecom.h which encountered while
creating the clean build.

Change-Id: I1271866d453f0f3d60bfc23ac12819b1cd0cabea
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-11-11 08:17:58 -05:00
AnilKumar Chimata 1eb1748142 cryptfs_hw: Add new APIs for key management
Add new APIs for create, wipe and update keys, which is
required for HW based Full Disk Encryption.

Change-Id: I483ce1a734db7b7cbfb2a06fe74baf559cfb51fb
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-11-11 08:17:58 -05:00
AnilKumar Chimata 1ae9326fa2 cryptfs_hw: Add liblog for logging
Add liblog to cryptfs_hw to compile the adb log message related
functions to enable logging.

Change-Id: Ibc6b8617431cae687d964d1ab56ac25e1b1b96f2
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-11-11 08:17:58 -05:00
Hernán Castañón b1f1463b37 common: Remove Dash support
On O, Dash was fully deprecated on all chipsets.

Change-Id: I0583ad868390c028cef1e8bf0cb181d7ca1e140a
Signed-off-by: Hernán Castañón <herna@paranoidandroid.co>
2017-11-11 08:34:28 +00:00
Willi Ye 1e0a3d6c83 common: power: Remove gestures
Change-Id: I8bf4f5005799a9893ad4799df8ce9fd49d60b337
2017-11-06 19:46:00 +01:00
Willi Ye 1cfd518177 common: init: Add necessary libraries
Change-Id: I0ba99df45865b33e6266d12b8dfe874af7155f05
2017-11-06 19:45:55 +01:00
Bharat Pawar f96e15a9d6 common: Install video seccomp policy files in /vendor
Vendor extended policy files are separated from the aosp
and will now reside in /vendor

Change-Id: I807484b5a5d69db81db4684adb91c0795ba88673
2017-11-06 19:45:02 +01:00
joshuous 8164ac4970 common: sdclang: Refactor SDClang configuration and use SDClang 4.0
* Refactored to work with CAF's build/soong
* Export necessary SDClang environment variables
* Set SDClang configs in the json files
* We can also add different device-specific SDClang configurations in sdclang.json

Change-Id: Id91cb4030f6e8d715203305d647cd440773898a2
Signed-off-by: joshuous <joshuous@gmail.com>
2017-11-02 21:54:02 +01:00
Bharat Pawar f1cee88265 common: Grant permission for 'getdents64' in mediacodec policy
This is for seccomp.

Change-Id: I807484b5a5d69db81db4684adb91c0795ba88673
2017-09-30 16:54:45 +00:00
Hernán Castañón Álvarez 309a5bd17d common: Remove SnapdragonCamera
We are migrating it over vendor/pa as we now have
ParanoidCamera instead of SnapdragonCamera.

Change-Id: Ib383ffa7f2107b0bdfd5af8e72f848a67f972798
2017-09-08 23:14:51 +00:00
TheStrix 047d58e4fc common: Add msm8998 platform
Change-Id: Ife64cee854bac7d16d5736099722b0726a3a6be8
2017-06-23 19:12:14 +05:30
soubhik-khan d0ea0ac091
common: utils: Add msm8953
* Remove titanium (aka msm8953)

Change-Id: I07304c85c7fc97c838f824e1b837ef242a4f1a57
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-06-05 23:29:00 +02:00
Alex Naidis 6277a06729 common: Mark QCNE as supported
All Qualcomm devices are capable of theoretic
QCNE support.

Change-Id: I812a044105698971c280657e40e737be049c124f
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-05-23 20:40:48 +00:00
Nikhil Kumar Kansal b467e33e51 power:sdm630:change target load and nr_spill for camera usecases change target load to 95 and nr_spill to 5 for camera
Change-Id: I10e1111d1a2376cda8585c11f22555b3c03ebeb6
2017-05-18 00:57:57 +00:00
Carlo Savignano 2de114b3f4 Add gestures control [2/4]
Change-Id: I108478216cc2247620c7b2170c3b23a5082e69cd
Signed-off-by: Carlo Savignano <carlosavignano@aospa.co>
2017-05-16 03:33:16 +09:00
Brahmaji K c467553422 cryptfs_hw: Fix stack out of bound issue
Add strnlen() instead of strlen() to fix the buffer overflow
while processing the password.

Change-Id: I5996bb62980741b7463c8829a43524e79abc4f19
2017-05-11 21:19:56 +00:00
Nikhil Kumar Kansal 332f2f1b2e power: KW warning fix in power hal for sdm660
KW throws warning about possible access of an array
by out of index range. Size passed to memcpy is
properly guarded to avoid out of bound access.

Change-Id: I355573c307098498cfa988377921b4e9ea7e8c2e
2017-05-11 20:58:51 +00:00
Jake Weinstein 50ad3dbfab common: disable SnapdragonCamera on TARGET_USES_AOSP_CAMERA
* Some devices, such as Nexus and Pixel have better camera
  performance with the AOSP application.

Change-Id: I9da12b239764b360219a780d052565916f5c885e
2017-05-08 14:08:11 +00:00
Alex Naidis d968ae646c
common: power: Fix cflags assignment
":=" overrides the previous definitions of
LOCAL_CFLAGS in this Makefile, so use "+="
instead.

Change-Id: Ib71c0bff1b492dc9022fa8e2d801f35f67e2af64
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-05-02 00:39:03 +02:00
Christopher N. Hesse ef38e87be1 power: Allow Nexus to build QC power HAL
The restrictions here are superfluous right now:

 * TARGET_USES_DEVICE_SPECIFIC_POWERHAL can already
   guard devices from building this HAL

 * Nexus devices build power.<device> by default,
   for example: power.bullhead, which does not match
   this module name pattern anyways.

Change-Id: I8f4e214c92eaa525231df1e7f935c45192b50de9
(cherry picked from commit 67bd4db14e59f93e6e11022c79bb3af20fda8d56)
2017-04-26 18:27:42 +00:00
Christopher N. Hesse 7f825775e2 Only warn about SDCLANG exclusion once
Please finally shut up. Thanks.

Change-Id: If288e23d43a984a8397b9316eb9711aa3907f435
2017-04-25 18:43:17 +00:00
Nikhil Kumar Kansal 3ebfa6fd2a power: resource value updation issue in power hal for sdm660
Resource value was not updated properly so hint was not
working for sdm660.

Change-Id: I5391ba898496f23fc13efeabc9570b71b0b26598
2017-04-24 17:07:44 -04:00
vanajau 375603f0de power: add powerHAL support for sdm630
Adding power hal support for sdm630

Change-Id: I4bc2d8af9ee467d0287844940a99d9b7b24e4a81
2017-04-24 17:07:44 -04:00
Murali Dhulipala 23307cab27 power: add powerHAL support for sdm660
Adding power hal support for sdm660

Change-Id: Ie9a0cbba7866ca6218c96b647ba7f5c0775c1659
2017-04-24 17:07:44 -04:00
Nikhil Kumar Kansal 4f818b6b71 msm8953:power:add mutex to camera hints
add mutex to camera hints for dual camera support

Change-Id: Ia1736f9512f09cf51f0a2b74b00be5eefbb40810
2017-04-24 17:07:19 -04:00
Nikhil Kumar Kansal 63ec06ee38 power:msm8953: powerhal changes for camera preview and camera encode
powerhal changes for camera usecases

Change-Id: Ie3cdc0156ed69f193396bb8605ea07fc9777525b
2017-04-24 17:07:19 -04:00
Panwar Vivek cbb3bc3a47 Initial bring-up change.
Temporary change for initial bring-up

Change-Id: I41280a9cb3a50c5db604f7006458881b60180825
2017-04-24 17:07:19 -04:00
Manish Kumar 4e14e1b0ad device/qcom/common: Rename titanium to msm8953
Change-Id: I82a017afc034e516408aacd9ff885d23ff3f67b2
2017-04-24 17:07:19 -04:00
Sravan Kumar Ambapuram aafb363e4c power: add powerHAL support for Titanium
Adding power hal support for Titanium.

Change-Id: Ifc930d2bac80a47621d9834ec523b996984a40c4
2017-04-24 17:07:19 -04:00
Dilip Gudlur 4aef921e7c power: Rename powerhal from msmcobalt to msm8998
Renames makefile and filename for powerhal module.

Change-Id: I997a62e5e66fe3de00731a2d2540e5d625632cfc
2017-04-24 17:07:19 -04:00
Dilip Gudlur 5692b29b47 power: Introduce powerhal for msmcobalt
Enable powerhal hints for specific use case
handling like encode to help power.

Change-Id: If2361037353a15328045915dd26fe4dc6ed5bb7e
2017-04-24 17:07:19 -04:00
Brahmaji K f31c45c7f7 cryptfs_hw: Remove android reboot during password check
After reaching the maximum number of retires with wrong password,
userdata is erased based on the info written on /cache partition.
As per the latest changes of A/B, cache partition is not present
which leads to failure of userdata wipe before reboot. This patch
removes reboot from cryptfs_hw layer if max entries reached, as
frameworks take care of userdata wipe.

Change-Id: If97f2f7452beb004f44d7d41d1d76def23fe2720
2017-04-24 17:07:19 -04:00
AnilKumar Chimata 932fc086d3 cryptfs_hw: Remove keymaster partition check
As the partition names are changing from branch to branch, device
FDE key is not wrapped with Hw keymaster which is less secure.
So removing the partition name related checks to avoid failures.

Change-Id: If181b093122479ca57ff6846b10d6aa2fb3eaa0c
2017-04-24 17:07:19 -04:00
Alex Naidis cdd80a4194 common: power: Weaken hispeed logic when screen is off
When the screen	is off, our workload is	non-
latency-sensitive, so we can set go_hispeed_load
to 100 while the screen is off.

The result is that the boost to hispeed_freq
and the connected possible boost to max_freq
happens less often.

This is added to the targets which are known
to support mpctlv3: msm8952, msm8992,
msm8994 and msm8996.

Change-Id: I6d1ce4c560bbc8aa86c5b022513f244dd8c780d8
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-04-01 14:10:22 +00:00
Alex Naidis 7c8857aa09 common: power: Put msm8996 interactive override into use
The interactive_override code path was obstructed.
This clears the code path, so it is ready to be
used.

Change-Id: Ic08d0850e2ca40c5262ad3c7ffcc9b7d8d0abe82
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-04-01 14:10:18 +00:00
Alex Naidis 16dfcabad3
common: power: Fix SPM if default power handling is overridden
The SPM logic we introduced would be getting skipped
if the target chipset would override the default
power handling.

As solution, we make the SPM handling exclusive and
independent from the default power handling.

Change-Id: I3f3be167a877e107dc33af09f8a70993b2c63daf
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-04-01 15:46:39 +02:00
Ramakrishnan Ganesh e91837783e
power: replace strncpy with strlcpy
Replace strncpy calls with strlcpy.

Change-Id: Ib43c833802466ed9ba9df6ac8c494f6e6256a494
CRs-Fixed: 1069457
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-02-19 13:21:42 +01:00
Alex Naidis 1775229bbd common: power: Provide SPM support for some chipsets
Use the newly introduced framework to enable
and configure SPM:

msm8992/msm8994:
* Unplug all big cores
* Set maximum GPU power level to 3
* Set interactive timer rate to 40ms

msm8996:
* Limit CPU frequency to 1.3Ghz
* Set maximum GPU power level to 4
* Set interactive timer rate to 40ms

Change-Id: I84f29edc2fb127c3f7bfcb5d8c6fdb09a8842f45
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-02-03 19:12:39 +00:00
Alex Naidis ebea4f0d1e common: power: Implement framework for Sustained performance mode
This implements a simple framework for Sustained
performance mode (SPM) which is oriented by Google's
reference implementation.

SPM gets triggerred when the framework detects
that an active activity is requesting SPM.

This framework is generic and extensible
for all chipset/target files.
Every chipset specific file that wants to support
SPM has to opt in by overriding "toggle_sustained_performance"
with the chipset/target specific handling.

If it is noticed that SPM runs well on a device
and passes the "CtsSustainedPerformanceHostTestCases"
testing module in CTS, it should set
the overlay "config_sustainedPerformanceModeSupported"
to true in order to make the framework accept
SPM requests from apps.

Change-Id: Idd53379f8dda8463e2b82f0760086cfe97790830
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-02-03 19:12:36 +00:00
Alex Naidis f93c84d014
common: power: Missing function definitions
These function definitions for were missing
and must be readded since they will be used
in the following patches.

Change-Id: I8ab5cc1db58d143b181e0cf5d81af38c3ccf1090
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-30 16:19:25 +01:00
Alex Naidis 49ba90fc3b
common: power: Correct 4+0 screen off config
Qualcomm's power hint which was supposed
to do that is broken.

This patch corrects it by replacing it with a
mpctlv3 hint and setting the maximum big cores
to 0 for the screen off case.

The affected chipsets are msm8992 and msm8994.

Change-Id: I712a13067fbbdf26c1d49d6e8229b01f0ef21b61
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-29 20:30:48 +01:00
Alex Naidis ecd625cb9d common: sdclang: Explicitly enable Automatic Vectorization
Automatic Vectorization is enabled by default
in SDCLANG at optimization level O2 or higher.

However we are forced to still use Os for thumb mode,
where our setting of O3 gets overriden.

This change explicitly passes the option to enable
automatic code vectorization in order to enable it
even if our main optimization level gets overriden.

Change-Id: I3e27d909ec0f9231686d5d97c0b2876cd33a07ae
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-07 22:05:38 +01:00
TheStrix efa0e4afb3 common: power: Fix 8952 compilation
Change-Id: I261d35b268aaaafb2851968ddc6c570a7105354e
2016-12-30 19:46:46 +00:00
Alex Naidis 2b424c08cd
common: init: Kill board init support
* These files were still using the old
  syntax and thus breaking build.
* Instead of fixing all of them,
  remove support, since they have
  no use.

Change-Id: I522655a8c52089dd779a131ac2a785c63856e61f
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-12-30 02:44:39 +01:00
Alex Naidis f1658c6a30
common: init: Remove junk
* As preparation for the comeback

Change-Id: Iafa198bf0c70106944acd4ebbf2d492e622dbf09
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-12-27 20:42:35 +01:00
Dilip Gudlur f9b3073c67 power: Remove ignore_hispeed_notif tuning
Change removes ignore_hispeed_notif tuning for
camera encode use case in powerhal to avoid
perf impact.

Change-Id: Ide0e553ede122e65d25397e09bf3bd49fb4df43b
2016-12-17 17:26:10 -05:00
Ramakrishnan Ganesh 22ee24dc93 power: Add mutex to camera hints
Add mutex around camera hints to take in consideration
dual camera use cases.

Change-Id: Ief8d5843893de3f6a03fb73b3ca662e818aee550
2016-12-17 17:26:00 -05:00
Brahmaji K 898bb15156
cryptfs_hw: update the listener property with keymaster property
Replace the sys.listener.registered with sys.keymaster.loaded
because the keymaster loading is the final operation done by
the qseecomd and key operations should wait till the qseecomd
initialization completes.

Change-Id: I78a2a6941058f8ec6197ef88b324f6178f7ae2fb
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-12-09 18:05:46 +01:00