Commit graph

577576 commits

Author SHA1 Message Date
Linux Build Service Account
8592867f6f Merge "msm: ipa: fix division by 0 for DMA pipes" 2016-11-07 22:28:57 -08:00
Linux Build Service Account
300fd3f33b Merge "drivers: mfd: Fix 32-bit audio compile" 2016-11-07 22:28:56 -08:00
zhaoyuan
9fcbbb97b1 USB: gadget: mtp: Make mtp_tx_req_len as Tx transfer length
As before, add mtp_tx_req_len for Tx transfer length, while
mtp_write & send_file_work still use MTP_BULK_BUFFER_SIZE for
Tx transfer length, need to correct it.

Change-Id: Ib078cf01871c50e6eec7002a38391d4c41d4d45a
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
2016-11-08 14:27:55 +08:00
Hareesh Gundu
f84d6e3c6c msm: kgsl: Add speed bin read capabilities for A306a GPU
A306a GPU have the two different frequency plans. The frequency
plan needs to be loaded dynamically based on the speed bin
information. Add support for A306a gpu to read the speed bin
information and choose frequency plan dynamically.

Change-Id: Iba53d4381d61f23ce1195a147493b0d292cd3723
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2016-11-07 22:07:36 -08:00
Zhenhua Huang
32eed90428 ARM: dts: msm: Add QRD interposer dts file for msmcobalt
Add device tree support for msmcobalt interposer platform
using msmfalcon QRD.

CRs-Fixed: 1086541
Change-Id: If17aa7a60832b71a94d75718da07158e1474ef31
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2016-11-08 14:05:24 +08:00
Ashwanth Goli
c5d496664e ARM64: config: Add VPN support
Add native android VPN support for msm_falcon

Change-Id: I2689d42402befd849aff05353196c7c0a4d32d56
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
2016-11-07 20:21:27 -08:00
Phani Kumar Uppalapati
6db3939dbf ASoC: wcd934x: Fix fake button press for headset insertion
Fix fake button press when headset is inserted by properly
disabling micbias after the detection is completed.

CRs-Fixed: 1086418
Change-Id: I241a49dd36746c083b410a58c8c899ee0e9390ad
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-11-07 19:16:42 -08:00
Olav Haugan
af04b3a2ba sched: Ensure watchdog is enabled before disabling
There is a race between watchdog being enabled by hotplug and core
isolation disabling the watchdog. When a CPU is hotplugged in and
the hotplug lock has been released the watchdog thread might not
have run yet to enable the watchdog.  We have to wait for the
watchdog to be enabled before proceeding.

Change-Id: I88f73603b6d389a46f8e819d9b490091d5ba4fe9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-11-07 17:51:48 -08:00
Olav Haugan
34a3cdf14e sched/core: Keep rq online after cpu isolation
To move tasks off a cpu when offlining the rq needs to be offlined to
un-throttle tasks.  However, tasks might still run on the CPU even after
the CPU has been isolated (per-CPU threads). Thus we should leave the rq
in online state after tasks have been moved.

Change-Id: I61486e8648af0dbb82595fe699e1bc158e837362
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-11-07 17:51:42 -08:00
Olav Haugan
411a978bce sched: Fix race condition with active balance
There is a race condition between checking for whether an active load
balance request has been set and clearing the request. A cpu might have
an active load balance request set and queued but not executed yet.
Before the load balance request is executed the request flag might be
cleared by cpu isolation. Then subsequently the load balancer or tick
might try to do another active load balance.  This can cause the same
active load balance work to be queued twice causing report of list
corruption.

Fix this by moving the clearing of the request to the stopper thread and
ensuring that load balance will not try to queue a request on an
already isolated cpu.

Change-Id: I5c900d2ee161fa692d66e3e66012398869715662
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-11-07 17:51:25 -08:00
Harshdeep Dhatt
c2682f2a06 msm: kgsl: Increase fault detection threshold value
The current value is leading to spurious fault interrupts
from the GPU. Increase the threshold 4 times so that hardware
fault detection won't be triggered as quickly.

