728035 Commits

Author SHA1 Message Date
Maulik Shah
263edeadfc drivers: pinctrl: qcom: Update GPIO mapping for sm6150
Update direct connect info for GPIOs as per latest mappings.

Change-Id: I0c007028c859642755e0c33cba11f4647927051a
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2018-09-19 15:10:59 +05:30
qctecmdr Service
4719c01d9b Merge "cpuidle: Fix cpu frequent exits from low power mode" 2018-09-16 08:09:06 -07:00
qctecmdr Service
3f0a7110e0 Merge "kbuild: clang: Disable sometimes-uninitialized warnings" 2018-09-16 08:09:05 -07:00
Prasad Sodagudi
ae04811d41 cpuidle: Fix cpu frequent exits from low power mode
Following upstream changes are reverted due cpu low
power mode use cases regressions.

'commit 55e591cc1879 ("BACKPORT: time: tick-sched: Reorganize idle tick management code")'
'commit f6d3093dfc66 ("BACKPORT: sched: idle: Do not stop the tick upfront in the idle loop")'
'commit 27e8616e4282 ("UPSTREAM: sched: idle: Do not stop the tick before cpuidle_idle_call()")'
'commit 8b468535dfdc ("UPSTREAM: jiffies: Introduce USER_TICK_USEC and redefine TICK_USEC")'
'commit 3a25735bd7ec ("UPSTREAM: cpuidle: Return nohz hint from cpuidle_select()")'
'commit f69cfc8ef98a ("BACKPORT: time: tick-sched: Split tick_nohz_stop_sched_tick()")'
'commit 6277dd586f11 ("BACKPORT: time: hrtimer: Introduce hrtimer_next_event_without()")'
'commit 8c71f69fb440 ("UPSTREAM: sched: idle: Select idle state before stopping the tick")'
'commit 30693a4f0909 ("UPSTREAM: cpuidle: menu: Refine idle state selection for running tick")'
'commit e32966ced86f ("UPSTREAM: cpuidle: menu: Avoid selecting shallow states with stopped tick")'

Also fix the compilation errrors as tick_nohz_get_sleep_length()
function signature is changed.

Change-Id: I21488a5a91f1eac11d4e139fd44968d52563717c
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2018-09-14 23:21:12 -07:00
qctecmdr Service
add3c3b869 Merge "msm: vidc: Add sm6150 platform specific data" 2018-09-14 21:49:00 -07:00
qctecmdr Service
80d93000e1 Merge "soc: qcom: Update CX table to support sm6150" 2018-09-14 21:49:00 -07:00
qctecmdr Service
e5365f1b36 Merge "soc: qcom: smp2p_sleepstate: Add inbound notification" 2018-09-14 21:48:59 -07:00
qctecmdr Service
c4ff35abbc Merge "clk: qcom: Mark gpu_cc_ahb_clk as critical for SM6150" 2018-09-14 21:48:59 -07:00
qctecmdr Service
c40d488f88 Merge "ARM: dts: msm: Assign USB supplies for SA6155 and SA6155P" 2018-09-14 21:48:59 -07:00
qctecmdr Service
9eb6c5f12f Merge "msm: ipa4: Decrement number of packet in queue only if count was not zero" 2018-09-14 21:48:59 -07:00
qctecmdr Service
251b6b48eb Merge "usb: f_gsi: Resume USB on handling disconnect event in suspend state" 2018-09-14 21:48:58 -07:00
qctecmdr Service
274536020a Merge "power: qpnp-qg: Clear the STATUS2 register during init" 2018-09-14 21:48:58 -07:00
qctecmdr Service
be08cca1f4 Merge "backlight: qcom-spmi-wled: Update i_sink calculation for WLED flash" 2018-09-14 21:48:58 -07:00
qctecmdr Service
d035a67f08 Merge "PM / devfreq: bw_hwmon: Fix a race condition in hwmon stop" 2018-09-14 21:48:57 -07:00
qctecmdr Service
0407240beb Merge "power: qpnp-fg-gen4: Fix enabling parallel current measurement" 2018-09-14 21:48:57 -07:00
qctecmdr Service
f52c661b71 Merge "ARM: dts: msm: update PCIe PHY sequence for sm8150 V1 and V2" 2018-09-14 21:48:56 -07:00
qctecmdr Service
42105f5402 Merge "ARM: dts: msm: Fix a typo in deleting a node in SM8150 v2 DTSI" 2018-09-14 21:48:56 -07:00
Rama Aparna Mallavarapu
fe90e747ac ARM: dts: msm: Fix a typo in deleting a node in SM8150 v2 DTSI
The label for the opp-tables are being deleted but not the
phandles for the nodes. Fix this bug for the updated tables
to reflect in SM8150 v2.

