Commit graph

590157 commits

Author SHA1 Message Date
Cong Tang
7ac4fb357f ASoc: msm: Support SEC_MI2S_TX Port ASM Loopback
Add dai link MultiMedia20 in reference machine driver and
kcontrols for sample rate of SEC_MI2S_TX port.

CRs-Fixed: 2045651
Change-Id: I7c6bc45b2d71403ed19ee0993a85c82649acda7d
Signed-off-by: Cong Tang <congt@codeaurora.org>
2017-05-22 01:53:33 -07:00
Sandeep Panda
c9a6f09f10 msm: mdss: remove client from device list if failed to register
If there is any failure while registering a DBA client with MDSS
driver, then remove the client from device client list first and
then free the client. Otherwise driver might crash when
traversing the device client list in later stage, because of an
uninitialized entry in the list.

Change-Id: I60666f4c3dea5c7ea7b7c77bcb14b080ee25b54d
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-05-22 12:08:31 +05:30
Cong Tang
6adb3d5ff2 ASoc: msm: support SEC_MI2S_TX port routing to MultiMedia20
Add new frontend MultiMedia20 and update routing to support ASM
Loopback from SEC_MI2S_TX port to TDM port.

CRs-Fixed: 2045651
Change-Id: Ief9ebfda4469d0761ff96bf673b9d593a9576f44
Signed-off-by: Cong Tang <congt@codeaurora.org>
2017-05-22 13:18:11 +08:00
Terence Ho
f40088eb36 msm: ais: Security fixes for ispif and cpp
Check the user parameters in ispif to prevent buffer overflow.
Fix out-of-bounds frame or command buffer access in cpp.

CRs-fixed: 1097390 2002207
Change-Id: Ifdaf223d1b1c418596c2fb43d970dad728abd4a3
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
Signed-off-by: Andy Sun <bins@codeaurora.org>
2017-05-22 11:29:54 +08:00
Satish Kodishala
e725fa7716 btfm: Don't program multi channel registers in wcn3990 for SCO
For SCO use cases, we should not program multi chanel
registers. Programming this leading to silence randomly
in SCO Rx/Tx.

CRs-Fixed: 2048423
Change-Id: I5e41591fb81b5bd3cf9358819c0a62a5cfe60e13
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
2017-05-21 20:25:22 -07:00
Amir Samuelov
ab15752d1c spcom: check error from ion_import_dma_buf()
Check ion_import_dma_buf() returned handle is not NULL or error code,
by using IS_ERR_OR_NULL() macro.
Check channel name is null terminated on create channel command.
Check minimal command size from user space.
Fix spelling.

Change-Id: I81631c1844982952498eaf2bff84ff90578720b2
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-05-21 08:30:48 -07:00
Amir Samuelov
33af82c1f5 spcom: silent error messages until spss link is up
After spss reset (a.k.a SSR) the spdaemon tries to open spcom char dev.
Avoid flooding the kernel log with error messages until the spss link
is up.

Change-Id: I7abd37f50fa4c172e07c8551c287b6ccf0511a44
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-05-21 05:13:16 -07:00
Amir Samuelov
4f7c1784fa spcom: increment channel reference count after successful glink_open()
spcom_open() should increment the ref count only after successful glink
open the channel.
Otherwise, the following attempts to open the channel will fail.
glink_open() failure was noticed after SP reset (SSR), when attempting
to open the channel before the link between SP and HLOS is up.