CRs-Fixed: 1073836
Change-Id: Ie780cec4de818c94a407461580f9d80de7e4ec84
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-11-07 16:17:04 -07:00
Syed Rameez Mustafa
b9b63b0c62 sched/hmp: Fix memory leak when task fork fails
The scheduler allocates memory for the task load structures during
fork. It then relies to sched_exit() to be called to free that memory.
However, if the fork itself fails at any point after the allocation,
the memory is left unclaimed forever. Fix this memory leak by freeing
the allocated memory under error conditions.

Change-Id: I14a8290c9fcc4174ec80560e9f9d7bcdb119761f
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-11-07 14:46:22 -08:00
Syed Rameez Mustafa
576259be4a sched/hmp: Use GFP_KERNEL for top task memory allocations
Task load structure allocations can consume a lot of memory as the
number of tasks begin to increase. Also they might exhaust the atomic
memory pool pretty quickly if a workload starts spawning lots of
threads in a short amount of time thus increasing the possibility of
failed allocations. Move the call to init_new_task_load() outside
atomic context and start using GFP_KERNEL for allocations. There is
no need for this allocation to be in atomic context.

Change-Id: I357772e10bf8958804d9cd0c78eda27139054b21
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-11-07 14:46:21 -08:00
Syed Rameez Mustafa
ecd8f7800f sched/hmp: Use improved information for frequency notifications
Recent changes to scheduler guided frequency have started reporting
the maximum of the cpu load and the load of the top task on a CPU
to the governor. Use the same information to determine whether a
notification is necessary or not.

Change-Id: I1928c6cd0509952443a912ef54e0d72d5f75955d
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-11-07 14:46:20 -08:00
Syed Rameez Mustafa
54052c3658 sched/hmp: Remove capping when reporting load to the cpufreq governor
Capping load when reporting to the governor was important prior to new
scheduler guided frequency changes as intra-cluster migrations would
sometimes lead to CPU loads well in excess of 100%. With the new top
task approach however, load greater than 100% is no longer possible
except for the same conditions that were previously exempted (i.e.
inter-cluster migrations and frequency aggregation).

Change-Id: I3e4f5e39ec9ae7eeaba9a567efd245a7aec1b7ad
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-11-07 14:46:19 -08:00
Subbaraman Narayanamurthy
e0520b6c77 qpnp-fg-gen3: support configuring ESR FCC based on charging status
Currently, fuel gauge assumes that the battery charging current
is provided only by the main charger. When ESR pulse is needed,
it notifies only the main charger to lower its FCC. However, with
parallel charger also supplying the FCC to the battery, the main
charger can end up increasing its FCC instead of lowering it.
This is because of the fact that FCC of main charger is lower
than the total battery charging current because of the current
distribution to the parallel charger and the code sent by FG
allows it to increase its FCC.

Fix this by controlling ESR FCC current code to 300mA in software
when the device is charging and the parallel charger is enabled.
Switch back to hardware control when the device is not charging
or parallel charger is disabled.

Change-Id: I0e6e600f72f9ef8864f9b775df88f674de9cb52c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-07 14:32:10 -08:00
Subbaraman Narayanamurthy
416ddbdbf3 qpnp-smb2: add support to configure charge inhibit
Currently charge inhibit feature is enabled by default and the
charge inhibit threshold is not configurable. Add a device tree
parameter "qcom,chg-inhibit-threshold-mv" through which the
charge inhibit threshold can be configured. If the property is
not specified, then charge inhibit feature is kept disabled.

Change-Id: I464d720abc138e8cd9ba8d7f1704cd91f4408bee
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-07 14:32:10 -08:00
Subbaraman Narayanamurthy
c15a8e246d ARM: dts: msm: update the ESR pulse width in pmicobalt
As per the hardware documentation, increase the duration
between attempts to measure ESR as the ESR pulse amplitude got
increased. This is to reduce the power consumption.