Change-Id: I1012e2223d28549a528bc16e69b3e3770a03c17e
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
2018-09-14 15:46:30 -07:00
Tony Truong
0cdf0f630b ARM: dts: msm: update PCIe PHY sequence for sm8150 V1 and V2
Update PCIe0 and PCIe1 PHY sequence for sm8150 V1 and V2
based on h/w recommendation.

Change-Id: Iac7ab2bfd20349bf24db07824ab9bed9b2e697ab
Signed-off-by: Tony Truong <truong@codeaurora.org>
2018-09-14 14:18:50 -07:00
qctecmdr Service
85596bb4bf Merge "msm: kgsl: Unmask TSBWRITEERROR intterupts" 2018-09-14 14:15:21 -07:00
qctecmdr Service
ffdf45ccea Merge "soc: qcom: secure_buffer: Fix the parameter passing to dmac_flush_range" 2018-09-14 14:15:21 -07:00
qctecmdr Service
11713211e0 Merge "perf: llcc: Preserve events across CPU hotplugs" 2018-09-14 14:15:21 -07:00
qctecmdr Service
1030fff683 Merge "defconfig: Enable CONFIG_BALANCE_ANON_FILE_RECLAIM for sm8150" 2018-09-14 14:15:20 -07:00
qctecmdr Service
a165b8fc49 Merge "wcnss: Fix buffer overflow in wcnss_prealloc_get" 2018-09-14 14:15:20 -07:00
qctecmdr Service
e74dd49350 Merge "defconfig: arm64: enable CONFIG_PAGE_POISONING_ENABLE_DEFAULT for sdmsteppe" 2018-09-14 14:15:20 -07:00
qctecmdr Service
77a472e56b Merge "ARM: dts: qcom: Add iommu bus voting details for sdmmagpie" 2018-09-14 14:15:19 -07:00
qctecmdr Service
bd456266ff Merge "msm: pcie: add IOMMU configuration support for root complex" 2018-09-14 14:15:19 -07:00
qctecmdr Service
80af3a92f0 Merge "memory_hotplug: Optimize memory onlining" 2018-09-14 14:15:18 -07:00
qctecmdr Service
213a3c20a0 Merge "msm: npu: Add ssr support in dsp mode" 2018-09-14 14:15:18 -07:00
qctecmdr Service
b3400d00f4 Merge "ARM: dts: qcom: Update pm qos latency value for sm6150" 2018-09-14 14:15:18 -07:00
qctecmdr Service
71dd8c31fb Merge "ARM: dts: msm: Change display rsc to use AMC votes for sm6150" 2018-09-14 14:15:17 -07:00
qctecmdr Service
18836b9b4a Merge "mmc: sdhci-msm: Fix the order of removing sdhci-msm functionalities" 2018-09-14 14:15:17 -07:00
qctecmdr Service
2daf3a3006 Merge "coresight: tmc: Correct the status for ETR disable" 2018-09-14 14:15:17 -07:00
qctecmdr Service
33a7614dd5 Merge "ARM: dts: msm: Add ICE node for SM6150" 2018-09-14 14:15:16 -07:00
Rama Aparna Mallavarapu
20da81497e PM / devfreq: bw_hwmon: Fix a race condition in hwmon stop
Currently, the bw_hwmon governor handles DEVFREQ_GOV_STOP and
DEVFREQ_GOV_SUSPEND events by calling devfreq_monitor_stop
and devfreq_monitor_suspend respectively, prior to disabling
the bw_hwmon irq. Doing so allows for the following race condition:

	T0:  				   bw_hwmon irq thread:

/* df->governor == bw_hwmon
 * changing to
 * powersave governor
 */
