Commit graph

440972 commits

Author SHA1 Message Date
Linux Build Service Account
c5a8e57287 Merge "msm: thermal: Add range checking for cluster_id" 2016-03-11 21:49:58 -08:00
Mahesh Sivasubramanian
e58a9c878a msm: thermal: Add range checking for cluster_id
The cluster id flag is passed in from the userspace through ioctl
interface. Ensure correctness of cluster id to avoid out of bounds array
accesses.

CRS-fixed: 977508
Change-Id: I778b962d347b90488b983a15087b13e90ad06688
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-11 03:55:47 -08:00
Manaf Meethalavalappu Pallikunhi
a981431516 msm: lmh_lite: Pass proper size for dma memory free API call
Use proper size for dma memory free call API while saving lmh sensors
list in lmh hardware driver otherwise it leads to memory leak or
unexpected crash if scm_call error path is executed.

CRs-Fixed: 982320
Change-Id: I31ac79585c8899b44ece745676d9af79fe8bca78
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2016-03-11 03:45:02 -08:00
Skylar Chang
4b1304720f msm: ipa: use bitmap for wakelock ref_count
Current wakelock ref_count is shared with all
the clients. There is a possibility that each
client could increase wakelock ref_count by
accident. Change the wakelock ref_count to bitmap
so each client can only update its own bit once.

Change-Id: I87f47cf54dc34a76dc2c4a537108f9be7b6bdba8
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-03-11 02:13:07 -08:00
Linux Build Service Account
186fb6e30c Merge "ASoC: msm: critical tasha fixes" 2016-03-10 19:53:30 -08:00
Linux Build Service Account
386f581369 Merge "ASoC: msm8x16: update boost config register" 2016-03-10 08:38:59 -08:00
Linux Build Service Account
2806d65779 Merge "ASoC: wcd9335: Update TX gain correctly after decimator enable" 2016-03-10 03:01:18 -08:00
Santosh Mardi
1adeaee336 ASoC: msm: critical tasha fixes
tasha fixes pulled in by the below change id.

I7d7c3243c63cd3b9242a15344ecdae89ec9ee977
I30ed6a337c3bb08f6197f7ee575b323f0b0acfac
I585a81e6c01b4ddd249f76614fb933beea3755fc
I744bafb78560f39806d656c98582d8162fa10dfd
I256d183b830c9addf1bd07264c2ed9b069762a36

Change-Id: Iaec182b20f5db96b09d26ae0b1e8cdf964abc272
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-03-10 16:09:45 +05:30
Linux Build Service Account
c58d4f7c68 Merge "regulator: core: correct double remove in rdev_deinit_debugfs" 2016-03-09 22:28:37 -08:00
Linux Build Service Account
c3338e9b75 Merge "diag: Fix possible null pointer dereference" 2016-03-09 18:22:40 -08:00
Manoj Prabhu B
2c8bbbf69c diag: Fix possible null pointer dereference
This patch checks for Null Pointer dereference before destroying the
diag mempools.

CRs-Fixed: 980428
Change-Id: I0e8fc8aa82ad26263bd9d47cbdd22de212efe489
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2016-03-09 08:11:54 -08:00
Shantanu Jain
d9f7c94052 leds: qpnp-flash: check power supply variable in flash led driver
Check the power supply variable if it is NULL or not, in flash led
driver while enabling the flash led.
This change is added to avoid crash in flash led driver.

CRs-Fixed: 944997
Change-Id: Ide1a9151d2a7c9a6686268a53ec9e38a4b087808
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-03-09 01:57:51 -08:00
Maheshwar Ajja
6e52defd19 msm: vidc: have max clock frequency at beginning on 8956/76
Interchange decoder max load frequency with encoder max load
frequency on msm8956/76 to have max frequency at the beginning
of the clock frequency table to select max venus clock rate
when session load is beyond the max load value.

Change-Id: I6c0cc941b49b5b3b364ff2255b0ddeac96501911
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2016-03-08 23:34:03 -08:00
Venu Yeshala
e548e8dd63 msm: camera: ispif: Validate VFE num input during reset
Userspace supplies the actual number of used VFEs in session to ISPIF.
Validate the userspace input value and if found to be invalid, return
error.

CRs-Fixed: 898074
Change-Id: I3288ddb6404e817a705a92281b4c54666f372c56
Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
2016-03-07 22:32:44 -08:00
Santosh Mardi
960f83a1a9 ASoC: msm8x16: update boost config register
For the targets not using boost and boost pin is kept
floating there will be high change that VDD_A53 will be
grounded and MSM will not be responsive