Change-Id: I65027413ecb22a1e89e37a12f66c5abda6c3ba28
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-07 14:32:10 -08:00
Subbaraman Narayanamurthy
5652fdc60b qpnp-fg-gen3: extend profile integrity word usage
Currently, profile integrity register is using only bit 0 to
indicate whether the profile is loaded or not. Now that the
profile can be loaded and/or fuel gauge can be restarted by the
bootloader, extend the usage of that word by using other bits
to provide more information. This is to aid the debugging.

Change-Id: Ib04ab10998de2f57b05cd976c3e9c8a1e2f4c574
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-07 14:32:09 -08:00
Subbaraman Narayanamurthy
1ddf07d8e2 qpnp-fg-gen3: update empty voltage threshold and empty SOC irq handling
As per the hardware characterization, update the battery empty
voltage threshold to 2.8V. Since this moves the voltage little
away from cutoff voltage, update the empty SOC interrupt handling
to report SOC as 0. Since we only need the rising edge of empty
SOC interrupt, modify the interrupt flag as well.

Change-Id: I665a6f879af4e6b6e9f94b5464be7894d5ea67cb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-07 14:32:09 -08:00
Subbaraman Narayanamurthy
e5f967c5a9 qpnp-fg-gen3: expose a fake battery SOC for debug board
When a debug board is present, battery ID will be something like
7 Kohms. Expose a fake battery SOC when this is detected. This
will help avoiding the device shutdown if a low battery voltage
is seen by FG and state of charge goes to 0.

Change-Id: I750b2adfb00f12960f74bd552a5896f66ecaece6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-07 14:32:08 -08:00
Vidyakumar Athota
b1a6c6f3a7 ASoC: wcd9335: Fix AANC click and pop in voice call
Currently ANC output is connected to speaker path before PA
is enabled. This is causing click sound during voice call
when adaptive ANC is enabled. Fix this issue by connecting ANC
output to speaker path after PA is enabled.

Change-Id: I5f381b1e0c0222b8ae81d923da0b86d742b3cccd
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-11-07 13:36:56 -08:00
Arve Hjønnevåg
580f1555aa ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct
Prevents leaking pointers between processes

BUG: 30768347
Change-Id: Id898076926f658a1b8b27a3ccb848756b36de4ca
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: 11032d745836280574827bb1db5e64a94945180e
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2016-11-07 12:40:09 -08:00
Nicholas Troast
ab23ab8211 qpnp-smb2: force HVDCP to 5V before reboot
When the MSM resets the USB data lines are pulled low. If an HVDCP adapter
is attached and operating at >5V, and the phone reboots then the HVDCP
adapter will be in a bad state and the USB input will be suspended. Fix
this by forcing the HVDCP adapter to 5V in the shutdown path.

Change-Id: I953d42418f90398bd4248f8b761cf63943ce5532
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-07 12:39:38 -08:00
Nicholas Troast
04fe8da8a6 smb138x-charger: expose CHARGE_TYPE in parallel psy
CHARGE_TYPE provides information about what state the parallel charger is
in (pre, trickle, fast, full-on, taper). Expose it.

Change-Id: Ieee5a3acf5bbcd66ca1789a1011bd8c9461657ef
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-07 12:33:35 -08:00
Nicholas Troast
91345c328b smb-lib: add debug logging to parallel taper
Add debug logs to better debug issues regarding the parallel taper
algorithm.

Change-Id: I91805ebc2dcee6f2c5baa5c6d6a7856bd472c431
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-07 12:33:35 -08:00
Harry Yang
da4cc80edb qcom-charger: Add batch register access support for CC2 removal
Provide a convient and compact way for a bunch of register
reads/saves and writes.

CRs-Fixed: 1079913
Change-Id: Ica6a60f3f5bd1fad624d01ea410e62dbed09dac8
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-11-07 12:09:12 -08:00
Harshdeep Dhatt
8a7ca4ded7 msm: kgsl: Ignore EAGAIN when programming perfcounter
When programming perfcounter via gpu commands, we may encounter
-EAGAIN because of cancelling rb events either due to soft reset
or when powering down the device. Ignore this error because we
have already set up the perfcounter in software and it will be
programmed in hardware by adreno_perfcounter_restore when gpu
comes back up.

