Commit graph

596040 commits

Author SHA1 Message Date
Subbaraman Narayanamurthy
2e21ea63b3 leds: qpnp-flash-v2: Update IRES for active LEDs
Currently, whenever the switch LED device is triggered, IRES is
updated based on the LEDs belonging to that switch LED device.
However, this can overwrite IRES configuration if flash and torch
LED devices have different IRES since they share the same id.

Fix this by checking the active LED status which will be updated
based on the brightness level set so that IRES will be updated
for the correct LED (flash/torch) device.

CRs-Fixed: 2173127
Change-Id: Ic3b5db2f56758ccd68fd80139aeb22f31723130e
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-01-18 18:34:02 -08:00
Linux Build Service Account
6b202df713 Merge "mmc: sdhci: Remove some redundant stack information" 2018-01-18 09:36:24 -08:00
Linux Build Service Account
f5e3d60a29 Merge "dwc3-msm: Introduce sysfs param to indicate usb compliance mode" 2018-01-18 09:36:23 -08:00
Linux Build Service Account
ba930bb521 Merge "defconfig: msm: sdm660: disable memory cgroups" 2018-01-18 09:36:22 -08:00
Linux Build Service Account
f3dcbfee1c Merge "usb: pd: avoid out-of-bounds access when reading PDOs" 2018-01-18 09:36:20 -08:00
Linux Build Service Account
10d5a831db Merge "usb: pd: ensure source hard reset is handled timely" 2018-01-18 09:36:19 -08:00
Linux Build Service Account
13c7e628e7 Merge "msm: ipa: Fix to unsigned integer underflow" 2018-01-18 09:36:17 -08:00
Linux Build Service Account
1a98475dd4 Merge "msm: ais: sensor: actuator: avoid accessing out of bound memory" 2018-01-18 00:05:38 -08:00
Linux Build Service Account
38161bed32 Merge "clk: msm: Add reset support in virtual clock frontend driver" 2018-01-18 00:05:37 -08:00
Linux Build Service Account
742c761dbe Merge "ath10k: wakeup device from wow suspend on GTK rekey failure" 2018-01-18 00:05:36 -08:00
Vamsi Krishna Samavedam
011be14432 dwc3-msm: Introduce sysfs param to indicate usb compliance mode
Currently usb stack is teared down if no activity is detected for
10 seconds when floating charger is connected. USB 3.1 compliance
equipment usually reported as floating charger. Introduce sysfs
parameter to indicate if usb compliance in progress and do not
tear down the stack based on this parameter.

Change-Id: I26013c281827f35eac7f21ed68b3880e541d82b9
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2018-01-18 12:09:42 +05:30
Jack Pham
bc4f3590a7 usb: pd: avoid out-of-bounds access when reading PDOs
Most often a source will send fewer than the maximum number
of PDOs (7). Since the rx_msg buffer is now allocated up to
the size of the actual data, honor the rx_msg->data_len when
copying to pd->received_pdos rather than always 28 bytes.
This fixes out-of-bounds read access as reported by KASAN.

Change-Id: I5f98f7ccba027c1ab436ccf6fc822e2a319bafa1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2018-01-17 18:04:52 -08:00
Jack Pham
9f8d148622 usb: pd: ensure source hard reset is handled timely
When in source mode if a hard reset is received just before or
while usbpd_sm() is in the middle of trying to send an outgoing
message, the signal handling would get delayed due waiting for
the PD PHY to complete retrying and failing both the message as
well as the subsequent Soft_Reset message. Instead, treat the
incoming hard reset with priority try to bail out of further
attempts to send a message so that we can immeidately re-queue and
process the hard reset on the next usbpd_sm() invocation.

In case the TX attempt still manages to win the race, this will
cause delay that affects our tPSHardReset (25-35ms) required time
resulting in VBUS getting turned off too late. Handle this by
keeping track of when the hard reset signal arrived so that
we can schedule SRC_TRANSITION_TO_DEFAULT within this window.

Also promote the error message when a hard reset is received
from KERN_DEBUG to KERN_ERR, as this is abnormal enough
to deserve printing to the kernel log with higher priority.