Change-Id: I8be28ce810f54cc3fa95d14c7244921acf7edaa7
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-05-20 23:44:11 -07:00
Linux Build Service Account
60be71604a Merge "qpnp-smb2: fix FV and FCC reporting" 2017-05-20 01:37:19 -07:00
Linux Build Service Account
474a2a48ad Merge "msm: vidc: Cancel userptr validation during secure decode" 2017-05-20 01:37:18 -07:00
Linux Build Service Account
9ec1caea12 Merge "ASoC: msm: qdspv2: Rename HDMI drift mixer controls" 2017-05-20 01:37:17 -07:00
Linux Build Service Account
2bb69ccc76 Merge "ion: fix logical-not comparison warning" 2017-05-20 01:37:16 -07:00
Linux Build Service Account
bb49ae3282 Merge "coresight-tmc: Adds lock to avoid race condition" 2017-05-20 01:37:15 -07:00
Linux Build Service Account
df39bd34da Merge "msm: wlan: Update regulatory database" 2017-05-20 01:37:14 -07:00
Linux Build Service Account
d4f03a30ac Merge "msm_11ad: clear affinity hint upon low bus request" 2017-05-20 01:37:13 -07:00
Linux Build Service Account
49ccf3da5b Merge "ARM: dts: msm: Add support for multiple neutrino on msm8996" 2017-05-20 01:37:12 -07:00
Linux Build Service Account
bd4d7e0de5 Merge "drm/msm: Don't allow zero sized buffer objects" 2017-05-20 01:37:11 -07:00
Linux Build Service Account
e650018e4a Merge "msm: camera: sensor: Validate sensor related name length" 2017-05-20 01:37:10 -07:00
Linux Build Service Account
63a4b33cb4 Merge "msm: camera: sensor: Validate sensor name during probe" 2017-05-20 01:37:09 -07:00
Abhijeet Dharmapurikar
db1755be6c qpnp-smb2: fix FV and FCC reporting
Currently the read of battery's voltage_max property (FV) and battery's
current_max property (FCC) returns the value of DEFAULT_VOTER voter.

But such a voter doesn't exist on battery's voltage_max property. Fix it
by returning the value voted by BATT_PROFILE_VOTER.

Change-Id: I2dac98f2ce9a423d5045788dbe120591f10c5a9e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-19 14:11:30 -07:00
Abhijeet Dharmapurikar
b186b398d9 smb-lib: do not disable parallel based only on main's settled current
Currently main charger ends up voting to disable parallel(USBIN_I_VOTER)
if the settled current is less than 1.4Amps. It could be that the
parallel path is drawing some current and the draw is higher than
1.4Amps.

Move this disabling to battery, where the parallel charger's input current
is taken in to consideration.

Also while voting to disable, make sure that the main's input is limited.
If there is more room for ICL to increase that means more power could be
drawn from the charger and so we must keep the parallel charging enabled.
If the ICL ceiling itself if 1.4Amps then disable parallel charging,
because even if ICL has room to increase it wont cross 1.4Amps.

The main's input limited state is set while AICL steps up - this
ensures that we keep parallel disabled while AICL is running and settled
is less than 1.4Amps.

When the charger is removed, the main's input limited status is unset,
however we want to keep the parallel charger disabled. In such situations
the main's settled current is 0mA - use this to vote for disabling
parallel charging.

For any ICL change vote request:
Disable parallel using USBIN_I_VOTER if requested current is less than
1.4Amps and to un-vote (i.e. when ICL vote is higher than 1.4Amps) rely
on event from AICL done or status_change delayed work.

Note that USBIN_I_VOTER is effective only for non-QC chargers. For QC
chargers USBIN_V_VOTER continues to keep charging enabled since parallel
need not be disabled is a lower current is requested with a QC charger.

Change-Id: I61d7cd161a87de2904470b2d870058a0fe199116
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-19 14:11:08 -07:00
Ashwanth Goli
d4ee8914bf net: rmnet_data: Unset logical end points in bridge mode
We clean up the logical end points only for the un-registering device
in bridge mode. However, the other physical end point's local end
point still points to the the un-registered device.

This may lead up to a crash if one of the physical devices in bridge
mode is un-registered. Fix this by unsetting the local endpoint.

It is still possible that packets in a different context across cores
might try to access this data. This usually manifests as packets
requesting a very large headroom. Handle this by dropping these stale
skb's.