CRs-Fixed: 1024199
Change-Id: I5dc3561d15fa50ac58646f96559cfd262020dda9
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-11-07 12:49:49 -07:00
Nicholas Troast
2dad6f26dc qpnp-smb2: fix reverse boost when input is removed
When any input is removed it is likely that reverse boost can happen.
Detect reverse boost by checking if the switcher-power-ok interrupt
triggers 3 times within 1 second. If detected then suspend all input.
Once VBUS falls the input can be resumed for the next insertion.

Change-Id: I3dbe4fe426111023b60eefd968c426be7d6057b9
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-11-07 11:37:08 -08:00
Bhalchandra Gajare
a26e74323e ASoC: wcd934x: fix MAD enable sequence for ADC2
Microphone Activity Detection (MAD) hardware block in codec needs to
be in micbias mode and bandgap must be enabled whenever the input
to the MAD block is from ADC2. Change updates the codec register
sequence for MAD Input mixer control accordingly.

CRs-Fixed: 1085214
Change-Id: Ic57b1db8688ff634ed7d62279baa7c042d126550
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-11-07 11:22:14 -08:00
Vidyakumar Athota
9a52c21164 ASoC: wcd934x: Fix AANC click and pop in voice call
Currently ANC output is connected to speaker path before PA
is enabled. This is causing click sound during voice call
when adaptive ANC is enabled. Fix this issue by connecting ANC
output to speaker path after PA is enabled.

Change-Id: I2103773a17e7d9ee5acb3f21dc955e2da493b3b4
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-11-07 11:11:37 -08:00
Sathish Ambley
2295550247 msm: ADSPRPC: Use secure session device while freeing memory
Make sure that the secure session device is used while freeing the
buffer that was allocated from secure memory.

Change-Id: I07802c21c661fe18fb2fda70980b04f646408d7d
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
2016-11-07 10:11:51 -08:00
Osvaldo Banuelos
120ff46702 ARM: dts: msm: Enable VDD_APC CPR aging for msmcobalt v2
Enable VDD_APC CPR aging for msmcobalt v2 and define a CPR
closed-loop and open-loop voltage margin reduction of 15 mV
for CPR local rev 3 parts and greater to account for this
feature being enabled.

CRs-Fixed: 1081084
Change-Id: I50a3ca4e09c6cd6edeb5c15478989e19926c6576
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-07 07:53:16 -08:00
Osvaldo Banuelos
da0db5ee22 ARM: dts: msm: update VDD_APC CPR settings for msmcobalt
Update the default CPR min/max step quotient,
count repeat, consecutive down, and aging RO scaling
factor values for VDD_APC0 and VDD_APC1 to match the latest
hardware guidelines.

CRs-Fixed: 1080409
Change-Id: Ibb35a3f475725af96276389f78abb790ea5b5b81
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-07 07:49:10 -08:00
Laxminath Kasam
6b3ed52a63 ASoC: msm: refactor machine driver for msmfalcon
Combine the common code of both external and internal
codec machine drivers. Provide config support for
independent compilation of internal and external
codecs.

CRs-Fixed: 1083537
Change-Id: Ia63f8baf02b0ceee0960e208b976d7b573c39d52
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-11-07 16:15:00 +05:30
Ashay Jaiswal
78bea34638 ARM: dts: msm: Add stub regulator devices for msmtriton
Add stub regulator devices for msmtriton because RPM regulator
support is not yet in place.

CRs-Fixed: 1086513
Change-Id: I40220bcf960a10d7d6271e09b9f85107ed0c24af
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-11-07 14:57:01 +05:30
Taniya Das
00a15f8275 defconfig: msm: Add support for GCC clocks
GCC clock controller is required to be enabled for all peripheral clocks
supported by global clock controller.