governor_store()
 /* Calls bw_hwmon governor event
  * handler with DEVFREQ_GOV_STOP
  * event
  */
 df->governor->event_handler()
  gov_stop()
  stop_monitor()
                                        update_bw_hwmon()
                                        devfreq_monitor_stop()
   /* Cancels timer for future calls
    * to devfreq_monitor
    */
   devfreq_monitor_stop()
   /* Calls free_irq(), which waits
    * for the bw_hwmon IRQ thread
    * to finish.
    */
   hw->stop_hwmon()
                                        --finishes update_devfreq()--
                                        /* Incorrectly starts
					 * devfreq_monitoring
                                         */
                                        devfreq_monitor_start()
                                       --thread finishes execution--
   --finishes DEVFREQ_GOV_STOP
     handling--
 --switches governor to powersave--
/* devfreq monitor for this
 * instance. This will call
 * queue_delayed_work()
 * which internally queues
 * the timer for this devfreq
 * structure.
 */
devfreq_monitor()
/* df->governor == powersave
 * changing to bw_hwmon
 */
governor_store()
 /* powersave: DEVFREQ_GOV_STOP
  */
 df->governor->event_handler()
 /* bw_hwmon: DEVFREQ_GOV_START
  */
 df->governor->event_handler()
  gov_start()
   /* Will incorrectly adjust
    * the fields within the
    * timer and corrupt the
    * timer data structure
    */
   devfreq_monitor_start()

Since this corrupts the timer data structures, when the timer
gets expired, it will be expired twice. Fix this race condition
by introducing new lock to synchronize the access to the
mon_started variable, so that the irq thread does not restart
the devfreq monitor after it has been stopped.

Change-Id: I2dced21d5343afd6ec2e13876e26aeb5c83a4d12
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
2018-09-14 11:39:52 -07:00
Subbaraman Narayanamurthy
2ff013309d backlight: qcom-spmi-wled: Update i_sink calculation for WLED flash
When Vph is low because of low battery voltage and high system
load, i_sink calculated can have a zero because of not fitting
any of the conditional blocks. In real case, WLED flash is
possible even at this lower battery voltage. Hence set i_sink
to max_fsc to begin with and update it to a different voltage
based on the calculations later.

For an unsupported configuration, no calculations are available
to limit i_sink. Hence, limit the current to half of max_fsc
if Vph is below 3.2 V as per the hardware recommendation.

Change-Id: I8dcce6aa1722314006d6b34f6389ce640b8a25c3
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-09-14 10:28:01 -07:00
Anirudh Ghayal
ab8fef5681 power: qpnp-qg: Clear the STATUS2 register during init
There could a GOOD_OCV when the device is off. Clear the
GOOD_OCV status register by reading from it during init
and during device suspend.

Change-Id: If88ea132c4151712e8402b64b3b88bd3daf2fd1a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2018-09-14 10:12:29 -07:00
Shaikh Shadul
0d1d05cefb soc: qcom: smp2p_sleepstate: Add inbound notification
smp2p sleep state is extended to handle interrupts from
remote processor to decide whether to acquire wake lock
or not during wakeup sensor sample processing.

For wake up sensors, the driver is expected to a hold a
wake lock with a timeout of 200 ms while reporting this
event as per spec.

Change-Id: Icc342be71b22400b54fe5021c8cecdd0015640e7
Signed-off-by: Shaikh Shadul <sshadu@codeaurora.org>
2018-09-14 17:23:45 +05:30
Mohammed Javid
03b7faad8c msm: ipa4: Decrement number of packet in queue only if count was not zero
Decrement number of packet in ODL queue only if the count was not zero,
otherwise it was leading packet count value to negative value.

Change-Id: I21f913396f7062d4e175c923cf4f523a567f06a9
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-09-14 17:13:43 +05:30
Tingwei Zhang
a1aa682fcc coresight: tmc: Correct the status for ETR disable
Mode in etr drvdata is not reset to CS_MODE_DISABLED in USB case.
In this case, following ETR enablement on mem mode won't work.  Set
the mode status correctly.  Coresight source should be disabled
in reset case and echo 0 > enable_source case.  Decrease the refcnt
to disable the source correctly.

Change-Id: I6f88efcd22ef56dc12f85a821a1dc004b4dda3d8
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2018-09-14 17:15:56 +08:00
Manikanta Kanamarlapudi
0f3994dddb msm: vidc: Add sm6150 platform specific data
Add platform specific data like fw-cycles,
power collapse delay, HW response time out
for sm6150.

