Commit graph

583823 commits

Author SHA1 Message Date
Linux Build Service Account
431f1938d9 Merge "msm: ipa3: Fix uninitialized variables access" 2017-02-27 23:37:18 -08:00
Linux Build Service Account
36bf237dc5 Merge "msm: ipa3: Validate IPA client mapping to endpoint index" 2017-02-27 23:37:17 -08:00
Linux Build Service Account
8f3046b536 Merge "ARM: dts: msm: Allow modem MBA to be loaded in carveout for SDM660" 2017-02-27 23:37:16 -08:00
Linux Build Service Account
f97a00ec54 Merge "ARM: dts: msm: change memlat vote for min freq on SDM630" 2017-02-27 23:37:15 -08:00
Linux Build Service Account
2fec724818 Merge "ASoC: msm: Fix kernel crash in "Speaker Function" mixer control" 2017-02-27 23:37:15 -08:00
Linux Build Service Account
ce81588865 Merge "defconfig: msm: Enable PBS driver support for sdm660" 2017-02-27 23:37:13 -08:00
Linux Build Service Account
dd5d0b8fb6 Merge "ARM: dts: msm: Update GFX PM-QoS values for SDM660" 2017-02-27 23:37:13 -08:00
Linux Build Service Account
7d02367922 Merge "qcom: smb138x: Average 10 die temperature samples" 2017-02-27 23:37:12 -08:00
Linux Build Service Account
0b46e817dd Merge "qcom: smb138x: set the freq to 700Khz" 2017-02-27 23:37:11 -08:00
Ashish Garg
3ebc9baaad ARM: dts: msm: enable ESD, ULPS and partial update on sdm630
Add the minimum and maximum fps supported and enable dynamic
fps and esd for fhd video mode panel. Enable ESD, ULPS for
NT and Truly command mode panels. Enable partial update for
truly fhd command mode panel.

Change-Id: I0fe5502d74903e13544603154e853f4b486ca7be
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-02-28 12:35:20 +05:30
Kiran Gunda
12b74de0fe ARM: dts: msm: Add PBS client node for PM660
Add PBS client node to trigger the PBS RAM event
for PM660.

Change-Id: I1be534e63d8121ac6b3cd290ba170ff15012d306
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-02-27 22:40:52 -08:00
Kiran Gunda
c3cd3d3174 regulator: qpnp-oledb: Add lab_vreg_ok notifier callback
OLEDB driver needs the LAB_VREG_OK status to program the PD_CTL
register after the oledb module is enabled. As this status register
is not accessible from the OLEDB driver, register a notifier callback
with LABIBB driver to get LAB_VREG_OK status.

Change-Id: I85009688a2accb6246135d22e08ee21fb8296f62
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-02-28 12:00:32 +05:30
Dilip Kota
7f4bbffddd i2c-msm-v2: Enable/Disable clocks and gpios per transfer
With QUP in shared mode, enabling and disabling the
resources in runtime pm will cause failure of
transactions over the QUP that are running on other
execution environment. To avoid the failure
enable/disable gpios and clocks of QUP per transfer.

Also move the clock prepare and unprepare calls
to runtime pm APIs from the transfer API to
reduce the latencies in the transactions.

Change-Id: Ic697cdc544405d86ec7c675922c18c00fec451a6
Signed-off-by: Dilip Kota <dkota@codeaurora.org>
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
2017-02-27 21:03:23 -08:00
Gaurav Kohli
c24aed69b0 ARM: dts: msm: Allow modem MBA to be loaded in carveout for SDM660
Add sub-device node to allow mba to be able to load in carveout
memory region for SDM660.

Change-Id: I0e9932a0a779a66b7a3d4b682a60885cb7d799c5
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2017-02-27 20:35:09 -08:00
Satya Durga Srinivasu Prabhala
4d1903a891 soc: qcom: sysmon-qmi: fix object corruption due to use after free
While executing multimedia tests which include ADSP SSR testing,
below object corruption observed due to use after free condition.
Add mutex lock to fix the issue.

