Commit graph

590827 commits

Author SHA1 Message Date
Gaurav Kohli
497f7511cd soc: qcom: pil: Add trace events for PIL driver
Add trace event support for PIL Module to help in
debugging.

Change-Id: If560e275f3207eca4b084cba5e6384a7c452748c
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
2017-05-30 22:32:49 -07:00
VijayaKumar T M
4eadca3cc2 msm: camera: Prevent info leak in kernel driver.
-Use %pK for kernel address to avoid the information leak.

(Change-Id: Ib0631d5578aba033510babe4f43e2a63bb959747)

CRs-Fixed: 2009672
Change-Id: Id7e8c41251612ce1a93dba854b5cc03e894c5d09
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
2017-05-30 22:09:15 -07:00
Terence Ho
76e56268ee msm: ais: cpp fix to check zero length ioctl
Port of ioctl validation for zero length ioctl
from camera_v2.

Change-Id: I635522f331d1e18641196ee3101c64ccc285636a
CRs-fixed: 2025367
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
2017-05-31 11:34:34 +08:00
Yahui Wang
41f27c5716 msm: mdss: control avdd enable gpio when doing panel reset
Avdd enable gpio maybe used for AMOLED panel to control avdd
output. This gpio should be enabled/disabled when panel
does unblank/blank once to avoid panel electric leakage.

Change-Id: I18f0f6491f0ff97df5556e74a686a18b262708df
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-05-31 11:13:28 +08:00
Pavankumar Kondeti
57fd979fc9 core_ctl: un-isolate BIG CPUs more aggressively
The current algorithm to bring additional BIG CPUs is very
conservative. It works when BIG tasks alone run on BIG
cluster. When co-location and scheduler boost features
are activated, small/medium tasks also run on BIG cluster.
We don't want these tasks to downmigrate, when BIG CPUs are
available but isolated. The following changes are done to
un-isolate CPUs more aggressively.

(1) Round up the big_avg. When the big_avg indicates that
there are 1.5 tasks on an average in the last window, it
indicates that we need 2 BIG CPUs not 1 BIG CPU.

(2) Track the maximum number of running tasks in the last
window on all CPUs. If any of the CPU in a cluster has more
than 4 runnable tasks in the last window, bring an additional
CPU to help out.

Change-Id: Id05d9983af290760cec6d93d1bdc45bc5e924cce
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-05-31 08:33:48 +05:30
Pavankumar Kondeti
f37f0680d7 sched: Improve short sleeping tasks detection
When a short sleeping task goes for a long sleep, the task's
avg_sleep_time signal gets boosted. This signal will not go
below short_sleep threshold for a long time time even when the
task run in short bursts. This results in frequent preemption
of other tasks as the short burst tasks are placed on busy CPUs.

The idea behind tracking avg_sleep_time signal is to detect if a
task is short sleeping or not. Limit the sleep time to twice the
short sleep threshold to make avg_sleep_time signal more responsive.
This won't affect regular long sleeping tasks, as the avg_sleep_time
would be higher than threshold.

Change-Id: Ic0838e81ef7f5d83864a58b318553afc42812853
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-05-31 08:30:01 +05:30
Kasin Li
a61bcfad32 drm/msm: Fix potential buffer overflow issue
In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.

