Commit graph

594039 commits

Author SHA1 Message Date
Govind Singh
7235e034df ath10k: Vote for hardware resources for WCN3990
During recovery, there are cases where in WLAN driver running on
APPS can access CE register causing exceptions because of
hardware in reset state. Fix the issue by not resetting the
hardware in WLAN firmware during recovery but halt the CE and MAC
and reset the hardware only when reinitialization starts. For
this to work, wcn3990 ath10k driver needs to keep the clock and
regulator votes so that WLAN hardware will not go into weird
state because of not resetting it but cutting the resources.

Change-Id: I765fd4aaa2fea6f41f4760564b8d1cb8c3d9651b
Signed-off-by: Govind Singh <govinds@codeaurora.org>
2017-09-21 06:44:55 -07:00
Govind Singh
2b0e054796 ARM: dts: msm: update wcn3990 wlan device node for APQ8098
Add clock and regulator nodes for WCN3990.
During recovery, there are cases where in WLAN driver running on
APPS can access CE register causing exceptions because of
hardware in reset state. Fix the issue by not resetting the
hardware in WLAN firmware during recovery but halt the CE and MAC
and reset the hardware only when reinitialization starts. For
this to work, wcn3990 ath10k driver needs to keep the clock and
regulator votes so that WLAN hardware will not go into weird
state because of not resetting it but cutting the resources.

Change-Id: Iaaa793956bed687e4d76acda93f7fa467773f013
Signed-off-by: Govind Singh <govinds@codeaurora.org>
2017-09-21 06:43:21 -07:00
Varun Balaraj
7200f000f9 ASoC: msm: Add pan/scale & downmix control as platform mixer controls
During soundcard deregistration, free_chmap() is called as part of
pcm_free. This only frees downmix kcontrol as pcm has reference
only to downmix kcontrol followed by freeing of pcm pointer. The
other two kcontrol are freed as part of snd_ctl_remove(). However,
while freeing other two kcontrols, pcm_usr_ctl_private_free()
accesses pcm->streams which are already freed causing crash.
Fix is to add pan/scale & downmix controls as platform controls
instead of user control.

Change-Id: Ib2890122d079201e02c4b7839694d2e7618037b7
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
2017-09-21 18:44:25 +05:30
yidongh
8d8e7881de ASoC: msm: qdsp6v2: initialize L/R/C gain for both mono/stereo playback
When there's a dynamic channel change from mono to stereo,
volume burst is observed because center channel gain for
stereo is not initialized. Initialize center channel gain
for both mono and stereo playback.

CRs-Fixed: 2095081
Change-Id: Ib92236f55b1f171603be956d00c8fcab7c4169d3
Signed-off-by: Yidong Huang <yidongh@codeaurora.org>
2017-09-21 02:53:59 -07:00
Vinayak Menon
d385ca7d06 ion: fix the return value of shrinkers
ION page pool and cma shrinkers return the total pooled
memory instead of the freed. This can result in an early
exit of ION page pool shrinker thus giving back less memory
to the system. For cma shrinker this change doesn't have an
effect since the callers of shrink_slab currently ignores
the return value.

Change-Id: I0b3727807d9a5f020623766d27da360d077395f3
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-09-21 15:13:59 +05:30
Guchun Chen
6a11240349 drm:msm:sde: enable sde client customization
Sde client customization is disabled by previous commit which
is propagated from other branch. After disabling this, 4K display
on HDMI can not be up. This is because when creating drm plane in kernel,
sde client customization will directly set possible_crtcs per plane
reporting to user space. When disabling it, user space's sdm strategy
could not get and assign correct pipes for 4K display.

Change-Id: Ie6a870c352533060f7c810bdb5c99b7c1534117d
CRs-fixed: 2107328
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2017-09-21 15:28:40 +08:00
Mukesh Kumar Savaliya
b60a2fa1ee serial: msm_serial_hs: Keep Rx and Tx path clean while going inactive
This patch disables Rx and Tx engine properly while going to suspend or
shutdown. There are chances when BT SOC or client is going bad and
disrupts the UART SW state machine.

1.Do not allow double resource_vote and hence pipe connect at port open.
2.While going to suspend, close the HW resources forcibly to prevent
  UART from going bad for the subsequent resume cycle.