After discussing with PMIC systems team SBL team came up
with the work around to configure the boost register to some
pre defined values so that the issue is not reproduced.

As part of the codec init sequence the codec driver will
reset the analog part of the codec and as part of this sequence
the cofiguration done by the SBL will be defaulted.

This change will restore the 0x1C6 register if it has been configured
by SBL

Change-Id: I1a58b665b01e70bbb21b06665a8fb422d77a5ee7
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-03-07 21:24:40 -08:00
David Collins
5e56116ded regulator: core: correct double remove in rdev_deinit_debugfs
The current ordering of statements in the rdev_deinit_debugfs()
function causes freed memory to be dereferenced.  This occurs
because the regulator_put(rdev->debug_consumer) call results in
debugfs_remove_recursive() being called on
rdev->debug_consumer->debugfs after it was previously removed
by the debugfs_remove_recursive() call to the parent dentry
rdev->debugfs.

Correct this by setting rdev->debug_consumer->debugfs to NULL
after calling debugfs_remove_recursive() for the parent directory
rdev->debugfs.  This ensures that the regulator_put() call does
not try to remove the already removed subdirectory and also that
the debugfs callbacks which make use of rdev->debug_consumer are
removed before rdev->debug_consumer is freed in the regulator_put()
call.

Change-Id: Icb7da7949e401f64cf9e71c732cb40e43ddbdc01
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-03-07 10:51:44 -08:00
David Collins
d5c2b09a29 regulator: core: put debugfs consumer handle when unregistering a regulator
Ensure that regulator_put() is called on the core debugfs
consumer pointer for a given regulator when the debugfs interface
is no longer needed.  This includes inside of the
regulator_unregister() function as well as in the error return
path of rdev_init_debugfs().

Change-Id: I10563ae1716f31bdc5840d22633fdbfe278330f1
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-03-07 10:47:37 -08:00
Linux Build Service Account
38a89f621c Merge "net: ipc_router: fix leak of kernel memory to userspace" 2016-03-04 06:15:31 -08:00
Linux Build Service Account
edc7146d68 Merge "fs: Workaround the compiler's bad optimization" 2016-03-04 01:19:39 -08:00
Karthikeyan Ramasubramanian
d3befd2427 net: ipc_router: Bind only a client port as control port
IPC Router binds any port as a control port and moves it from the client
port list to control port list. Misbehaving clients can exploit this
incorrect behavior.

IPC Router to check if the port is a client port before binding it as a
control port.

CRs-Fixed: 974577
Change-Id: I9f189b76967d5f85750218a7cb6537d187a69663
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-02 21:17:03 -08:00
Linux Build Service Account
6cc6b65a44 Merge "qseecom: Add re-entrancy changes" 2016-03-02 04:27:44 -08:00
Linux Build Service Account
796829664c Merge "msm: sps: add the checking of ZLT in case of an empty pipe" 2016-03-01 13:11:33 -08:00
Yan He
98c366459a msm: sps: add the checking of ZLT in case of an empty pipe
Check if a ZLT descriptor is the last pending descriptor in
the desc FIFO when determine if the desc FIFO of that pipe is
empty.

Change-Id: Ib8174953d6ad7d886f47f21e243e985b79ef41fb
Signed-off-by: Yan He <yanhe@codeaurora.org>
2016-03-01 04:16:20 -08:00
Zhen Kong
e253be4346 qseecom: Add re-entrancy changes
QSEE OS level scm_call operations will fail if there is any blocked
TZ app due to waiting on a listener. Driver needs to first check if
no app is blocked before sending QSEE OS level scm call, if there
are any then wait until all apps are unblocked.

Change-Id: Ie7fb4a9fb78adedcb223308cd11335bf6a48296e
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-01 16:08:59 +05:30
Phani Kumar Uppalapati
632b5da9b4 ASoC: wcd9335: Update TX gain correctly after decimator enable
Gain for TX decimator block needs to be set after the
corresponding decimator is enabled. Otherwise, gain will
not take affect. Apply the gain by reading from regmap cache
to the codec decimator hardware after decimator is enabled.

