Commit graph

594013 commits

Author SHA1 Message Date
Linux Build Service Account
1c078745a0 Merge "Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"" 2017-09-22 17:26:53 -07:00
Linux Build Service Account
61eb33bc00 Merge "serial: msm_serial_hs: Keep Rx and Tx path clean while going inactive" 2017-09-22 17:26:51 -07:00
Linux Build Service Account
21be58daa3 Merge "ARM: dts: msm: reserve memory for early-audio on msm8996" 2017-09-22 17:26:50 -07:00
Linux Build Service Account
2a4db076c7 Merge "arm/arm64: Define backport flag for save_stack_trace_tsk()" 2017-09-22 17:26:50 -07:00
Linux Build Service Account
374db4f744 Merge "drm/msm: Add save/restore functions for perfcounters" 2017-09-22 17:26:46 -07:00
Linux Build Service Account
bf0fbeead5 Merge "power: qpnp-fg-gen3: synchronize ESR extraction control configuration" 2017-09-22 17:26:45 -07:00
Linux Build Service Account
751d87898b Merge "vidc: Enable skip output buffers for video encoder" 2017-09-22 17:26:44 -07:00
Linux Build Service Account
6d73a0bbe1 Merge "udpv6: Fix the checksum computation when HW checksum does not apply" 2017-09-22 17:26:43 -07:00
Linux Build Service Account
3e07e9cdb5 Merge "ASoC: msm: qdsp6v2: change to no-wait command for RTIC event" 2017-09-22 17:26:42 -07:00
Sujeev Dias
554cfbe86c mhi: core: move mhi_states_transition_str out of stack
To prevent un-initialized address returning from MHI
state transition lookup table, move mhi_states_transition_str
array out of stack

CRs-Fixed: 2111049
Change-Id: Ife5f907a711cc0c615161f2b2a677275d6773686
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-09-22 14:58:55 -07:00
Yue Ma
7f6f914d71 cnss2: Set debug state when using debugfs dev_boot node
When using debugfs dev_boot node to trigger firmware download,
debug state should be set as well so that subsequence shutdown
and powerup can be handled correctly.

Change-Id: Id85d28dca104f8938d78655d682a0a7d1491c04c
CRs-fixed: 2059087
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-09-22 12:57:50 -07:00
Linux Build Service Account
18dd1a7105 Merge "msm: camera: sensor: Add OIS read functionality" 2017-09-22 09:13:45 -07:00
Linux Build Service Account
42326e9777 Merge "ion: fix the return value of shrinkers" 2017-09-22 09:13:44 -07:00
Linux Build Service Account
cfe37b1eb4 Merge "arm64: stacktrace: avoid listing stacktrace functions in stacktrace" 2017-09-22 09:13:42 -07:00
Linux Build Service Account
b92301abd0 Merge "msm: mdss: Fix potential race condition in rotator" 2017-09-22 09:13:41 -07:00
Linux Build Service Account
ba64f1b64f Merge "ASoC: msm: qdsp6v2: Fix dangling pointer access" 2017-09-22 09:13:40 -07:00
Archana Obannagari
4533fa3252 msm: kgsl: Fix size check issue in _read_fw2_block_header()
During firmware data read, it may leads to cross the max
range. Add a check to validate data size with in the max
range.

Change-Id: I12b3c1761214a7d2af2c45ad73bf61954c8398b6
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
2017-09-22 19:01:12 +05:30
Vikram Mulukutla
2bbf3a762a Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"
This reverts commit c5616f2f874faa20b59b116177b99bf3948586df.

If we re-init the per-cpu boostgroup spinlock every time that
we add a new boosted cgroup, we can easily wipe out (reinit)
a spinlock struct while in a critical section. We should only
be setting up the per-cpu boostgroup data, and the spin_lock
initialization need only happen once - which we're already
doing in a postcore_initcall.

For example:

     -------- CPU 0 --------   | -------- CPU1 --------