3.Stop Rx engine gracefully even if clocks are off to obey the framework.
4.During resource unvote, if runtime PM is disabled then go for forced
  suspend.
5.In case of fatal error, stop further IPC logging.
6.Add relevant log if the Rx pipe is not empty at the time disconnecting.
7.Prevent Rx byte entering in case of back to back loopback test, as
  this causes data mismatch.
8.Add the logs correctly just after reading the status instead doing it
  later which doesn't get logged in case of any failure.

Change-Id: I9426e9ae8c5b07d74e95ec37651ece0d46928104
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2017-09-20 18:59:41 +05:30
Prakash Gupta
e6a18bb617 iommu: free io pgtable during domain detach.
Pagetable pgd is allocated in arm_smmu_init_domain_context and is freed in
arm_smmu_domain_free. Client can attach/detach domain without freeing the
same. This causes memory leak. This was introduced with
commit fe676929a9 ("iommu/arm-smmu: fix a DOMAIN_ATTR_DYNAMIC memory
leak")

Free io pgtables in arm_smmu_destroy_domain_context, which is invoked at
the time of domain detach.

Change-Id: Ib53e4efdd8dca33437596f3f0ccaa8ccaae79ca0
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2017-09-20 11:04:47 +05:30
Fenglin Wu
28121ca02f power: smb-lib: Disable USB IRQs during high duty cycle
Disable USB IRQs after high duty cycle IRQ triggered and re-enable
them in the delay worker. This helps to avoid the high duty cycle
IRQ storming.

CRs-Fixed: 2094725
Change-Id: Iba22a7402692b5ee5f738cc17ed9c214f6014ac0
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-09-20 12:34:11 +08:00
Abhijeet Dharmapurikar
eab089bd20 smb-lib: allow reading vbus without presence
Currently the driver skips invoking adc api's if usb is not
present i.e. vbus has fallen below 3.3V.

This presence check is not required for the vbus. Skip that
check.

Change-Id: I4a2dd91109a308b553b7407618ee8f3221127f61
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-09-19 18:18:22 -07:00
Dustin Brown
5b54754167 arm/arm64: Define backport flag for save_stack_trace_tsk()
The export of save_stack_trace_tsk() was previously backported to
msm-4.9, without a backported flag to detect support. Define a new
backport flag, so kernel modules can use this function when it is
exported.

Change-Id: Iec65e6f9fed0a9bf686f5e5c8ba4f59691eb1ee0
CRs-Fixed: 2105458
Signed-off-by: Dustin Brown <dustinb@codeaurora.org>
2017-09-19 11:41:04 -07:00
Ashish Garg
32d80f8c0c clk: msm: mdss: add support for chip serial number in dfps info
Dfps info is calculated for a specific msm part and needs to be
used for the same. Add a chip serial number for the dfps info so
that the PLL trim codes are used for the same msm part on which
they are generated.

Change-Id: I6f1e519c1e9278b35dfbdf3d9ba4a2ed0e1a6a78
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-09-19 06:32:00 -07:00
Varun Balaraj
10b176a997 ASoC: msm: qdsp6v2: primary plus 8 interactive stream playback fix
Max ASM session upperbound condition is corrected to support
8 interactive plus a primary streams playback.

Change-Id: I5ec29c70941f52af020a64cc58bf10be52354f1b
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
2017-09-19 03:11:22 -07:00
Vijay kumar Tumati
b7f86b239c ARM: dts: msm: Add laser LED support on MSM8998 MTP
Add laser LED device for msm8998 MTP to support
depth sensor.

Change-Id: I8603540d56adbc0d0d3ee41959f7e235dc459a8d
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2017-09-19 02:09:06 -07:00
Rahul Sharma
25a5df4ced msm: ais: Instead of read_lock use read_lock_irqsave
Prevent deadlock between tasklet and delete_stream by stopping
irq during delete_stream.

Change-Id: I4aba47b5cab2722c352139f793b75d7c86cd49d8
CRs-fixed: 2076578
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2017-09-19 01:49:08 -07:00
Abhijeet Dharmapurikar
ce4ab07431 battery: reduce SMB only for taper stepper
Currently the driver moves FCC to PMI as it steps down
from SMB. Instead we should step down just the SMB.

Change-Id: I7ad9ca4364a44bacb539f8b045cf97f7945155f5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-09-18 16:13:52 -07:00
Abhijeet Dharmapurikar
54d690d396 battery: wait 500mS between steps for taper stepper
Currently the code only waits 100mS between steps. The hardware
could take longer to deglitch its signals and status. Extend the
wait to 500mS.

Change-Id: I4a037f85f43bc670c5a357e4ecb46962b0d33598
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-09-18 16:12:50 -07:00
Vidyakumar Athota
34b0260fbc soc: qcom: fix out of bounds read issue
If userspace sends non-null terminated channel name then
out of bounds read is possible while printing channel name.
Fix this issue by validating channel name before use.

Change-Id: I418b7f446c6a849450dd4314592c1d3810163bdc
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2017-09-18 16:07:39 -07:00
Karthikeyan Mani
ba3c2fde98 ASoC: wcd-dsp-mgr: Add range check before getting component
Add range check for wdsp_cmpnt_type to be within max
and greater than 0 before accessing the array to get
the component.

CRs-fixed: 2068865
Change-Id: Ibc3128297a024f7d6d548c946a035e604f573b64
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2017-09-18 14:25:47 -07:00
Will Huang
cf41466523 msm: wlan: Update regulatory database
Update max tx power of country BZ/IN/KN/PA/TT/UZ/VE
Update max bandwidth of country CA
Add country GI/IQ
Remove channel 14 of country JP

Change-Id: Iacbb07b222d1c15e9109d8bbfac797fd889444a0
CRs-Fixed: 2094357
Signed-off-by: Will Huang <wilhuang@codeaurora.org>
2017-09-18 05:13:34 -07:00
Will Huang
72629a7a1e msm: wlan: Update regulatory database
Update upper bound of 5GHz channels for country MY from 5815 to 5835

Change-Id: Ib11cfa97316b90bc4ffb50420c84df187ff80a7f
CRs-Fixed: 2103994
Signed-off-by: Will Huang <wilhuang@codeaurora.org>
Signed-off-by: Ashish Kumar Dhanotiya <adhanoti@codeaurora.org>
2017-09-18 05:13:27 -07:00
Vijay kumar Tumati
63f5792c5c msm: camera: Add laser LED support for depth sensor
Adding new submodule for lased LED and APIs to
support register WRITE/READ operations.

Change-Id: I7e6dc27a01985c223be791b16e6b7da4bbc1be74
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2017-09-18 16:05:57 +05:30
Linux Build Service Account
6f777b2385 Merge "wil6210: refresh FW capabilities during interface up" 2017-09-18 01:31:43 -07:00
Eric W. Biederman
5720436329 cgroupns: Close race between cgroup_post_fork and copy_cgroup_ns
In most code paths involving cgroup migration cgroup_threadgroup_rwsem
is taken.  There are two exceptions:

- remove_tasks_in_empty_cpuset calls cgroup_transfer_tasks
- vhost_attach_cgroups_work calls cgroup_attach_task_all

With cgroup_threadgroup_rwsem held it is guaranteed that cgroup_post_fork
and copy_cgroup_ns will reference the same css_set from the process calling
fork.

Without such an interlock there process after fork could reference one
css_set from it's new cgroup namespace and another css_set from
task->cgroups, which semantically is nonsensical.

Change-Id: Iadec82bd07a43bf7cefcf8fc17603700fd4895c3
Cc: stable@vger.kernel.org
Fixes: a79a908fd2b0 ("cgroup: introduce cgroup namespaces")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Git-commit: eedd0f4cbf5f3b81e82649832091e1d9d53f0709
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-09-18 11:34:17 +05:30
Alexei Avshalom Lazar
f0e4bc6843 ARM: dts: msm: update PCIe WAKE for msm8998 to be pull-up
PCIe WAKE for msm8998 is set to pull-down. This configuration
can cause the wake signal to be trigerred in some scenarios.
WAKE gpio should be always pull-up for preventing false wakes.

Change-Id: I893ef8908437d2118238c6fd45809703b1f5e3bb
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
2017-09-17 09:39:47 +03:00
Lior David
3a63c9e892 wil6210: support AOA in FTM session
Add support for running AOA measurement as part of an
FTM session.
In order to simplify the implementation both in the driver
and FW, AOA measurement is reported using the same vendor
event and not using QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_AOA_MEAS.
This way we can also report the antenna array mask which was
missing from the vendor commands API for AOA inside FTM session.

Change-Id: I3962487b2e6fd8e56e6e3953c86fd95abe6a9aa0
Signed-off-by: Lior David <liord@codeaurora.org>
2017-09-17 08:28:48 +03:00
Linux Build Service Account
3f06fc9b4a Merge "usb: gadget: f_fs: Do not free IPC log buffer when free instance" 2017-09-15 18:12:39 -07:00
Linux Build Service Account
809e35f581 Merge "ath10k: synchronize WLAN ON/OFF cmd during system suspend" 2017-09-15 18:12:38 -07:00
Linux Build Service Account
393bfcf232 Merge "cfg80211: Include length of kek in rekey data" 2017-09-15 18:12:36 -07:00
Subbaraman Narayanamurthy
4ce690327a power: qpnp-fg-gen3: synchronize ESR extraction control configuration
Currently, ESR extraction control is configured from two paths.
First is invoked when Qnovo is enabled or disabled. Second is
invoked when the pulse train is done and ESR measurement is
requested. When the latter is run, there is a sleep time of 1.5
seconds that is essential for allowing FG to do ESR measurement.
However in that time window, if Qnovo is disabled for some reason
then ESR extraction control will be kept disabled unexpectedly.

Fix this by protecting both the paths using a mutex lock as well
as checking for qnovo enable status before disabling ESR
extraction control after measuring ESR.

Change-Id: Ib93539071724a1ce59d198074854a8a9c5fd3ab3
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-09-15 13:57:01 -07:00
Linux Build Service Account
569fef54de Merge "nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS" 2017-09-15 09:14:12 -07:00
Linux Build Service Account
63bd7326e4 Merge "msm: kgsl: Do not crash on context detach timeout failure" 2017-09-15 09:14:11 -07:00
Vidyullatha Kanchanapally
162b1e5303 cfg80211: Include length of kek in rekey data
With support for new AKM suites (example FILS-SHA256), the KEK length
can now be more than NL80211_KEK_LEN and the KCK length can be zero.
Add changes in cfg80211 to specify the length of KEK, and make KCK
optional. Make NL80211_REKEY_DATA_KEK as NLA_BINARY to enforce a maximum
length check.
Also add macro CFG80211_REKEY_DATA_KEK_LEN to indicate support for
including KEK length in rekey data.

CRs-Fixed: 2087759
Change-Id: Ica8dbb8614e0a9c3905e125b4a5254e43821984e
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
2017-09-15 17:58:14 +05:30
Vatsal Bucha
3e3ba94fb5 ASoC: sdm660_cdc: Fix HPH CnP and kernel panic issue on sdm660-internal
Pop is observed after we start playback on hph.
This is because we do not enable both compander
channels at the same time which is not according to
qcrg. Amplitude of pop gets reduced after
corresponding change is made.
Also kernel panic is observed during SSR. This is because
DSP does not get sufficient time to bring up LPASS after SSR.
An increase in ADSP Ready timeout resolves the issue.

CRs-Fixed: 2101404
Change-Id: Iaea0f5060cdd87754e074ecbba18b5045cd4351a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2017-09-15 16:26:57 +05:30
Sarada Prasanna Garnayak
ae120800ba ath10k: synchronize WLAN ON/OFF cmd during system suspend
During system suspend/resume or WLAN interface up/down
by the network subsystem the ath10k SNOC WLAN driver
configure WLAN enable/disable cmd with the WLAN firmware
over QMI interface. The WLAN enable/disable cmd configuration
with the WLAN firmware during system suspend is preventing
the system suspend.

Register PM event notifier for the ath10k SNOC platform
driver and synchronize the WLAN HIF power down/up
configuration, WLAN enable/disable cmd configuration
with WLAN firmware according to the system power state.

CRs-Fixed: 2110607
Change-Id: I5eeda967ae11c21ab5164c18b3e0a3bf668c916a
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-09-15 02:10:04 -07:00
Linux Build Service Account
06d01bbd16 Merge "msm: kgsl: Fixing an uninitialized variable in _gpuobj_map_useraddr()" 2017-09-15 01:10:52 -07:00
Vidyullatha Kanchanapally
b0b2c85ac9 nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS
Use NL80211_CMD_UPDATE_CONNECT_PARAMS to update new ERP information,
Association IEs and the Authentication type to driver / firmware which
will be used in subsequent roamings.

CRs-Fixed: 2087764
Change-Id: Ic296b66a39b9ceb8de992a9f37112439389946a2
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
2017-09-15 00:44:27 -07:00
Linux Build Service Account
2b9593335e Merge "soc: qcom: pil: set device dma mask as 32 bit" 2017-09-14 17:08:02 -07:00
Linux Build Service Account
4f41b2e62b Merge "msm: ais: Synchronize camera open/close calls" 2017-09-14 17:08:01 -07:00
Linux Build Service Account
a1def3c899 Merge "USB: dwc3-msm: Protect enabling phy irqs with mutex" 2017-09-14 17:07:59 -07:00
Linux Build Service Account
211e3cc27d Merge "scsi: ufs: Get TX and RX FSM states for debug purpose" 2017-09-14 07:38:07 -07:00
Linux Build Service Account
abbce87082 Merge "USB: composite: Use snprintf instead of sprintf" 2017-09-14 07:38:06 -07:00
Linux Build Service Account
11d288aa74 Merge "mmc: core: Correct the checks while setting clock scaling frequencies" 2017-09-14 07:38:02 -07:00
Linux Build Service Account
14031d35b5 Merge "mmc: block: Add error handling in mmc_blk_cmdq_part_switch" 2017-09-14 07:38:01 -07:00
Linux Build Service Account
b713760afa Merge "power: qpnp-fg-gen3: Get the raw MSOC directly from FG register" 2017-09-14 07:38:00 -07:00
Kasin Li
d5628ce56c ARM: dts: msm: Override GPU speed bin 2 for MSM8996Pro
In DRM driver gpu clock don't change. override the initial gpu clock to
maximal value to ensure the performance in auto system.

Change-Id: I95515aedfb7b6e462d693cc5ae945ac21fcba7b8
Signed-off-by: Kasin Li <donglil@codeaurora.org>
2017-09-14 22:07:13 +08:00
Sankalp Sharma
062e9f67de msm: ais: Synchronize camera open/close calls
Synchronize camera_v4l2_open and camera_v4l2_close to avoid use
after free.

Change-Id: I4055f00ff30408cc0469015b3e49d877632726bf
CRs-fixed: 2048964
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2017-09-14 18:54:11 +05:30
Vijayavardhan Vennapusa
3caa870dee USB: dwc3-msm: Protect enabling phy irqs with mutex
Currently driver is enabling hsphy_irq and ssphy_irq at the end
of dwc3_msm_suspend() without any spinlock/mutex protection. But
if it happens that hsphy_irq or ssphy_irq gets fired right after
enablement of irqs, there is a chance that we might see warnings
related to unbalanced irq enable. This could happen due to flag
is not yet set to indicate phy irqs enabled in suspend(). This
might cause phy irq left enabled after resume and could cause
crash due to unclocked access in host mode. Fix the unbalance irq
enable by having mutex protection and also extend mutex protection
for dwc3_msm_suspend() and dwc3_msm_resume().

Change-Id: I8c2d26f82feb235add64305c1d0e5b686993e9e9
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-09-14 16:41:17 +05:30
Ashish Garg
93e91f73b2 msm: mdss: check the length of the external input buffer properly
dchdr->dlen is a short variable controlled by the user-provided data
(a string). If the value is negative, the condition does not pass
and loop continues, also increasing the value of "len". As a result
buffer overflow and overwrite occurs.

Change-Id: I5eacec446c9a8b5b82fc3bc6d1281303f336d4de
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-09-14 14:27:31 +05:30
Hardik Arya
15a9d5118c diag: Add NULL pointer checks for mask info
Currently there is a possibility of NULL pointer
dereference issue due to NULL pointers checks are
missing for mask info. The patch fixes the issue by
adding NULL pointer checks.

CRs-Fixed: 2108911
Change-Id: I097aeacc90c8d88034bf799ee4e398ddda5e23f1
Signed-off-by: Hardik Arya <harya@codeaurora.org>
2017-09-14 11:53:53 +05:30