Change-Id: I11c6cc7f09b403a09bdf65a14f7b9d327c5d9613
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-07 14:54:00 +05:30
Taniya Das
cea92c6266 clk: qcom: gcc: Cleanup code for GCC clocks
The fmax & num_fmax have been updated to reflect the new variable names and
also fall back to branch clocks clock_ops for hardware branch clocks for
now until the new ops are available.

Change-Id: I8b86ebbabe37bb86bd20eafe9501c4677f21a553
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-07 14:37:42 +05:30
Hareesh Gundu
0f6ff69a01 msm: kgsl: Allow mempools to configure from the device tree
Add driver support to configure mempools from the device tree.
This will enable mempools to configure per device specific and
reduces the high kgsl memory usage based on configuration.

CRs-Fixed: 1064046
Change-Id: I0a7e36b7e1fef9d42a4c0fe33d69a4debf15af2f
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2016-11-07 13:04:21 +05:30
Gaurav Kohli
c56339c969 soc: qcom: pil: Using devm_ioremap for mapping restart reg of modem
GCC region has been mapped by regmap instead of devm_ioremap_resource.
So to map modem restart register which is part of gcc region requires
devm_ioremap otherwise mapping error occurs.

Change-Id: I1d97d8ef831e3a91df47eebf22e1156d0a3712ae
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2016-11-06 22:58:07 -08:00
Laxminath Kasam
adb1d031d0 ASoC: msm8x16-wcd: update mbhc config type
Update internal codec driver to use new
mbhc config structure.

CRs-Fixed: 1083537
Change-Id: I0ff5b7ba83f2fec89562337ec63e062b50abc589
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-11-07 11:55:54 +05:30
Laxminath Kasam
8452fff703 ASoC: msm: Add support for INTx ports and clocks
Add support for new DSP INTx MCLK, INTx IBIT CLK
and INTx MI2S ports. New internal codec and msm
based soundwire codec use these clocks and port_ids.

CRs-Fixed: 1083537
Change-Id: I72e0a15c8a283c68a3ed10cfd02a4e3d9526c312
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2016-11-07 11:54:50 +05:30
Neeraj Upadhyay
2d3f9b1ffd defconfig: msm: update msmfalcon defconfigs
Bring in updates from msmcortex defconfigs to msmfalcon's.

Change-Id: Iedbae0d4738c7badf3d4faf60f43e8c8bdab51e1
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2016-11-06 20:13:53 -08:00
Walter Yang
d0e976a886 ASoC: pcm: change capture_active to unsigned int
In combo usecase there are 2 front-end dai's with
same codec dai, for example, multi-phrase ADSP SVA detection.
Using a single bit as the counter causes the counter to roll
over to 0 during combo usecase.
To resolve this, change counter to unsigned int from single bit.

CRs-Fixed: 1086127
Change-Id: I2dd07bd967b7d4fb4878b6d65bd0f011c6b15bdd
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2016-11-07 11:32:05 +08:00
Linux Build Service Account
85d7e134cc Merge "msm: kgsl: Fix potential device NULL pointer dereferences" 2016-11-05 07:35:31 -07:00
Linux Build Service Account
2b28b1372c Merge "ARM: dts: msm: update ICNSS DT node for msmcobalt interposer" 2016-11-05 07:35:29 -07:00
Linux Build Service Account
ef1311a1e8 Merge "ARM: dts: msm: update bus bandwidth vote for msmcobalt ufs" 2016-11-04 22:22:10 -07:00
Linux Build Service Account
6d25dab1ba Merge "sched: prevent race between disable window statistics and task grouping" 2016-11-04 22:22:09 -07:00
Linux Build Service Account
3bc988427d Merge "regulator: cprh-kbss-regulator: update temp sensor ID for msmcobalt" 2016-11-04 22:22:08 -07:00
Linux Build Service Account
9d601a126f Merge "ARM: dts: msm: Add ADC nodes for pmfalcon" 2016-11-04 22:22:08 -07:00