===============================================
BUG kmalloc-1024 (Tainted: G        W  O   ): \
			Poison overwritten
-----------------------------------------------

INFO: 0xffffffc030db0cb0-0xffffffc030db0cba. \
		First byte 0xff instead of 0x6b
INFO: Allocated in qmi_handle_create+0x4c/0x320 \
			age=14486 cpu=4 pid=32505
	alloc_debug_processing+0x138/0x18c
	___slab_alloc.constprop.61+0x4ec/0x5d0
	__slab_alloc.isra.58.constprop.60+0x48/0x74
	kmem_cache_alloc_trace+0xd4/0x25c
	qmi_handle_create+0x4c/0x320
	sysmon_clnt_svc_arrive+0x34/0xe4
	process_one_work+0x234/0x40c
	worker_thread+0x2e0/0x410
	kthread+0xf4/0xfc
	ret_from_fork+0x10/0x40
INFO: Freed in qmi_handle_destroy+0x154/0x16c \
			age=1159 cpu=4 pid=3784
	free_debug_processing+0x290/0x368
	__slab_free+0x74/0x3ac
	kfree+0x21c/0x290
	qmi_handle_destroy+0x154/0x16c
	sysmon_clnt_svc_exit+0x20/0x30
	process_one_work+0x234/0x40c
	worker_thread+0x2e0/0x410
	kthread+0xf4/0xfc
	ret_from_fork+0x10/0x40

