Commit graph

590298 commits

Author SHA1 Message Date
Rashi Bindra
9e8ba0aa51 msm: mdss: Call regulator enable/disable for both DSI controllers
There is ref count mismatch in number of enable/disable calls for
regulators with low power mode allowed flag which is resulting in
random system crashes. This change makes sure number of enable/disable
calls are same.

Change-Id: I0c1906df8c3a83e8740412c272179d3d9c514c0e
Signed-off-by: Rashi Bindra <rbindra@codeaurora.org>
2017-05-23 18:03:23 +05:30
Varun Balaraj
4d6a4de9ef ARM: dts: msm: Enable the quat mi2s in slave mode on apq8098 mediabox
Configure quat mi2s in slave mode. Create quat mi2s node and
add the pincontrols to be used for data lines.

Change-Id: Ib0a06389941f09014c0f872d3643251859eb6a6b
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
2017-05-23 04:28:35 -07:00
Siddartha Shaik
a98696f1f5 ASoC: msm: Add IEC_61937_FMT_UPDATE event
DSP sends IEC_61937_FMT_UPDATE_EVENT event to notify
audio format change during HDMI in loopback usecase.

CRs-Fixed: 2049714
Change-Id: Ifb8565cbe7e7755b891588cd206293daa9300ce4
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-23 04:03:38 -07:00
Maya Erez
fcb6badf0b ARM: dts: msm: enable 11AD keep-radio-on-during-sleep on MSM8998
keep_radio_on_during_sleep allows reserving the 11AD connections
during suspend.
In such a case PCIe will suspend to D3hot and the device power
will not be turned off.

Change-Id: I04eed7802256c48ef9f39e7dc4e3b1a5386eb3c7
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-23 13:33:58 +03:00
Deepak Kumar
0e42ef24c9 msm: kgsl: Return mementry only if pending_free is not set
Return mementry from kgsl_sharedmem_find only if pending_free
is not set for that mementry. This is necessary to avoid use
of a mementry after it is already marked for free.

Change-Id: I23111e9c82a88ccbda2ab259074c38d91f9ff5cb
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2017-05-23 02:56:36 -07:00
Fenglin Wu
c21a36f4bd regulator: qpnp-labibb-regulator: Restart LAB/IBB after SC fault
PBS will be triggered in PMIC hardware to disable LAB/IBB regulators
when a SC(short circuit) error is happened. The regulators won't be
restart in hardware and they will be kept disabled always after that.
Restart LAB/IBB regulator in the software if SC IRQ is detected, but
stop doing this if the SC IRQ had fired frequently.

CRs-Fixed: 2002373
Change-Id: I5db2b70999d043395e070bc9d61015477455cce9
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-05-23 15:15:50 +05:30
Tanvi Aggarwal
7717905408 msm: camera: sensor: Change REFGEN for DPHY CLK/DATA to internal bias
Changing REFGEN for DPHY CLK/DATA to internal bias as suggested
by hardware team for a rarely seen line noise issue on msm8998
platform.

CRs-Fixed: 2037215
Change-Id: I37a40db8b3d2abba934c049f8ab49e0b977877f2
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
2017-05-23 00:53:36 -07:00
Meghana Ashok
7bd132d979 soc: qcom: pil: Use subsys_set_error to indicate firmware errors
Use subsys_set_error() to indicate invalid firmware image
that prevented subsystem from coming up. Userspace helper
applications will find this useful to take suitable
recovery action.

Change-Id: Ie03e4f2652692f30d32bbe80b39fb49ba95ea728
Signed-off-by: Meghana Ashok <meghanaa@codeaurora.org>
[fixed minor conflicts]
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-05-23 00:20:29 -07:00
Meghana Ashok
5b22bf499b soc: qcom: ssr: Add subsys_set_error API
Adding a new API subsys_set_error() which can indicate reason why a
subsystem failed to come up. This error reason can be useful for some
userspace helper application to take appropriate action.

Change-Id: I6df3580befd48a6b83bb8fd1099475da42fc9cf2
Signed-off-by: Meghana Ashok <meghanaa@codeaurora.org>
2017-05-23 00:19:49 -07:00
Krishna Chaitanya Devarakonda
09ab1c8a4a msm: sde: Reset the iommu_attached flag after detach
When the secure camera starts, we detach the secure CB. We don't
reset the iommu_attached flag to avoid iommu attach during the
secure session. The improper flag value is causing imbalance in
the clock voting, and is causing crashes when secure camera use
cases are run back to back with device suspend/resume.

The sde_smmu_attach function already takes care of avoiding attach
during secure session. So, we can reset the flag to avoid imbalance
in the clock voting.

Change-Id: Ie57e930031800a0edc8e4a511451d6d8a2290eec
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2017-05-22 23:49:01 -07:00
Shantanu Jain
84e36fe546 input: synaptics_dsx: remove unused synaptics touch screen driver files
Remove unused Synaptics DSX touch screen driver files as these
are not used in any of the latest targets.