CRs-Fixed: 1098513
Change-Id: I1ba4d877a6ed3eca66946fe056938f0927bcd9a5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
2017-05-19 21:08:49 +05:30
Vijay Viswanath
7b46835e9f mmc: block: Disable clock scaling during shutdown
During shutdown of sdhc drivers, power off notification (PON) is sent
to eMMC device. But it doesn't prevent the clock scaling framework
from kicking in and sending commands to card after PON is sent. So
exit clock scaling framework of sdhc before PON is sent.

Change-Id: Ibfe097732042458965db529f235a7fd28cfabaab
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2017-05-19 16:31:49 +05:30
Vijay Viswanath
688129aafb mmc: core: Avoid returning error when clok scaling devfreq is removed
When resume clock scaling is not possible because there is no devfreq
framework, it is not an error. So avoid printing an error and return
success. This is necessary in certain scenarios like during shutdown
where we unregister the clock scaling devfreq.

Change-Id: Ib37eabdcdbbb58a336ee87220e5758bb559625af
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2017-05-19 16:31:28 +05:30
Vijayavardhan Vennapusa
3677992d0f ARM: dts: msm: update tuning parameters for QMP PHY for SDM660
Update required tuning PHY parameters for QMP PHY for SDM660 as per
hardware programming guide.

Change-Id: I5182bf345622af299712c91feec7cc090afe41d7
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-19 15:31:32 +05:30
Vijayavardhan Vennapusa
5980a4dca5 ARM: dts: msm: Add USB2 device node for SDM660
Add USB2 device node for SDM660 for using secondary USB2 port
in host only mode.

Change-Id: I8ff06411902bcafbb5b3f429634760d4c44a7b20
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-19 12:55:14 +05:30
Ashish Garg
44aa99c220 msm: mdss: add recovery if TE is not coming from the panel
Enable TE irq for the panel when there is a pingpong timeout.
Wait for TE to come for five vsync cycles before starting the
recovery for panel dead. If the TE comes from the panel during
the wait, call panic for pingpong timeout.

Change-Id: I88d06562e3e19880bb327b5f347ed79057f0e8c3
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2017-05-18 23:46:32 -07:00
Tanvi Aggarwal
e1385281e9 ARM: dts: msm: Add iris support on sdm630
Add IRIS camera support on sdm630 mtp platform.
This is required for secure camera feature.

Change-Id: Ic18eb896e7e2099debcf755dca4278c25295f8b9
CRs-Fixed: 2042077
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
2017-05-18 23:21:12 -07:00
Maulik Shah
d4d2b1a9c3 soc: qcom: Fix failure prints in rpm stats and log
Correct failure prints in rpm stats and rpm log drivers.

Change-Id: I4a2d4a8cf4df4c9c1d750a65beb7454041fc06c2
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2017-05-19 09:31:30 +05:30
Ben Romberger
8f1e5633e3 ASoC: msm: qdsp6v2: Add IEC61937 compressed HDMI pass-though
Add support for IEC61937 which is an audio packaging
standard used for compressed HDMI pass-through. Any
audio format can be sent through HDMI pass-through
formatted as IEC61937.

Change-Id: I09821add306e2aeae6530cecbac189471a55e589
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2017-05-18 18:11:32 -07:00
Prabhakar Reddy Krishnappa
c3f5cca88f msm: vidc: Cancel userptr validation during secure decode
Secure decode doesn't need userptr and uses ion fd instead. We were
conducting userptr validation regardless of the decode mode (secure/
unsecure). This forced user to populate userptr with a dummy value
during QBUF in secure mode decode on both output and capture ports
to avoid a userptr validation fail.

CRs-Fixed: 2049213
Change-Id: I0060efb52792201a2634072f648a537ebb02d17c
Signed-off-by: Prabhakar Reddy Krishnappa <prkrishn@codeaurora.org>
2017-05-18 17:43:17 -07:00
Yan He
327affb35f msm: pcie: add IOMMU_DEVICE for MMIO mapping
PCIe bus driver maps registers to IOVA. So add IOMMU_DEVICE flag for
the mapping here.