CRs-fixed: 982473
Change-Id: Ib2d189b56e58b038a343fc974e6e3b8ef29f982d
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-02-29 22:04:04 -08:00
Syed Rameez Mustafa
0d29c5aa0b sched: turn off the TTWU_QUEUE feature
While the feature TTWU_QUEUE has the advantage of reducing cache
bouncing of runqueue locks, it has the side effect that runqueue
statistics are not updated until the remote CPU has a chance to
enqueue the task. Since there is no upper bound on the amount of
time it can take the remote CPU to enqueue the task, several
sequential wakeups can result in suboptimal task placement based
on the stale statistics. Turn off the feature as the cost of
sub-optimal placement is much higher than the cost of cache bouncing
spinlocks for msm based systems.

Change-Id: I0b85c0225237b2bc44f54934769f5e3750c0f3d6
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-02-29 20:07:13 -08:00
Linux Build Service Account
97ed6669af Merge "msm: qpnp-power-on: add regulator support for PON device" 2016-02-29 06:10:42 -08:00
Linux Build Service Account
99f0eda2b2 Merge "qseecom: Remove the dead code from driver" 2016-02-29 02:31:57 -08:00
Linux Build Service Account
b1b2b0fabd Merge "regulator: qpnp-labibb: Add support for TTW on PMI8950" 2016-02-29 02:31:54 -08:00
AnilKumar Chimata
efea51e084 qseecom: Remove the dead code from driver
For kernel clients, some of the flags are maintained which is not required
as those are specific to userspace clients. So remove the code which is
not required.

Change-Id: If7fb51cc17e9a8c0f3c2632e9c42d84489bda4f6
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
2016-02-28 21:27:26 -08:00
Linux Build Service Account
c18c2d2aaf Merge "mmc: debugfs: Add HS400 timing mode info in debugfs" 2016-02-26 03:32:21 -08:00
Linux Build Service Account
b32819f2cb Merge "msm: ADSPRPC: Invalidate buffer using kernel virtual address" 2016-02-24 22:17:14 -08:00
Linux Build Service Account
d4e1163b82 Merge "msm: isp: change monotonic timestamp to boottime" 2016-02-24 22:17:13 -08:00
Linux Build Service Account
031f5bf04b Merge "md: dm-req-crypt: Increase mempool size for dm-req-crypt data" 2016-02-24 22:17:08 -08:00
Linux Build Service Account
13d833b534 Merge "msm: ipa: fix the mux_channel buffer overflow" 2016-02-24 22:17:07 -08:00
Linux Build Service Account
68f44066f2 Merge "drivers: mfd: Return EPROBE_DEFER during codec failure" 2016-02-24 22:17:05 -08:00
Arun Kumar Neelakantam
3b1f22ab26 net: ipc_router: fix leak of kernel memory to userspace
The service info structure is allocated with uninitialized memory for the
max number of services and returns the complete structure to the usersapce
resulting in the information leak if lookup operation finds less number of
services than the requested number.

Check the minimum of requested and available services and copy the minimum
information to the user-space.

CRs-Fixed: 965934
Change-Id: Ic97f875855fdc6440c1db1d8d0338ee8b03a9d0a
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2016-02-23 22:34:46 -08:00
Linux Build Service Account
1273f8cb6c Merge "ARM: dts: msm: Add codec reset gpio device node for all targets" 2016-02-23 02:25:21 -08:00
Linux Build Service Account
153e7102a3 Merge "drivers: mfd: Move codec reset gpio config to early boot" 2016-02-23 02:25:21 -08:00
Santosh Mardi
4c52b181b8 drivers: mfd: Return EPROBE_DEFER during codec failure
In case of any codec access failure, return -EPROBE_DEFER
so that slimbus driver can probe the codec again
to toggle codec reset and retry codec access.

CRs-fixed: 969497
Change-Id: I570e7357a6d7810c495f56bbb626b8e823892837
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-22 14:13:23 +05:30
Santosh Mardi
d41e1a36bf ARM: dts: msm: Add codec reset gpio device node for all targets
Add codec reset gpio device tree node for msm8956/msm8976/msm8952
target specifying active and sleep pinctrl states.

CRs-Fixed: 968161
Change-Id: I040e8f54c6c86ab66d7fc824d5aab006f8d5f08f
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-22 14:13:16 +05:30
Tirupathi Reddy
116eae749d ARM: dts: msm: Update GFX Low_SVS_L1 mode margins for 8976 V1.1
Update the target quotients for GFX Low_SVS_L1 mode as per
characterization results.

Also, update offset values used to decode the open-loop voltages
for Low_SVS_L1 and Min_SVS modes of GFX voltage rail.