cgroupX boost group added      |
schedtune_enqueue_task         |
  acquires(bg->lock)           | cgroupY boost group added
                               |  for_each_cpu()
                               |    raw_spin_lock_init(bg->lock)
  releases(bg->lock)           |
      BUG (already unlocked)   |
			       |

This results in the following BUG from the debug spinlock code:
	BUG: spinlock already unlocked on CPU#5, rcuop/6/68

CRs-fixed: 2113062
Change-Id: I1cd780d9ba5801cf99bfe46504b18a88e45f17a8
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2017-09-22 04:24:28 -07:00
Ch Ganesh Kumar
05f00d16b6 fb/msm: add support for HDR playback control sequence
HDR playback needs metadata to be sent to the sink
while the playback is ongoing and needs a proper
teardown sequence when the playback has ended with respect
to the infoframe being sent to the sink.

This needs a state machine to synchronize start/stop of
the playback with sending the right metadata along with
resetting the infoframe HDMI registers.

Add support for this HDR playback control state machine.

Change-Id: I58ff03bc8db99febd17e0a0853acc74668892ea8
Signed-off-by: Ch Ganesh Kumar <chganesh@codeaurora.org>
2017-09-22 16:44:18 +05:30
Guchun Chen
8c9aaddd85 ARM: dts: msm: disable secondary adv7533 on msm8996 lite board
Msm8996 adp lite board has two displays, native HDMI display and one
DSI-HDMI display through ADV7533 bridge chip. So only one ADV7533
instance is needed here. And at the meanwhile, total sde_kms components
need to match the configuration, otherwise, display driver probe will be
skipped due to this mismatch.

Change-Id: If596a64a9e47416e0810039914a958cae61c7e3e
CRs-Fixed: 2113147
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2017-09-22 17:53:56 +08:00
Xu Han
414a690797 msm: camera: sensor: Add OIS read functionality
Adding capability to read OIS data, provided in the driver
register settings.

CRs-Fixed: 2114654
Change-Id: Ie10b55f597a4daa29267c6d4333ce9d9c7702d63
Signed-off-by: Xu Han <hanxu@codeaurora.org>
2017-09-21 23:35:03 -07:00
Shiju Mathew
8397353755 vidc: Enable skip output buffers for video encoder
Added feature to configure video h/w to send empty output buffer
for skipped frame due to rate control.

Change-Id: Id47344c3bae216fec6384ff205bcb658ec27cb06
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
2017-09-21 20:45:02 -07:00
Cong Tang
516bd75a2a ASoc: msm: Support primary TDM interface
Support primary TDM interface dai link and export kcontrols to update
primary TDM interface slot configuration.

CRs-fixed: 2095930
Change-Id: I693b99f295f6476c96d681e10459842c0011467f
Signed-off-by: Cong Tang <congt@codeaurora.org>
2017-09-21 20:10:27 -07:00
Yue Ma
08b5a0333b cnss2: Return proper error code for nonsupported devices
Platform driver only forces FW assert for supported devices.
Return proper error code for nonsupported devices so that WLAN
host driver can handle properly.

Change-Id: Iaf88f64564b14425404404db6a7789a7913db74f
CRs-fixed: 2059087
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-09-21 14:13:40 -07:00
Naveen Rawat
f396bc3578 msm: Add CLD80211_ATTR_META_DATA vendor attribute
Add CLD80211_ATTR_META_DATA vendor attribute, which will be used by
userspace RTT application to send meta data to wlan driver allowing
it to peek into RTT request message without opening up complete
definition of RTT message.

Change-Id: If2f8253b59c6860fbaecab05f1b76f11da1ddb6f
CRs-Fixed: 2114181
Signed-off-by: Naveen Rawat <naveenrawat@codeaurora.org>
2017-09-21 11:33:14 -07:00
Yue Ma
72281a8854 defconfig: msm-auto: Enable CNSS2 platform driver
Use CNSS2 platform driver instead of CNSS in AUTO platforms.

Change-Id: I0b5df067d05ceafd759b3cefab1b506a659af50e
CRs-fixed: 2071634
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-09-21 10:00:45 -07:00
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