Change-Id: Idfeb43ac0f93c68082f308d0db744a65f0c65f41
Signed-off-by: Yan He <yanhe@codeaurora.org>
2017-05-18 17:23:15 -07:00
Ramprasad Katkam
8f0c7ae73c ASoC: APR: Fix missing APR deregister from asm
APR deregister is to be called for two ports from both
q6asm_callback(during RESET) and q6asm_audio_client_free.
In race condition between the two, APR deregister is called
only for one port. The mismatch in apr register-deregister
count causes apr not to reset service after ssr, causing
APR communication failure.

Change-Id: Ibd0528215bf2fb986eda03ae0d683b2af31358fe
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2017-05-18 21:59:39 +05:30
Vijayavardhan Vennapusa
c20c74d49c ARM: dts: msm: Remove TCSR_QUSB2_PHY_CLAMP_DIG_N_1P8 for SDM660
Remove TCSR_QUSB2_PHY_CLAMP_DIG_N_1P8 resource entry for SDM660
which is not required to set now during disconnect as writing to this
register causes USB3.0 port and USB2.0 ports working independently.

Change-Id: Ifb91c4e493ca1ecd31ef649c9e85acd809b9eec6
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 18:34:47 +05:30
Vijayavardhan Vennapusa
3962558023 usb-phy-qusb: powerdown PHY during disconnect to avoid leakage
Currently PHY driver is using TCSR_QUSB2PHY_CLAMP_DIG_N_1P8 register
to avoid leakage issue seen during disconnect. But this could fail
USB ports working independently if this register is used as that
could clamp both inputs going to two QUSB2 PHY on platforms having
USB2 port. To fix this, it is recommended to powerdown QUSB2 PHY
by setting powerdown bit in  QUSB2PHY_PORT_POWER_DOWN register
during disconnect and removing writing 0x0 to TCSR register. Removed
updating TCSR register from dts file as separate change.

Change-Id: I6b0915faa346e5d88310106eeddb3c7a1bfb1d08
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 18:33:56 +05:30
Vijayavardhan Vennapusa
74fd4e30fc USB:dwc3-msm: Don't schedule work if pm_qos_latency is zero
Currently driver is scheduling pm_qos_work again even though
pm_qos_latency is not passed from dts file. Add a check for
pm_qos_latency and don't schedule work if pm_qos_latency value
is zero. Also remove use of static variable for last_irq_count and
add the variable for the same in dwc3 structure for the case where
multi DWC3 usages are used.

Change-Id: I55e1e3a7d48fbea0a421802aae176ac57a48869f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 18:31:53 +05:30
Mukesh Ojha
81f3b9aab8 coresight-tmc: Adds lock to avoid race condition
There can be a case of race in the call to tmc_etr_bam_disable(). The call
from usb_notifier() to tmc_etr_bam_disable() is within a lock
'drvdata->mem_lock' but the call from tmc_disable is not under any lock
which can lead to race.

This patch adds the missing lock.

CRs-Fixed: 2047196
Change-Id: I3986b498ae8e2b2ddfe8f5b3315fdefab197d11c
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2017-05-18 17:52:26 +05:30
Tharun Kumar Merugu
6e853a66c3 SDM660: ADSPRPC: Fix for NULL pointer dereference
Fixing NULL pointer dereference in fastrpc_device_ioctl

Change-Id: I240e6eae69f9ab4831352a8bf160d5f0e8a98b1b
Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-05-18 04:33:32 -07:00
Utkarsh Saxena
2931599ee9 msm: ipa: Fix post init in workqueue context
ipa post init is accessed from user space
context from ops structure.

While user space program triggered post init
there could be a chance, where the
user space context may get killed at any time,
due to which the memory allocation in post init
gets failed and in turn which clean up the
IPA driver.

Because the memory allocation of the
sigkill pending process will fail.

Make changes in ops structure write func-pointer to
queue a work instead of directly invoking post init.

So that ipa post init will execute in workqueue context.