Change-Id: I0cc19825691c92fee1c5b71ff7e9e7a6253f6afe
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-05-22 23:46:41 -07:00
Siddartha Shaik
19fc81edfe ASoC: msm: add q6asm api for transcode loopback support
Transcode loopback api can be used by client to configure
compress loopback.

CRs-fixed: 2049714
Change-Id: I7286fbdfa89375d517f3dad7d04e1d2a360d6f7e
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-05-22 23:03:16 -07:00
Wei Ding
855453ec47 ARM: dts: msm: change gpio mode on msm8998
Change mode of gpio32 to pull up mode to fix
laser sensor no IRQ issue when laser sensor is
active.

Change-Id: I4034ba9e38793174c6c5340b2004ca948512a492
Signed-off-by: Wei Ding <weiding@codeaurora.org>
2017-05-23 13:27:59 +08:00
Ankit Sharma
6a701d05a1 leds: leds-qpnp: Fix uninitialized variable use
Fix use of uninitialized variable.

CRs-Fixed: 2050786
Change-Id: I3e0ac770df89347b878c9fe6eeaf5e4d8d53537c
Signed-off-by: Ankit Sharma <ansharma@codeaurora.org>
2017-05-23 10:44:36 +05:30
Wenbin Wang
bd15fce5df msm: kgsl: Don't delete uninitialized preemption timer
If we delete uninitialized timer on CONFIG_DEBUG_OBJECTS
disabled build del_timer_sync() will block for ever. For
all A3xx targets preemption timer is not initialized, but
dispatcher fault handler is trying to delete the
uninitialized preemption timer. Fix this issue by adding
a preemption check before we delete it.

CRs-Fixed: 2023690
Change-Id: I2c51a0b2286b82bf2eb5ee68d923dd9585f07f00
Signed-off-by: Wenbin Wang <wwenbin@codeaurora.org>
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
2017-05-22 21:57:50 -07:00
Subbaraman Narayanamurthy
3d1963e351 power: qpnp-fg-gen3: update default empty voltage to 2.85 V
Based on the hardware recommendation, update the default empty
voltage from 2.8 V to 2.85 V. This is to prevent undervolting
in low temperatures (e.g. -20 C) when battery voltage drops below
2.8 V but the battery SOC may not reach 0% as the charger is
configured to issue GP_FAULT2 when battery voltage goes below
2.8 V. This helps in shutting down graciously.

Change-Id: Ifc68b825541c09d985d890ee7200ff8e0af2ba0f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-05-22 20:42:09 -07:00
Hans Verkuil
7b51cde1bb [media] cec: add HDMI CEC framework (adapter)
The added HDMI CEC framework provides a generic kernel interface for
HDMI CEC devices.

Note that the CEC framework is added to staging/media and that the
cec.h and cec-funcs.h headers are not exported yet. While the kABI
is mature, I would prefer to allow the uABI some more time before
it is mainlined in case it needs more tweaks.

This adds the cec-adap.c source that deals with the low-level CEC
messaging and logical address handling.

Change-Id: I0c9dfee5d78ef122a307946182f34ccf7e40d3fc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[k.debski@samsung.com: change kthread handling when setting logical address]
[k.debski@samsung.com: code cleanup and fixes]
[k.debski@samsung.com: add possibility to clear assigned logical addresses]
Signed-off-by: Kamil Debski <kamil@wypas.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 9881fe0ca187c213eb3a6a8e78e45ad4d1cec171
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-22 18:54:02 -07:00
Hans Verkuil
6e0af539af [media] cec: add HDMI CEC framework (core)
The added HDMI CEC framework provides a generic kernel interface for
HDMI CEC devices.

Note that the CEC framework is added to staging/media and that the
cec.h and cec-funcs.h headers are not exported yet. While the kABI
is mature, I would prefer to allow the uABI some more time before
it is mainlined in case it needs more tweaks.

This adds the cec-core.c, media/cec.h and cec-priv.h sources.

Change-Id: Iccc9ce1e7c1c04aa7693c3ba73027d92b50b3bbc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[k.debski@samsung.com: Merged CEC Updates commit by Hans Verkuil]
[k.debski@samsung.com: Merged Update author commit by Hans Verkuil]
[k.debski@samsung.com: code cleanup and fixes]
[k.debski@samsung.com: add missing CEC commands to match spec]
[k.debski@samsung.com: add RC framework support]
[k.debski@samsung.com: move and edit documentation]
[k.debski@samsung.com: add vendor id reporting]
[k.debski@samsung.com: reorder of API structs and add reserved fields]
[k.debski@samsung.com: fix handling of events and fix 32/64bit timespec problem]
[k.debski@samsung.com: add sequence number handling]
[k.debski@samsung.com: add passthrough mode]
[k.debski@samsung.com: fix CEC defines, add missing CEC 2.0 commands]
Signed-off-by: Kamil Debski <kamil@wypas.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: a56960e8b406d36b612776c79134b954adc2ca18
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-22 18:52:40 -07:00
Hans Verkuil
6d1334fc98 [media] cec-funcs.h: static inlines to pack/unpack CEC messages
This public header contains static inlines to pack and unpack CEC
messages. It is for use in both the kernel and in userspace.