Change-Id: I0b61cccffd836e2dd3c859446470af4b6451b9ed
Signed-off-by: Kasin Li <donglil@codeaurora.org>
2017-05-31 10:58:19 +08:00
Linux Build Service Account
6cec3ff5eb Merge "ais: always do clock set_rate after get_rate" 2017-05-30 16:04:33 -07:00
Linux Build Service Account
1ad752ad89 Merge "Perf: ARM: Support 32bit armv8-pmuv3 driver" 2017-05-30 16:04:32 -07:00
Linux Build Service Account
0b63aa5007 Merge "spcom: open channel return EBUSY when channel in use" 2017-05-30 16:04:31 -07:00
Linux Build Service Account
008dfbc55c Merge "f_audio_source: Use f_audiosource as first device name" 2017-05-30 16:04:31 -07:00
Linux Build Service Account
5f638a12ab Merge "diag: dci: Add validity check for dci client's process descriptor" 2017-05-30 16:04:30 -07:00
Linux Build Service Account
28ca6375c7 Merge "adreno_tz: Remove unnecessary devfreq NULL check in tz_handler()" 2017-05-30 16:04:29 -07:00
Linux Build Service Account
a7f31ff804 Merge "wil6210: fix wil->platform_ops.suspend failure handling" 2017-05-30 16:04:28 -07:00
Linux Build Service Account
3903a9f28c Merge "ARM: dts: msm: enable 11AD keep-radio-on-during-sleep on MSM8998" 2017-05-30 16:04:27 -07:00
Linux Build Service Account
103e31feaa Merge "battery: don't wait for aicl rerun" 2017-05-30 16:04:26 -07:00
Linux Build Service Account
6d0b4d37a3 Merge "smb-lib: ignore disconnects during power role swap" 2017-05-30 16:04:25 -07:00
Linux Build Service Account
4cc716041e Merge "iommu/arm-smmu: Optimized IOMMUS property parsing" 2017-05-30 16:04:24 -07:00
Linux Build Service Account
22d89182ea Merge "ARM: dts: msm: Add support for MSM8996pro UFS based board" 2017-05-30 16:04:24 -07:00
Hemant Kumar
f26a5ca364 usb: pd: policy_engine: Handle Get_Source_Cap properly from PE_SRC_Ready
Get_Source_Cap message is responded by sending source capability message
without running sender response timer after GoodCRC is received. As a
result if sender response is timed out driver is not issuing hard reset.
Fix the issue by moving policy engine state from PE_SRC_READY to
PE_SRC_SEND_CAPABILITIES which starts sender response timer and handles
timeout.

Change-Id: Id47a4c8f989db19d28ef9c8b2c069d0b7797e17f
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-30 15:09:08 -07:00
Benjamin Chan
55a175279c msm: mdss: Avoid NULL mixer during partial update ROI setup
Under MDSS suspend resume usecase, the mixer config might not be
setup and if a partial update is issued for the first frame, it is
necessary to avoid accessing the NULL mixer config.

CRs-Fixed: 2053822
Change-Id: I17c0b98805ce9395899e988032097740126fee83
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-05-30 14:24:23 -04:00
Subash Abhinov Kasiviswanathan
ac90ad6d75 sched: Remove debug WARN_ONCE messages
If flow control functionality is not enabled in traffic controller
userspace modules, WARN_ONCE messages are triggered. Note that qdisc
will still be setup even if these debug messages are logged.
Remove these messages to reduce log spam.

CRs-Fixed: 2053221
Change-Id: I62a2fcb30d19579180b3df16f33953546f94511a
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2017-05-30 10:48:12 -07:00
Liam Mark
aecadd7140 iommu: iommu-debug: limit memory address exposure
Update pte and dma atos debugfs nodes to be inline
with other iommu debugfs nodes and only expose memory
addresses when kptr_restrict is disabled.

Change-Id: I46d5de498b811b4874be570aea7b41461b9a1a98
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2017-05-30 09:29:54 -07:00
Liam Mark
a283c457ee iommu: iommu-debug: cleanup iommu debug
Only expose debugfs nodes for test devices.
Restrict secure attach to a valid vmid.
Add clock reference counting to make code more robust.
Restrict address printing with kptr_restrict.

Change-Id: Ibf90068d778b0156e3bb42287af5dda3864da5fc
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2017-05-30 09:28:58 -07:00
Siddartha Shaik
452836f4d3 ASoC: msm: Add support for 192KHz sampling rate
Add upto 192KHz support for Multimedia18 FE DAI. This FE DAI
is to support DSP loopback upto 192KHZ.

CRs-Fixed: 2049714
Change-Id: I7197744a02b0bd23e40eebe23b0220a5dd22ac47
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-30 09:20:11 -07:00
Siddartha Shaik
181100aedd ASoC: msm8998: Add dai entries to support loopback
Add required playback and capture DAIs to support
transcode loopback.

