Commit graph

593877 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Arun KS
972d901c7c soc: qcom: pil: set device dma mask as 32 bit
APPS interact with MPSS through 32 bit register interface.
Set dma mask for 32 bit so that mba and mdt memory are allocated
from 32 bit physical address range.

Change-Id: I623f00097d464b1bdd8f609e2d6c9a126f4bea4d
Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-09-13 22:05:08 -07:00