CRs-Fixed: 2295372
Change-Id: I01cca7f0443661685f531a0ae829f9a042569e51
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2018-09-14 12:50:28 +05:30
Odelu Kukatla
0c939233af clk: qcom: Mark gpu_cc_ahb_clk as critical for SM6150
Add the CLK_IS_CRITICAL flag for gpu_cc_ahb_clk to keep it
enabled at all times.  This is needed to avoid unclocked
register accesses by SMMU since SMMU vote registers do not
enable gpu_cc_ahb_clk.

Also skip an enable check for this clock since it will not
be physically enabled until gpu_cx_gdsc is enabled.

Change-Id: I83c81a20f306752a87ee0bb70ee7b1efbce5e001
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2018-09-14 11:45:30 +05:30
Ram Prakash Gupta
293c7fb9af ARM: dts: qcom: Update pm qos latency value for sm6150
For pm qos latency on sm6150, sm8150 was followed in commit <07e861d2d>
("ARM: dts: Enable bus voting and PM QoS for sm6150 platform").
This need to be update as per sdm670 where pm qos latency value is
different than sm8150.

Change-Id: I8432d2fdc443cfedaab81d47bd66804993a8667e
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
2018-09-14 10:57:43 +05:30
Odelu Kukatla
1273d788d7 ARM: dts: msm: Change display rsc to use AMC votes for sm6150
Since display RSCs have their own dedicated AMC TSC,
they no longer need to repurpose a single TSC for both
wake and AMC.
Also add CN1 BCM node and update the DDR bus width.

Change-Id: Ieefa4fa8e0202ce9720eec7827e698b4b98b91d5
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2018-09-13 22:19:04 -07:00
Zhenhua Huang
f6e30737cf soc: qcom: secure_buffer: Fix the parameter passing to dmac_flush_range
For "chunk_list + chunk_list_len", if the chunk_list is type of u32*,
the chunk_list_len will be 4 * of original size. So we flushed a wrong
area size. In some condition like we enabled CONFIG_DEBUG_PAGEALLOC, it
may flush out of page bound of the invalid pte page.

Fix it by manually convert it as void* when doing the addition.

CRs-Fixed: 2309993
Change-Id: I2b88d78ba73d9904fa2bf6106937001715b6037f
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
2018-09-13 19:35:30 -07:00
Subbaraman Narayanamurthy
e1f383c3af power: qpnp-fg-gen4: Fix enabling parallel current measurement
'Commit 1b7e5a863b56
("power: qpnp-fg-gen4: Enable parallel charging current measurement")'
modified BATT_INFO_FG_CNV_CHAR_CFG to enable parallel charging
current measurement which is essential for calculating state of
charge (SOC) accurately. However, if SMB_MEASURE_EN_BIT is set
when FG HW is in the middle of ADC conversions, it can cause ADC
to get locked up without an end of conversion (EOC). Hence that
change got reverted.

Re-enable parallel current measurement as follows.

- Configure PEEK_MUX to output ALG active signal on MEM_ATTN interrupt
- Wait for MEM_ATTN interrupt
- Modify SMB_MEASURE_EN_BIT in BATT_INFO_FG_CNV_CHAR_CFG

Also, configure SMB_MEASURE_EN_BIT dynamically so that parallel
current summing gets enabled upon charger insertion and disabled
upon charger removal or charge termination.

Change-Id: I81289127eeda0af66e11da3290d1b596301becda
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-09-13 19:29:41 -07:00
Subbaraman Narayanamurthy
83373dd1ae ARM: dts: msm: Add mem-attn interrupt configuration for PM8150B
For configuring parallel current measurement, mem-attn interrupt
needs to be enabled as the register write should be done only
on the falling edge of that interrupt and PEEK_MUX is configured
to output ALG active signal on that interrupt. Add the interrupt
configuration to PM8150B FG to allow that.

Change-Id: Ie0ab3c67a80d1798af8cc1076c3a889b4b3beb58
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2018-09-13 19:29:41 -07:00
qctecmdr Service
1e465bc92a Merge "clk: qcom: clk-alpha-pll: check for null when trying to get parent" 2018-09-13 19:28:10 -07:00
qctecmdr Service
c23ea278f0 Merge "soc: qcom: wda: Timeout and wq change" 2018-09-13 19:28:10 -07:00
qctecmdr Service
c67df3bfba Merge "mm: cma: add trace events for CMA alloc perf testing" 2018-09-13 19:28:09 -07:00