CRs-Fixed: 2049714
Change-Id: I1494f1895485ecb8691b8e3fa2cf38e1c1a2d400
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-30 09:19:20 -07:00
Siddartha Shaik
362017e0f6 ARM: dts: msm: Add transcode loopback dtsi for msm8998
Add transcode loopback driver to support compressed loopback usecase.

CRs-Fixed: 2049714
Change-Id: I99ba356a310fb03592f695bf12a8b698516a21fd
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-30 09:17:20 -07:00
Vidyakumar Athota
efcf296cf9 ASoC: msm: add support for RTIC events
For secure dolby playback runtime integrity check(RTIC) is
performed in DSP. Add support to handle this rtic events for
secure playback.

Change-Id: If7a64267e2177e179e6c90296bddcde3b06c75ff
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2017-05-30 09:16:24 -07:00
Linux Build Service Account
350f6ac817 Merge "msm: ipa: Fix to use GFP_DMA flag" 2017-05-30 09:01:09 -07:00
Derek Chen
866c951f73 ARM: dts: msm: add noirq pcm platform driver on msm8996 auto
Add support for noirq pcm platform driver
for playback and capture usecases on MSM8996
automotive specific adp, cdp, dragonboard and
hypervisor platforms.

CRs-fixed: 2049744
Change-Id: I2f2c2afb43d0ebe884eebd0654a1a22612fffd2c
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2017-05-30 08:31:13 -07:00
Siddartha Shaik
c340bec5c7 ASoC: msm: Add transcode loopback driver
Add DSP transcode loopback. Userspace can use this driver
to support TX to RX audio HW DSP loopback.

CRs-Fixed: 2049714
Change-Id: Ie83f5ca2c626c8fffbec4624f3e35c6c179d4c8c
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-30 17:59:31 +05:30
Ajay Agarwal
bcf8bc839e ARM: dts: msm: Enable DRD mode for 2nd USB controller on MSM8996 Auto
Enable DRD mode for secondary USB controller of MSM8996 Auto
target. User can change the mode using sysfs.
Eg:
   echo peripheral > /sys/devices/soc/7600000.hsusb/mode (Device)
   echo host > /sys/devices/soc/7600000.hsusb/mode (Host)
   echo none > /sys/devices/soc/7600000.hsusb/mode (Disconnect)

Change-Id: Ia1d9c115b6fed01a7ab3a9f0489d6eb9d735a282
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2017-05-30 17:17:58 +05:30
Ajay Agarwal
2f211b5dc9 usb: dwc3: Allow DWC3 to handle non-extcon controller instance
Extcon is required by the USB controller to switch between
host and peripheral modes using BSV and ID events. If the
DT node of a particular controller does not have 'extcon'
property set but the mode is set to host only using
dr_mode = "host", then we do not fail the probe and
bring up the controller in host mode.

Add another case to the probe that when extcon prop is not
set and the controller mode is set to DRD, then bring up
the device in host mode. User can always change the mode
using sysfs.

Change-Id: Iad44748b99a944fab93ff86a34787bd93dcb4ed6
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2017-05-30 15:55:01 +05:30
Amir Samuelov
d23cacb3ac spcom: open channel return EBUSY when channel in use
The char device /dev/sp_kernel is used for loading SP application and
creating new channel char device, therefore might be temporary busy.
Return EBUSY error to user system call open() so it can retry.

Change-Id: I230577fe6b03ac7afd7175f72f9a3fa80db5a524
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-05-30 02:54:46 -07:00
Abir Ghosh
25865f691b qbt1000: Fix for incorrect buffer size check and integer overflow
Fix an incorrect buffer size check which might have caused integer
overflow.

CRs-Fixed: 2045285
Change-Id: I3b5b996c7405f51b488d6cbda31c81a9a9905f23
Signed-off-by: Abir Ghosh <abirg@codeaurora.org>
2017-05-29 23:57:06 -07:00
Gopikrishna Mogasati
2b1e32ab83 diag: dci: Add validity check for dci client's process descriptor
This fix checks the validity of dci client's process descriptor
before issuing a signal to it when subsystem restart is performed.
This fix avoids accessing cleaned-up process descriptor's fields.