CRs-Fixed: 2009777
Change-Id: If3730f5f972424d49d43d552b7fd1a28e4e0b794
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-02-27 20:23:40 -08:00
Satya Durga Srinivasu Prabhala
2448682db2 Revert "firmware_class: Add an additional path to fw_path list"
This reverts commit 3e47c53624 ("firmware_class: Add an
additional path to fw_path list").

Adding /firmware/images entry in fw_path is introducing selinux
denials as the access was happening under the client process
context. Removing the entry from fw_path structure.

Change-Id: I359f8defe49595a7e53558992080cb94eba42451
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-02-27 19:56:58 -08:00
Mayank Rana
200938e487 f_gsi: Don't reconfigure USB GSI eps multiple time with cable connect case
Commit dbca823c25bf ("f_gsi: Don't send end xfer command when USB is
into U3 state") consolidated below usecases path for RNDIS:
1. USB RNDIS adaptor disable/enable case
2. USB RNDIS suspend/resume case
3. USB cable connect case

Due to USB GSI endpoints are getting disabled as part of above usecase
1 i.e. adaptor disable, it is required to reconfigure and re-enable USB
GSI endpoints when adaptor is enabled. USB GSI endpoints are re-configured
but not re-enabled for above usecase 3 although it is already configured
and enabled as pat of set_alt(1). Hence USB GSI endpoint are partially
configured causing no USB data transfer between USB GSI and IPA GSI which
fails IP address assignment. Fix this issue by making sure that USB GSI
endpoints are not reconfigured in above usecase 3.

CRs-Fixed: 1095920
Change-Id: I67068bac21274d715f61f9e5b83fae54e2c8e22d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-02-27 18:31:22 -08:00
Mayank Rana
82e6740d7f f_gsi: Don't send end xfer command when USB is into U3 state
It is recommended to avoid sending end xfer command with USB GSI
endpoint when USB is into U3 state (i.e. bus suspended) as USB
controller may hang. USB GSI driver sends end xfer command with
suspend implementation when remote wakeup is not allowed. Hence
update IPA driver about remote wakeup status to suspend or
disconnect IPA GSI channel whereas remove sending end xfer command
to USB controller when remote wakeup is not allowed.

CRs-Fixed: 1077546
Change-Id: I3ac3714ccaf4ac9f16c26f59b9550aa825483344
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-02-27 18:30:59 -08:00
Mayank Rana
0d11e5fbc0 f_gsi: Make usb ipa wq as freezable workqueue
USB function driver uses usb_gadget_autopm_get() API to increments
USB controller device's PM runtime usage and child count, and also
expects that USB controller is resumed. Late suspend disables USB
controller device's PM runtime functionality by incrementing
disable_depth count and early resume enables it back once system is
resumed. This results into pm_runtime_get_sync() returning -EACCESS
when APPS is power collapsed and it is resuming due to USB bus resume
case. usb_gadget_autopm_get() API is decrementing device's PM runtime
usage count if it receives error value from pm_runtime_get_sync() API.
USB function driver doesn't check return value which results into
continuing USB operation. On next bus suspend, it decrements usage count
although it was not incremented in previous resume case which makes PM
runtime usage count negative. This can cause multiple issues as below:
1. USB bus resume may take more time causing host re-enumerating USB
gadget device
2. Unclock register access on remote wakeup case
3. USB host mode enumeration may fail due to dwc3 device usage count
is negative.

Fix this issue by making usb ipa wq as freezable workqueue which will
make sure that ipa_work_handler() work is executed only after system is
resumed and USB controller device's PM runtime is enabled.

CRs-Fixed: 1075002, 1074383
Change-Id: I300d1a0081fafcbef3c00c63cddd49be54a651e5
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-02-27 18:29:57 -08:00
Mayank Rana
b7ac056fb9 f_gsi: Fix error handling with usb_func_ep_queue() return value
usb_func_ep_queue() returns -EAGAIN if usb is function suspended and
successfully remote wakeup is performed. This change fixes error
handling with USB GSI function driver to make sure caller knows that
request is actually queued or not from this context. This makes sure
that USB request is queued once USB host has resumed USB bus.

CRs-Fixed: 1033093
Change-Id: I3f3cb1b6b42530bfa93e0d4badacfe651b6bbb4c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2017-02-27 18:29:57 -08:00
Sathish Ambley
8f1eebdfa3 msm: ADSPRPC: Unregister glink notification handle after SSR
Unregister glink notification handle after SSR as otherwise it results
in the link up notification to be skipped resulting in incorrectly
completing the port open notification.

Change-Id: I668de44163a702faade1f170a74f66fb5a0c5571
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
2017-02-27 16:04:56 -08:00
Gidon Studinski
7ba949a80b msm: ipa: increment GSI command timeout
Increment GSI command timeout. This is needed since during Q6 GSI FW
authentication GSI HW is disabled and the response for the HW may be
delayed.

CRs-Fixed:
Change-Id: Ia9ed0f0163abbfd3e242c38a9aea084c1c37e8fd
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>:
2017-02-27 15:41:10 -08:00
Linux Build Service Account
10a55a5874 Merge "ARM: dts: msm: update dload type imem offset for SDM630" 2017-02-27 15:16:34 -08:00
Linux Build Service Account
c892e455fc Merge "ARM: dts: msm: update dload type imem offset for SDM660" 2017-02-27 15:16:33 -08:00
Linux Build Service Account
f32c41e6a5 Merge "msm: kgsl: Use init_utsname() instead of ustname() for kernel build info." 2017-02-27 15:16:32 -08:00
Linux Build Service Account
52e55af28b Merge "usb: gadget: f_mass_storage: Allow USB LPM upon ep disable" 2017-02-27 15:16:31 -08:00
Linux Build Service Account
e5a5057bbd Merge "soc: qcom: spcom: propagate response timeout error" 2017-02-27 15:16:31 -08:00
Linux Build Service Account
7728309bc3 Merge "clk: msm: clock-mmss-8998: Update frequency plan for byte/pixel clock" 2017-02-27 15:16:30 -08:00
Linux Build Service Account
17de1566e1 Merge "usb: pd: Avoid buffer overrun during msg_rx" 2017-02-27 15:16:29 -08:00
Zhen Kong
364643660e qseecom: add mutex around qseecom_set_client_mem_param
Add mutex around qseecom_set_client_mem_param to prevent an
ioctl thread modifying and corrupting data which is being
processed by another ioctl in the other thread

Change-Id: I0cfb8afab4001c2913be693dfe44c761b9568893
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-02-27 13:45:03 -08:00
Puja Gupta
bf57c353c0 soc: qcom: Propagate separate error code for PDR disabled
In case of user PD restart requests from clients, return a separate error
code if PDR is disabled on subsystem. This is so that clients can
distinguish it from other error cases and take appropriate action.

CRs-Fixed: 2011758
Change-Id: Ifac7779455a3984de97a4e3e2f33bd74c5148cab
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2017-02-27 12:33:18 -08:00
Hanumant Singh
f452381305 esoc: Add check for possible null pointer returns
The call to kasprintf() can fail, with a failure to
allocate memory. Handle the condition appropriately.

CRs-Fixed: 1014400
Change-Id: I83d3a6c8bdfd7a104b88a3bedd50f49faeecd97a
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2017-02-27 12:17:05 -08:00
Hanumant Singh
fcf1fb679f esoc: mdm-dbg: Add a debug request engine for external mdm
Add a stub request engine for debugging external modem.

Change-Id: I6360831f21f83fcd25df72492b1d57b30a7d2197
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
Signed-off-by: Bruce Levy <blevy@codeaurora.org>
[satyap@codeaurora.org: fix checkpatch issue]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-02-27 12:10:42 -08:00
Satya Durga Srinivasu Prabhala
544dff7ea4 soc: qcom: pil-loaders: move pil loading of ADSP, SLPI & CDSP to workqueue
When pil loading done through user space helper, there is a possibility
that signal could be pending on thread that initiated the pil, which would
lead to pil failure. To avoid this issue, move pil loading for ADSP, SLPI
and CDSP to separate workqueue in respective loader drivers.

Change-Id: Ie60a7eba7c52ac1565ce166d0e367379cce0b03e
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-02-27 11:46:00 -08:00
Abhijeet Dharmapurikar
b5629d0b98 qcom: smb138x: Average 10 die temperature samples
Averaging 10 die temperature samples reduces error caused by
a trim issue.

Change-Id: Ie0b9477c121df92544280b8e322c2205c680f6eb
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-27 11:05:36 -08:00
Abhijeet Dharmapurikar
0bdb49dd4b qcom: smb138x: set the freq to 700Khz
700Khz is not a harmonic of the digital clock and is optimal enough
for all vbus ranges. Running the smb in the non harmonic freq range
is required for correct TDIE adc reporting.

Change-Id: Ib70d64cd72b7408474fd64df287f6404d3749764
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-27 11:05:28 -08:00
Jordan Crouse
411b19b48e msm: kgsl: Add placeholders for KGSL power limit functions
Add placeholders for the KGSL power limit functions if
CONFIG_QCOM_KGSL is not enabled in the kernel config.

Change-Id: Ic0dedbad15b54cd8c3eba1b0649cb23193dbc16c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2017-02-27 09:16:35 -07:00
Linux Build Service Account
3bf75ddd22 Merge "defconfig: enable drm/kms driver in mediabox config" 2017-02-27 07:44:40 -08:00
Linux Build Service Account
8e6753474b Merge "drm/msm: Revert "drm/msm/sde: fix color component order"" 2017-02-27 07:44:39 -08:00
Ghanim Fodi
3e6f65c965 msm: ipa3: Fix uninitialized variables access
Kernel compilation warning is generated due to
these uninitialized variables access. This change
fixes them by initializing the variables.

Change-Id: Ifae04fe5e4d1b9a0c2c399a3c6746c38dea5c4cc
CRs-fixed: 2004062
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2017-02-27 06:51:54 -08:00
Ghanim Fodi
03a55bab9a msm: ipa3: Validate IPA client mapping to endpoint index
ipa3_get_ep_mapping() is used to map an IPA client to
IPA endpoint index. The index is used as array index.
This change validates that the returned index is
within the valid range.

CRs-fixed: 2012203
Change-Id: I25df8d0c9b60a5290f2457dd2ed77f2c7e78b46f
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2017-02-27 06:45:53 -08:00
Kiran Gunda
9147c318e6 defconfig: msm: Enable PBS driver support for sdm660
PBS driver triggers the PBS event specified by the client
driver to execute the PBS RAM configuration. Enable it for
sdm660 targets.

Change-Id: I95c70295805d31506c864546b763bef8a5e7b4bf
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-02-27 04:55:46 -08:00
Rajesh Kemisetti
8aa55e6579 msm: kgsl: Add GPU Cx ipeak client support on SDM660
To handle Cx peak current limit on SDM660, GPU needs
to call Cx ipeak driver APIs when it switches between
threshold points.

Cx ipeak driver will throttle cDSP frequency if all
the clients are running at their respective threshold
frequencies to limit Cx peak current.

Change-Id: I5ffcf1a42523072d2b8b7bc0022eb3cc067acbb9
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2017-02-27 18:00:12 +05:30
Nikhil Kumar Kansal
e3b58b53c0 ARM: dts: msm: change memlat vote for min freq on SDM630
Updating min frequency for memlat voting from 787MHz to
1113MHz to avoid intermediate DDR frequency switching on
SDM630 target.

Change-Id: I4a66efcd3301c3662b48b11c11f83a97c6562f31
Signed-off-by: Nikhil Kumar Kansal <nkansal@codeaurora.org>
2017-02-27 04:12:48 -08:00
Prakash Gupta
2f31e3aa70 ARM: dts: msm: add MBA carveout for sdm660
Add MBA carveout between ADSP & cDSP in sync with
v1 memory map.

Change-Id: I65af5e01af1e5dd3de7f0666017dcd82ea8f7293
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2017-02-27 17:29:15 +05:30
Rohit Kumar
318946a30e ASoC: msm: Fix kernel crash in "Speaker Function" mixer control
Use snd_soc_kcontrol_codec instead of snd_kcontrol_chip
to obtain the codec information from the kcontrol.

CRs-Fixed: 2012091
Change-Id: I01e3d7d1a4237ac631bbc4bd4d1c047b8b7aa207
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
2017-02-27 16:09:12 +05:30
Manaf Meethalavalappu Pallikunhi
82cc4f26dc power: bcl: Serialize frequency mitigation request from BCL events
For cpu frequency mitigation, there is one common device request
handle for all BCL events. There is a possible race condition for
frequency mitigation request if two BCL events are cleared
simultaneously and cpu frequency mitigation handler for these two
events are handled in different cpus. This gives rise to a scenario
where cpu frequency in mitigated state even though all BCL events
are cleared.
To avoid this race condition, serialize frequency mitigation request
using a mutex.

CRs-Fixed: 2005131
Change-Id: I29b189b2ecd18603441d0b69faa4c38123244a4a
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-02-27 14:52:58 +05:30
Kiran Gunda
957b513d84 soc: qcom: qpnp-pbs: Add PBS driver support
The PBS driver helps the client drivers to trigger the PBS
event to execute the PBS RAM configuration as requested by the
client driver.

Change-Id: Ic5d1290ffa0b66ac7a8f68529aafcf0b871ee3e8
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-02-27 14:29:44 +05:30
Ray Zhang
62192c4061 defconfig: enable drm/kms driver in mediabox config
Enable drm/kms driver in msmcortex media config.
Enable VT in msmcortex media config.

CRs-Fixed: 2002381
Change-Id: I57a7a737d1f0bc22f229c087a6932b9e73c0537c
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-02-27 16:15:11 +08:00
Linux Build Service Account
25becb4433 Merge "msm: ext_display: move ext_display out of FB driver" 2017-02-26 23:48:30 -08:00