Since the CEC framework will initially be in staging this header is
not yet in include/uapi. Once the framework is moved out of staging
this header should be moved to uapi at the same time.

Change-Id: I3a6eaf417787e9bfd6e8dc06bedbee03f9c3552a
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 50f7d5a65e5a31e92a9d46663770cd9509f939a2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-22 18:52:13 -07:00
Hans Verkuil
5e0b2bbee9 [media] cec.h: add cec header
This header contains the CEC public API. Since the CEC framework will
initially be part of staging this header is kept out of include/uapi for
the time being until the CEC framework will be moved out of staging.

Change-Id: I8ad69b57531e65fc9919f92b473280dd821f1272
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 3132583e5bd7cb56dffb2c04128ec4db12c32027
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-22 18:48:58 -07:00
Hans Verkuil
973fd92d59 [media] cec-edid: add module for EDID CEC helper functions
The cec-edid module contains helper functions to find and manipulate
the CEC physical address inside an EDID. Even if the CEC support itself
is disabled, drivers will still need these functions. Which is the
reason this is module is separate from the upcoming CEC framework.

Change-Id: Ia20fb7ef771c0455d369029738c509d59f5e4adc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 29fb44a58ac12bffe4c225f95afdc22364db070e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-05-22 18:48:38 -07:00
Veerabhadrarao Badiganti
37b8f42715 mmc: core: retune after un-gating the clocks
We have seen that host controller's clock tuning circuit may go out of sync
if controller clocks are gated. To workaround this issue, we are now
triggering the retuning of tuning circuit once clocks are ungated.

Change-Id: Id2db1cb4829fbb1af4f8c4e463d1e16c0f45e590
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2017-05-22 18:08:13 -07:00
Sudarshan Rajagopalan
3b3b2f468c iommu/arm-smmu: Optimized IOMMUS property parsing
Previously, parsing of the iommus property nodes was done at every probe
call, making it time-consuming. This change makes the property parsing
outside the probe call at arm_smmu_init and stores the parsing info in a
data structure and later the probe calls can utilize this data structure
to perform the parsing in a time-efficient manner.

Change-Id: Ifd5558b94c134158c5cf15ca6b9e325ba45c55ba
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2017-05-22 16:13:38 -07:00
Xu Yang
cf1e29d56a msm: mdss: remove wait for vsync in display commit
Remove wait for vsync in display commit if both PCC and DDIC
need to update for external backlight feature.

Change-Id: I57aeb48acba24e0ca3fff21b1117e48fe452028b
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
2017-05-22 06:04:34 -07:00
Hamad Kadmany
b7f36ff2fc msm_11ad: fix device-tree property name
Change keep_radio_on_during_sleep DT property to follow
the naming convention.

Change-Id: I6450cfdfe38a4cf5b1b1ccb40b5506a34aeb076a
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-05-22 13:33:54 +03:00
Sai Krishna Juturi
aa9b48f2b4 usb : dwc3: Initialize kernel stack variables properly
If kernel stack variables are not initialized properly,
there  is a chance of kernel information disclosure.
So, initialize kernel stack variables with null characters.

CRs-fixed: 2042592
Change-Id: I213c0e5c7f67824c2cecace276ff2f8f81599d51
Signed-off-by: Sai Krishna Juturi <jsaikrishna@codeaurora.org>
2017-05-22 02:17:42 -07:00
Cong Tang
5499b6254f ASoc: msm: Add dai link MultiMedia20 for custom card
Add dai link MultiMedia20 for custom card to support SEC_MI2S_TX
ASM Loopback to TDM port.

CRs-Fixed: 2045651
Change-Id: Iff03923cdf843a1873cf464cd6a66feab2c306fb
Signed-off-by: Cong Tang <congt@codeaurora.org>
2017-05-22 01:54:10 -07:00
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
Yujun Zhang
b51f88c62a ARM: dts: msm: enable HDMI & DSI displays on 8996 auto CDP platform
MSM8996 Auto CDP platform uses DSI-HDMI bridge chip. Add device
nodes to enable both native HDMI and one DSI-HDMI port for this
platform.

CRs-Fixed: 2043334
Change-Id: I30f43dd9e6ce1646a49c63522223d045e532ee24
Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
2017-05-22 01:48:17 -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
Jaiju Yesudasan
33c9c8a03e ARM: dts: msm : Add neutrino DDR bandwidth voting on 8996 auto platforms
Added voting parameters which would be used by neutrino
driver for requesting higher DDR bandwidth to achieve better
performance.

CRs-Fixed: 2001978
Change-Id: Ia894db21328aeb08a9c7036c4f75badb0e6e60d8
Signed-off-by: Jaiju Yesudasan <cjaijuy@codeaurora.org>
2017-05-21 22:24:47 -07:00
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
Siena Richard
fc6defdbbd ASoC: msm: qdsp6v2: extend validation of virtual address
Validate a buffer virtual address is fully within the region for an
extended edge case.

CRs-Fixed: 2049911
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Change-Id: I4c56fdd42336d00a2294a8b7cc17c74606e56be2
2017-05-19 16:19:34 -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