CRs-Fixed: 2047235
Change-Id: Ic26977dc22c68f0a7007dd963c9273bba2a5dbfe
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
2017-05-30 12:18:34 +05:30
Ashish Garg
3b14e4b252 msm: mdss: declare function used only within the file as static
Fix sparse tool error which mandates that functions used only
within the file to be declared as static to allow compiler
optimizations.

Change-Id: Iba14c50730bb7ce402e4b45bc9b2c8d1fec6f3eb
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-05-30 10:38:29 +05:30
Linux Build Service Account
ace73576d2 Merge "msm: mdss: Fix potential dereferencing of null pointer" 2017-05-29 10:17:24 -07:00
Mohit Aggarwal
7e45e3a6c1 diag: Synchronize command registration table access
Currently, command registration table is being read
in debugfs without any protection which may lead to
access of stale entries. The patch takes care of the
issue by adding proper protection.

CRs-Fixed: 2032672
Change-Id: I6ae058c16873f9ed52ae6516a1a70fd6d2d0da80
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2017-05-29 15:52:21 +05:30
Venu Yeshala
d5a915cb03 msm: camera: isp: Avoid information leak in ISPIF
Change the format specifier in a debug print for ISPIF base
address to avoid information leak.

Change-Id: Ic6c799349ea98448da113d8710300934d77079b8
Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
2017-05-29 02:05:18 -07:00
tharun kumar
db95e66a97 SDM660: ADSPRPC: Handle NULL pointer dereference
Avoid using strlen as it results in NULL pointer
dereference for NULL value.

Change-Id: I21a9793b48caddb423f081cdcf2690ded1822e88
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-05-29 01:44:25 -07:00
Maya Erez
4e05e65580 wil6210: stop TX queues when suspending
Stop TX queues before suspending in order to prevent TX
packets drops.

Change-Id: Ieda3eef72e20005041c132765c28c8071621844f
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-29 11:16:32 +03:00
Linux Build Service Account
539f0433bb Merge "Asoc: msm: sdm660: Move mbhc_hs_detect to late_probe" 2017-05-29 01:01:33 -07:00
Tirupathi Reddy
4b7c2851cd regulator: qpnp: check min/max voltages against HW configuration
Regulator HW has the programmable voltage upper and lower limit
registers and doesn't allow voltage set points outside the pre-
configured voltage limits. Add a check in driver that throws an
error if the SW specified voltage range is not within the pre-
configured limits in HW.

CRs-Fixed: 2044789
Change-Id: I3ab791af3148b761cc5eec626bac8167ce11939d
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-05-29 09:52:46 +05:30
Linux Build Service Account
b7d425e951 Merge "ASoC: msm: Add IEC_61937_FMT_UPDATE event" 2017-05-28 05:12:00 -07:00
Maya Erez
60c1eb0d65 wil6210: fix wil->platform_ops.suspend failure handling
Current handling of wil->platform_ops.suspend can lead to
bad cases, as wil_status_suspending was cleared before
wil_status_resuming was set and bus request voting was restored
too late.
In addition, bus voting in suspend should be done only at the end
of he suspend flow.

Change-Id: I8856d393c1796a2bd8fd5e07b233a5d61efc80c0
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-28 10:45:19 +03:00
Maya Erez
d07260bed5 wil6210: restore bus voting before resuming the device
Move the bus request restore to be done prior to
sending wmi_resume to the device, as the device can restore
the data path upon receiving this command.

Change-Id: Ib2442fcfea055a855bb6be65f9013bb7ad754767
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-28 10:45:04 +03:00
Linux Build Service Account
19827f9f2e Merge "msm: mdss: Call regulator enable/disable for both DSI controllers" 2017-05-27 18:12:14 -07:00
Linux Build Service Account
d11a00dbfa Merge "msm: mdss: ensure clocks are on till pixel transfer is completed" 2017-05-27 18:12:13 -07:00
Linux Build Service Account
ce48f56032 Merge "msm: mdss: remove client from device list if failed to register" 2017-05-27 18:12:12 -07:00