Change-Id: Ia11b3a868d960111422c357bcc9924ef7b220e67
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-05-18 16:09:00 +05:30
Arun KS
616f419e9f ARM: dts: msm: Add support for MSM8996pro UFS based board
Add board-id for UFS board which has a different board sub type.

Change-Id: I34963569b793a017f2e67298eb615b1d59a3c9ba
Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-05-18 03:09:15 -07:00
Narender Ankam
1b6484cec3 ARM: dts: msm: update AUX channel configurations for SDM630
Update Display Port's AUX channel configuration settings for SDM630.

Change-Id: I9712d24251a2d700f79de13cdeda76b7c980b721
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2017-05-18 15:22:22 +05:30
Vijayavardhan Vennapusa
0355a024aa policy_engine: Don't allow MODE change if no active connection
Currently driver is allowing MODE change even if there is no active
cable connection and is waiting for to complete.  For this MODE
change to complete,  driver first sets power role to none to do
type C disconnect and then switch to new mode.  Here disconnect won't
come as there is no active cable connection. Fix this issue by returning
error in case there is no active connection.

Change-Id: Ie423bd8b61ab7b2624f98c84e8d8e75b6c853b00
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-05-18 02:25:22 -07:00
Benjamin Chan
a2931ccf96 msm: mdss: Correct MDSS display wakeup time calculation
With DSC enabled in the panel interface, the horizontal pixel count is
smaller than the panel width due to the compression. Correcting the
time_of_line and total_line calculation by calling the proper macro.

CRs-Fixed: 2048339
Change-Id: I36c1b9d30d5a440dfef4b4638f4f3ebf807782c8
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-05-17 13:42:04 -04:00
Sudarshan Rajagopalan
11926cbd03 ion: fix logical-not comparison warning
Fixes compiler warning when a logical-not on a variable
is applied while comparing it with value zero.

Change-Id: I92aa16bd0d57a0d59ecd26eef1ac92220332998d
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-05-17 05:48:18 -07:00
Dedy Lansky
9e94fb237b msm_11ad: clear affinity hint upon low bus request
When driver calls ops_bus_request with high bandwidth requirement,
affinity of wil6210 interrupt is set to first big core. However this
setting is not cleared when driver lowers bandwidth requirement.
This causes WARN_ON_ONCE(desc->affinity_hint) upon wil6210 rmmod.

Fix this by clearing affinity hint upon low bandwidth request.

Change-Id: I87b6b7ec9b369b84a9d3724d92a821a1302d1f83
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
2017-05-17 03:09:10 -07:00
Manish Dewangan
08d60a044e ASoC: msm: qdspv2: Rename HDMI drift mixer controls
Update HDMI drift mixer controls name to be aligned with
drift mixer controls for other devices(speaker, BT).

CRs-Fixed: 2036899
Change-Id: If7aa29ea9511b65de71ff12143a1c34d977de2b8
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2017-05-17 02:28:15 -07:00
Sayali Lokhande
37228adc27 ARM: dts: msm: Update ref-clk node for sdm660
As a part of 'commit 64db44d65e ("ARM: dts: msm:
move ref-clk from phy to ufs node in sdm660")',
ref-clk node is moved from phy to ufs and ref-clk
related property should be prefixed with "qcom,".
This change updates the same for sdm660 mtp so as
to turn-off the ref-clk supply when link is off.

Change-Id: Iee0fcaaaa34108c35d836d6136f8c1a0964f0fa4
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2017-05-17 12:12:31 +05:30
Mohan Pallaka
9f117985b6 input: synaptics_dsx: fix mutex init
Initialize mutex before using in irq handler.

CRs-fixed: 2047720
Change-Id: I5ebfbc22f2a64dde239fcbb13eb26be50543b484
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2017-05-16 19:57:28 -07:00
Linux Build Service Account
5404e35069 Merge "msm: ADSPRPC: Copy process name buffer to kernel space" 2017-05-16 16:08:16 -07:00
Linux Build Service Account
d573c819ea Merge "usb: gadget: f_cdev: Fix NULL pointer dereference in cser_free_inst" 2017-05-16 16:08:15 -07:00