Change-Id: Ie503f7b776022067ec3a4788d5229ec508b9c55f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2018-01-17 17:56:22 -08:00
Hemant Kumar
f83e315016 usb: pd: Support revision 3.0 in sink-only mode
commit 07040df2790e ("usb: pd: policy_engine: Handle spec revision
properly") changed the spec revision handling to be 2.0 mode unless
a programmable power supply is seen. Extend this via a module
parameter to allow PD 3.0 in sink-only mode regardless of PPS when
a 3.0 source is connected.

Since the revision of the source is first encountered when
receiving the Source Capabilities message, this information is
lost by the time pd_eval_src_caps() is called. So bring back the
handling in phy_msg_received() removed in commit 07040df2790e ("usb:
pd: policy_engine: Handle spec revision properly").

Change-Id: I0485224aeadcffbfaecd0c7942c6dbcd9ddd3813
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2018-01-17 17:55:15 -08:00
Linux Build Service Account
70a63c48d0 Merge "msm: thermal: use cluster frequency to request lmh dcvs from KTM" 2018-01-17 09:55:05 -08:00
Rahul Sharma
4d4fccf24e msm: ais: sensor: actuator: avoid accessing out of bound memory
Issue:
When total_steps is updated, after that, copy_from_user
fails with an error, then, i2c_reg_tbl is not allocated.
In this case, when calling msm_actuator_parse_i2c_params,
it lead to out-of-bound memory write.
Fix:
1) Assign total_steps to zero when error from copying.
2) Add NULL pointer check for i2c tbl.
3) Fixing the issue where the function can return
with an error code leaving "a_ctrl->i2c_reg_tbl"
and "a_ctrl->total_steps" out of sync.

Change-Id: Ib46deceb7bd8efff1cb606b894396e7016271dd3
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2018-01-17 06:23:55 -08:00
Vinayak Menon
199d236e97 defconfig: msm: sdm660: disable memory cgroups
Memory cgroups is an unused feature on sdm660. But
enabling it in kernel means that user space can
configure it. Avoid such user configurations until
the feature is decided to be deployed.

Change-Id: Ie77a4de51a59179ff3cb543e3cc955ce48412a59
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2018-01-17 15:17:50 +05:30
Linux Build Service Account
b3b1b7012c Merge "cnss2: Fix compilation warning maybe as error" 2018-01-16 20:01:40 -08:00
Linux Build Service Account
a854e24ab5 Merge "msm: adsprpc: Fix race conditions on same buffer" 2018-01-16 20:01:38 -08:00
Linux Build Service Account
a1410220e6 Merge "scsi: ufs-qcom: Fix compilation error in ufs bus voting" 2018-01-16 10:03:34 -08:00
Linux Build Service Account
99cdbc1cdc Merge "drm/msm-hyp: add get/put function to cache FB" 2018-01-16 10:03:31 -08:00
Linux Build Service Account
874c79ac6b Merge "msm: ais: Camera clock voting fixes for LA XO" 2018-01-16 10:03:28 -08:00
Sarada Prasanna Garnayak
e1fe6842c5 ath10k: wakeup device from wow suspend on GTK rekey failure
The ath10k wlan firmware supports GTK rekeying while asleep.
Enable GTK rekeying failure wakeup source in wow suspend.
This adds support to wakeup the device from wow suspend
state if GTK rekeying process failed in the wlan firmware.

CRs-Fixed: 2169340
Change-Id: I321a6139d74b0fcf476e961ba83879fae9c39f04
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2018-01-16 04:35:29 -08:00
Mohammed Javid
b564ffbc31 msm: ipa: Fix to unsigned integer underflow
Added code changes to fix the unsigned integer underflow
leads to accessing unmapped memory.

Change-Id: I8148aebd3597ec6ae8c184199afe816f3d80636e
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-01-16 12:36:42 +05:30
Tharun Kumar Merugu
3ebcd5d7e5 msm: adsprpc: Fix race conditions on same buffer
Variable map may pointing to the same buffer on race conditions
in functions fastrpc_internal_mmap and fastrpc_internal_munmap,
use mutex to avoid race conditions on same buffer.

Change-Id: I96ed884c44a36f574677ba3ba189dfbf2ce3751d
Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2018-01-15 22:36:05 -08:00
Subbaraman Narayanamurthy
371c451d08 power: qpnp-fg-gen3: Adjust recharge SOC after early termination
Currently, recharge SOC is adjusted based on the SOC at which
charge termination occurs. However, it gets reset back to the
original threshold only if input is removed. This does not work
well if charging resumes again once the battery is out of JEITA
as the recharge SOC threshold stays configured at a lower value.
Fix it by adjusting recharge SOC to the original threshold once
charging begins.

CRs-Fixed: 2163058
Change-Id: I07c714d32ba0005d3b0ff61142928eda58f049d0
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-01-15 14:38:24 -08:00
Manaf Meethalavalappu Pallikunhi
1296062336 msm: thermal: use cluster frequency to request lmh dcvs from KTM
KTM lmh dcvs frequency mitigation uses given online/first cpu max/min
mitigation request. There can be cases like emergency frequency
mitigation where mitigation request is for a particular cpu only and
online/first cpu may be one of the other cpus from the same cluster.
In this case lmh dcvs takes online/first cpu max request which can be
in no mitigation state. It leads to unmitigated state even though one
of the cpus is triggered.

If device supports cluster mitigation, use min/max request of that
cluster instead of min/max request of given online/first cpu.
It ensures lmh dcvs mitigation if one of the cpu mitigation is
triggered and other unmitigated cpu of same cluster is given as
online/first cpu.