CRs-Fixed: 935784
Change-Id: I0c0f6a1fba0f35a52cc35415bfa4fd067654dbf9
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2016-02-22 09:52:20 +05:30
Dinesh K Garg
583da9e395 md: dm-req-crypt: Increase mempool size for dm-req-crypt data
DM layer allocates pool size of 256 for request based module while
dm-req-crypt internally allocates pool for minimum 16 requests.
Increasing pool size of dm-req-crypt to be consistent with DM layer.
Also, changing GFP mask for allocation from pool, depending upon
whether call is made from atomic context or not.

Change-Id: I9dfeb46520e0d1b1fc6f850a007fce35bdc60d35
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
2016-02-19 00:44:24 -08:00
Subbaraman Narayanamurthy
d92d126863 msm: qpnp-power-on: add regulator support for PON device
There is a requirement for configuring certain spare register
bits of PON peripheral. Since there is a chance for multiple
clients to configure these bits, a regulator device can handle
such configuration easily. Add support for it.

Regulator configuration requires an address inside PON peripheral
and a bit position which needs to be controlled to be specified
in the device tree subnode.

CRs-Fixed: 840571
Change-Id: I62d0c3f49e777103e102229353faaf2e8ee1fad6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-02-19 10:15:47 +05:30
Anirudh Ghayal
a8948f837f regulator: qpnp-labibb: Add support for TTW on PMI8950
Add TTW configuration for PMI8950. Also, add a DT property
(qcom,labibb-ttw-force-lab-on) to keep LAB always-on in TTW mode.
Presently, this property is only required for PMI8950.

CRs-Fixed: 958285 962662
Change-Id: Iec79a6f752067d96fc62a8e9d629c39f4db5ab9f
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-02-19 10:14:52 +05:30
Subbaraman Narayanamurthy
8ac740251d regulator: qpnp-labibb: do not disable IBB when entering TTW mode
Currently when entering touch-to-wakeup (TTW) mode, IBB module
is disabled as part of the regulator_disable sequence before
applying the settings needed for SWIRE control in TTW mode.
This causes adversary effects such as droop in the VDISN
voltage rail.

To avoid this, as per the hardware documentation, do not disable
IBB module through IBB_ENABLE_CTL when LABIBB regulators are
disabled and entering TTW mode. Instead, just enter TTW mode and
mark the regulators disabled. Normal mode settings will be
applied when the regulators are enabled again as before.

While at it, add a centralized function qpnp_ibb_mode() to write
to IBB_ENABLE_CTL register.

CRs-Fixed: 952847
Change-Id: I74c6ba411091d146ab5719c2d72d6385fa90af21
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-02-18 20:16:46 -08:00
Subbaraman Narayanamurthy
44626b79a8 regulator: qpnp-labibb: change the LAB soft start time for TTW mode
As per the requirement, LAB soft start time should be configured
to 200us when touch-to-wakeup (TTW) mode is activated. Save and
restore the LAB_SOFT_START_CTL register setting before entering
TTW mode and after exiting TTW mode, similar to IBB register
settings done before.

CRs-Fixed: 928619
Change-Id: Ib285cbb11a788a23726b2cbbb2954d2ac62db171
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-02-18 20:16:08 -08:00
Santosh Mardi
19d781ac88 drivers: mfd: Move codec reset gpio config to early boot
Codec reset gpio configuration needs to be updated
before slimbus master component is initialized otherwise
codec cannot be enumerated on the bus. Add a new platform
device driver to update the codec reset gpio configuration
to valid state (output, drive-strength) before slimbus
is initialized.

CRs-Fixed: 968161
Change-Id: I7227212e6b846d58196718255aa4b0923352d120
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2016-02-18 16:54:01 +05:30
Venkat Gopalakrishnan
fa1e6e668f mmc: cmdq_hci: Add a memory barrier before ringing doorbell
Ensure the task descriptor list memory is flushed before ringing
the doorbell by adding a memory barrier. Also commit the doorbell
write immediately to help improve performance.

Change-Id: I321d5bed95b802d4bcc00836ce9cdede316b29f5
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-02-17 22:16:32 -08:00
Sagar Dharia
4881556669 slim: msm: Improve bulk message timeout error handling
If a bulk message times out due to interrupt starvation, a late
coming interrupt may access structures that are not valid.
Improve timeout error handling by resetting variables, and changing
relevant logging.

Change-Id: Ie0ee2fd9c2ce1628c69e1975fe713a2a26d9e716
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-02-16 22:50:46 -08:00