Change-Id: Ibbb913eb67a7f84d4c3658d0edae495990ca9010
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2018-01-15 17:25:50 +05:30
Zhiqiang Tu
249a02309f clk: msm: Add reset support in virtual clock frontend driver
To support reset function in virtual clock driver, we register
a reset controller in virtual clock front driver. It is a virtual
reset controller which talks with host backend via virtual clock
message.

Change-Id: I13d48180534110260d66e42f3a02b63c2afcaeca
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-01-15 15:25:42 +08:00
Ferry Zhou
4e11e0997d cnss2: Fix compilation warning maybe as error
Fix warning that the variable is used before initialized, which
might be treated as error in strict case.

Change-Id: I95a34fa31e87fde2055af745f46f65a0d0402efc
Signed-off-by: Ferry Zhou <tianguiz@codeaurora.org>
2018-01-15 13:47:42 +08:00
Linux Build Service Account
de111ce20e Merge "msm: sensor: actuator: add null pointer check for i2c array" 2018-01-13 03:50:15 -08:00
Linux Build Service Account
879163d599 Merge "soc: qcom: glink: Add sub system up notification in glink" 2018-01-13 03:50:13 -08:00
Linux Build Service Account
ee6f575089 Merge "clocksource: arch_timer: make virtual counter access configurable" 2018-01-12 15:34:03 -08:00
Linux Build Service Account
2f26ea48fb Merge "arm64: issue isb when trapping CNTVCT_EL0 access" 2018-01-12 15:34:03 -08:00
Linux Build Service Account
5d574072e3 Merge "BACKPORT: arm64: Add CNTFRQ_EL0 trap handler" 2018-01-12 15:34:02 -08:00
Linux Build Service Account
d81280ed87 Merge "BACKPORT: arm64: Add CNTVCT_EL0 trap handler" 2018-01-12 15:34:01 -08:00
Linux Build Service Account
ca9e78d525 Merge "ASoC: msm: add kcontrol for sec tdm slot config" 2018-01-12 15:34:00 -08:00
Linux Build Service Account
8867eef777 Merge "netfilter: nf_defrag_ipv4: Add sysctl to disable per interface" 2018-01-12 15:33:58 -08:00
Linux Build Service Account
39b7c5b66a Merge "ARM: dts: msm: smmu and modem switch to virtual clock on msm8996 vplatform" 2018-01-12 15:33:57 -08:00
Rahul Sharma
a211778552 msm: ais: Camera clock voting fixes for LA XO
AIS camera voting on VFE and ISPIF clocks cause XO shutdown failure.
So, add new AIS manager driver, to control AIS camera clock votes.
Also add a new method in early camera driver to turn on/off clocks
when it's needed.

Change-Id: I43090b51cb29ca9de62dfa191f77b7aa9dae8613
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2018-01-12 02:44:57 -08:00
Haibin Liu
eabe2326e1 msm: sensor: actuator: add null pointer check for i2c array
Issue:
i2c_reg_tbl may be null under error condition when set param.
then, other actuator function still may use the i2c_reg_tbl as null.
Fix:
1) the assignment total_steps follow on kmalloc buffer.
2) Add NULL pointer check for i2c tbl.

CRs-Fixed: 2152401
Change-Id: Ieec3d88e6dae0177787da0906f53d59ac4f5a624
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
2018-01-11 23:36:14 -08:00
Linux Build Service Account
04b6b652ac Merge "leds: qpnp-wled: add stepper algorithm using brightness map" 2018-01-11 04:15:02 -08:00
Linux Build Service Account
d11384c032 Merge "leds: qpnp-wled: add support for brightness mapping" 2018-01-11 04:15:01 -08:00
Linux Build Service Account
223521eafb Merge "ARM: dts: msm: Add missing entries for XO on msm8996 agave" 2018-01-11 04:15:00 -08:00
Linux Build Service Account
4e432f6b70 Merge "mmc: host: Add device_prepare pm for mmc_host" 2018-01-11 04:14:59 -08:00
Linux Build Service Account
4233164b94 Merge "drivers: cpuidle: lpm-levels: Fix untrusted pointer dereference." 2018-01-11 04:14:57 -08:00
Linux Build Service Account
424c9af495 Merge "soc: msm: qdsp6v2: fix compile warning in ion vm driver" 2018-01-11 04:14:56 -08:00
Linux Build Service Account
e64256fca0 Merge "ASoC: msm: qdsp6v2: add spin lock to protect ac" 2018-01-11 04:14:55 -08:00
Linux Build Service Account
eb26d9d0c0 Merge "icnss: Add size check before assigning msa permission" 2018-01-11 04:14:54 -08:00
Linux Build Service Account
a26abcc37e Merge "drm/msm: Fix prototypes of the stub functions" 2018-01-11 04:14:53 -08:00
Linux Build Service Account
3ff2845f4e Merge "oc: qcom: rpm-smd-debug: Fix potential memory leaks" 2018-01-11 04:14:51 -08:00