Commit graph

877,558 commits

Author SHA1 Message Date
Raghu Ananya Arabolu
e908ac2c0c msm: kgsl: Remove write-only register from snapshot
GPU_GMU_AO_GMU_DOORBELL_IDX register is write-only and hence
should not be dumped in snapshot.

Change-Id: I17df925377765426fc7149466b320e635d8c241b
Signed-off-by: Raghu Ananya Arabolu <rarabolu@codeaurora.org>
2020-01-21 12:24:40 -08:00
qctecmdr
3a4e5978ef Merge "iommu/arm-smmu: Replace while loop with for_each_set_bit" 2020-01-21 08:48:18 -08:00
qctecmdr
94e0b5746e Merge "uapi: sound: remove redundant QGKI config checks" 2020-01-21 08:48:17 -08:00
qctecmdr
e5d3e34590 Merge "uapi: sound: remove redundant QGKI config checks" 2020-01-21 08:48:16 -08:00
Ajay Prathi
32aae719f9 arm64: defconfig: Enable TSENS driver for lahaina
Add configuration changes in lahaina qgki defconfig
to enable tsens driver.

Change-Id: I5bb64da99179f87b0ca6aaa0eacad9409038b122
Signed-off-by: Ajay Prathi <aprathi@codeaurora.org>
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
2020-01-21 16:37:31 +05:30
Patrick Daly
8693c2d4c4 iommu/iova: Limit IOVA alignment using CONFIG_ARM64_DMA_IOMMU_ALIGNMENT
Currently IOVAs are aligned to the next power of two of the size of the
allocation. This can result in unnecessary fragmentation of the IOVA
space.

If defined use CONFIG_ARM64_DMA_IOMMU_ALIGNMENT to limit the maximum IOVA
alignment.

Change-Id: Ica7f6382237e37acac2d35972a564ca1e1f5e84f
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-20 16:11:20 -08:00
Elliot Berman
e64ad268c3 power: reset: Add qcom_dload command to poweroff driver
Add qcom_dload command to poweroff driver to force a warm restart into
CrashDump mode.

Change-Id: Idb1ab86801c24a9b86604e1f890fec01e7827ff2
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-01-20 13:57:09 -08:00
Michael Adisumarta
2515833a73 msm: ipa: clear the ipa pipeline before any ep config
The packets on IPA RX pipe 0 are route back to IPA TX pipe 0
which is causing the IPA stall. This fix allows to clear ipa
pipeline for ep config such as set/reset DMA mode
for rmnet tethering config.

Change-Id: Idd923f67bebfbc0aed8afcd0ea94a175ff691395
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-01-20 13:54:58 -08:00
Manikandan Mohan
6db3fa0974 Revert "cnss2: Add support to monitor PM QOS votes"
This reverts commit Ida5128ae0ed9335be17ea220d6d26a386d35ac02.
PM QOS feature is moved to qcacld driver.

Change-Id: Ia6181b90b462ce1e1dd02e3f9e01746e566c88af
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-01-20 12:29:52 -08:00
Manikandan Mohan
1c630c8e3d net: cnss2: Build generic netlink support by default
Remove cnss2 generic netlink feature build from debug
config since it is needed for default builds.

Change-Id: Ia746232b451c7ea794bcd0ec6f270026a0b63133
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-01-20 12:27:53 -08:00
qctecmdr
6da1fc6d98 Merge "interconnect: qcom: Change bcm voter initlevel" 2020-01-20 07:23:37 -08:00
qctecmdr
496291b53a Merge "arm64: defconfig: Enable CMA debug configs on Lahaina" 2020-01-20 07:23:37 -08:00
Pavankumar Kondeti
02ee287af9 sched/fair: consider uclamp boost while deciding the start_cpu
The find_best_target() looks for the higher capacity CPU when
the task is boosted. However the current code does not consider
the boost while deciding the start_cpu. This may result in
unnecessary traversal of the lower capacity CPU group in
find_best_target().

Change-Id: I8153482e15d2c9ea8971415edb9dbd54e10e11d0
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-01-20 16:52:57 +05:30
Karthik Poosa
af944fff10 NFC: Add support to get NFC interface type
Add new ioctl NFC_GET_PLATFORM_TYPE to get the NFC
interface type. This is used by the NFC HAL to 
do the firmware download according to the interface
type.

Change-Id: I45e8c4814e04348daa88c8b7a026bd44fa84163a
Signed-off-by: Karthik Poosa <kpoosa2@codeaurora.org>
2020-01-20 15:05:45 +05:30
qctecmdr
f22a034b4c Merge "cpufreq: schedutil: fix CPU util when WALT is enabled" 2020-01-19 23:48:12 -08:00
qctecmdr
fa10563f7d Merge "interconnect: qcom: Add sync_state for Lahaina QNOC" 2020-01-19 23:48:12 -08:00
qctecmdr
c0dac684fd Merge "uapi: sound: remove redundant QGKI config checks" 2020-01-19 23:48:12 -08:00
qctecmdr
131058b76a Merge "uapi: sound: remove redundant QGKI config check" 2020-01-19 23:48:11 -08:00
Ghanim Fodi
0060af5a98 msm: ipa: split quota stat memory between q6 and ap
Q6 uses only 2 pipes for stats. Split the SRAM
specific region between Q6 (2 entries) and AP
(rest 3 entries).

Change-Id: Ie9eac932a6547e03f76a2a294d69f90db1d1b190
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2020-01-19 17:33:04 +02:00
Justin DeMartino
32c1088cce Example kernel headers header_lib package
This change is foundational for converting many modules that depend on kernel
headers built via the platform build system.

Bug: 143567008
Change-Id: I8c2e33aa0b28e2ec54d924b9650c302691f9c8e8
[rishabhb@codeaurora.org: add logic to iterate over mandatory headers
 and only generate these headers if not already present in
 usr/include/asm. Also export techpack uapi headers.]
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2020-01-18 13:31:06 -08:00
Meng Wang
3ea63ceb53 uapi: sound: remove redundant QGKI config checks
Userspace does not have access to QGKI configs,
so remove redundant QGKI config checks.

CRs-Fixed: 2603947
Change-Id: I712525434311c48d4046cb7fa1aca2add89eb23e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-17 16:46:31 -08:00
Blagovest Kolenichev
816cd2b9fd Revert "FROMLIST: scsi: ufs-qcom: Adjust bus bandwidth voting and unvoting"
This reverts commit 9915659710.

This is a preparation change for merging android-5.4.5 into
msm-5.4 branch:

Equivalent logic was already submitted into msm-5.4.

Change-Id: Ic80f502d919e686451a79fdcce3da013f12509f0
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-01-17 13:43:51 -08:00
Harshdeep Dhatt
bc44733274 msm: kgsl: Remove icc path from gmu device
Instead, use the pwr->icc_path as both are for gpu ddr
voting.

Change-Id: I0f2b1e49dde9433ee062bbf71d7197d8e2ea7a83
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-17 13:18:07 -07:00
Harshdeep Dhatt
e91214d3d4 msm: kgsl: Add support for multiple ddr tables
The lahaina device can have either LP4X or LP5 DDR. So
look for the corresponding ddr table in the device tree.
If ddr specific table is not found, fall back to a generic
table for devices that may have only one type of ddr.

Change-Id: I92cb802820eeb61e4afd0a79ed38a7f8b4a5916d
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-17 13:18:06 -07:00
Harshdeep Dhatt
73db5bb07d msm: kgsl: Setup LPAC global pagetable
When we unhalt the GC SQE, the microcode also unhalts the
LPAC SQE. Therefore, we need to map the globals to LPAC context
bank as well.

Change-Id: I6749357036dd7bc90d6958a3f805943c8cae92c7
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-17 13:18:06 -07:00
Harshdeep Dhatt
d84815d98d msm: kgsl: Check snapshot status after snapshot
A660 gpu has a new register to track whether any interface
signals changed during snapshot capture.

Change-Id: I24ecc9e98c9c2a745518e95419d5b4cf13fe634c
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-17 13:18:05 -07:00
Harshdeep Dhatt
e688535a2f msm: kgsl: Update a660 CP indexed register ranges
A660 indexed register ranges have changed, so update snapshot
to dump the new ranges. It is safe to dump the entire range
across all a6x tiers. Also add the easier work around for
dumping mvc registers via mempool indexed registers.

Change-Id: I2491c35a43e6467240bab380136dc1a14f16cb27
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2020-01-17 13:15:21 -07:00
Maulik Shah
bb396fa20a qcom: soc_sleep_stats: Correctly read accumulated sleep length
Correct the offset to read accumulated sleep length.

Change-Id: I7b05c85cb1664762781dfd6bd1917708e276f429
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2020-01-17 12:18:21 +05:30
Chris Goldsworthy
240d6f5367 iommu/arm-smmu: Replace while loop with for_each_set_bit
Switch out a while loop that loops over the set bits in a bitmap with
for_each_set_bit.

Change-Id: I8843a0b36906979a09122a8ccb07c8081278bf3b
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
2020-01-16 21:57:10 -08:00
Prakash Gupta
aa4926dd8d iommu/arm-smmu: enhance tlb sync timeout handler
Enhance TLB sync timeout handler. Parse debug registers to identify TBU/TCU
invalidation or SYNC pending state and dump appropriate TBU testbus data
accordingly.

Example output:
arm-smmu 15000000.apps-smmu: TLB sync timed out -- SMMU may be deadlocked
TBU ACK 0x3f0000 TBU PWR 0x3f TCU sync_inv 0x1000d5
arm-smmu 15000000.apps-smmu: TCU invalidation completed, TCU sync pending
arm-smmu 15000000.apps-smmu: TBU PWR status 0x3f
arm-smmu 15000000.apps-smmu: TBU sync ack pending for TBU
150d9000.adsp_tbu, check pending transactions on TBU.

Change-Id: If9ca9dcaf26f06ee9b4204771631425cec52f95b
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
2020-01-16 19:42:12 -08:00
Xiaoyu Ye
f494801035 uapi: sound: remove redundant QGKI config checks
Userspace does not have access to QGKI configs,
so remove redundant QGKI config checks.

Change-Id: I1d5167e482478e63381b7f36c3119558a466e5f7
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2020-01-16 19:34:58 -08:00
Subbaraman Narayanamurthy
154dc9d0de soc: qcom: pmic_glink: add support for multiple pmic_glink devices
Currently, pmic_glink driver supports a single Glink channel of
name PMIC_RTR_ADSP_APPS. Add support for another Glink channel of
name PMIC_LOGS_ADSP_APPS through which logs or debug information
can be shared to HLOS from the remote subsystem.

As of now, pmic_glink rpmsg driver is registered when pmic_glink
platform driver is probed. This doesn't work well when multiple
pmic_glink devices need to be supported because of the way that
kernel device framework thinks the same rpmsg device is being
registered again. Fix this by registering pmic_glink platform
and rpmsg drivers from module_init().

Change-Id: Ia3a7777d39e94557e6cdf2d72675614581e67572
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-01-16 18:46:15 -08:00
Patrick Daly
b81d7fab27 psi: Use deferrable psi_avgs_work
The logic for psi_avgs_work to not reschedule itself does not appear
to work properly.

1) psi_avgs_work detects itself as a running task due to accounting for
current states in get_recent_times().

2) Drivers with self-rescheduling deferrable work with a period
less than that of psi_avgs_work will always run when psi_avgs_work runs.
This causes psi_avgs_work to retrigger.

Make psi_avgs_work deferrable to avoid this loop.

Change-Id: I90edc5d3cce87ada803f549f417cd0108ef2017f
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2020-01-16 18:44:58 -08:00
Patrick Daly
76cf078de1 psi: Introduce ftrace events
Add ftrace events to capture per-zone memory stats when a
trigger threshold is hit.

Change-Id: Ic52a27713acd34090c8f99543408b277877015c7
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2020-01-16 18:44:28 -08:00
Yue Ma
543a8ac575 cnss2: NULL terminate FW build ID string
If FW build ID passed by QMI from firmware is a non-NULL terminated
string, it will result in a out-of-bounds read when driver populates
the QMI message using strlcpy where the src string must be NULL
terminated. Hence manually NULL terminate the string.

Change-Id: I8e27c01eae79e56afd1a706d071b4ccfa51d79e0
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-01-16 16:41:07 -08:00
Isaac J. Manjarres
64c5b175c6 arm64: defconfig: Enable CMA performance optimizations on Lahaina
Enable CONFIG_CMA_DIRECT_UTILIZATION and CONFIG_CMA_PCP_LISTS
to increase CMA utilization, and thus, improve memory utilization.

Change-Id: I2caa8d9f913bce8aa0171100f767c30e261074a6
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-16 16:22:14 -08:00
Liam Mark
5740533ccd mm: Allow only __GFP_CMA allocations from Movable zone
Ensure that only allocations which include __GFP_CMA can be satisfied from
zone Movable. This restriction helps reduces the likelihood of a page in
the movable zone being pinned which would prevent memory from being
offlined.

Change-Id: I570970ff848d4a7147f3ccda2b294f08bcdf88d8
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2020-01-16 16:22:14 -08:00
Vinayak Menon
3f23e82084 mm: fix the use of ALLOC_CMA
Movable allocations are allowed to allocate from CMA areas
only when __GFP_CMA is set in the gfp mask of the request.
But ALLOC_CMA is set in alloc_flags for all movable requests.
This can make zone_watermark_ok take incorrect decision.
Fix this by adding ALLOC_CMA only when request is of type
__GFP_CMA.

Change-Id: I15531968021c71cfbedd01d12307a203f0b408ca
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2020-01-16 16:22:13 -08:00
Vinayak Menon
a96ae75ea9 zram: allow zram to allocate CMA pages
Though zram pages are movable, they aren't allowed to enter
MIGRATE_CMA pageblocks. zram is not seen to pin pages for
long which can cause an issue. Moreover allowing zram to
pick CMA pages can be helpful in cases seen where zram order
0 alloc fails when there are lots of free cma pages, resulting
in kswapd or direct reclaim not making enough progress.

Change-Id: Id27d1a31b6cd869ebb025b49b76d2b62ba666ccf
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2020-01-16 16:22:13 -08:00
Vinayak Menon
aefaddd897 mm: fix cma accounting in zone_watermark_ok
Some cases were reported on 3.18 where atomic unmovable allocations
of order 2 fails, but kswapd does not wakeup. And in such cases it
was seen that, when zone_watermark_ok check is  performed to decide
whether to wake up kswapd, there were lot of CMA pages of order 2 and
above. This makes the watermark check succeed resulting in kswapd not
being woken up. But since these atomic unmovable allocations can't come
from CMA region, further atomic allocations keeps failing, without
kswapd trying to reclaim. Usually concurrent movable allocations result
in reclaim and improves the situtation, but the case reported was from
a network test which was resulting in only atomic skb allocations being
attempted. On 3.18 this was fixed by adding a cma free page counter and
accouting the cma free pages properly in watermark calculations.

Later this issue was indirectly fixed by the commit "mm, page_alloc:
only enforce watermarks for order-0 allocations".

But the commit "mm: add cma pcp list" brought the problem back because
it includes MIGRATE_CMA within MIGRATE_PCPTYPES, and thus watermark
check erroneously returns success for !ALLOC_CMA by finding free pages
in cma free list.

Change-Id: Id0e48b5c2f9deea93c5875c10d5ec72bd360df5f
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[isaacm@codeaurora.org: resolve merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-16 16:22:12 -08:00
Isaac J. Manjarres
e51aa630bc mm: add cma pcp list
Add a cma pcp list in order to increase cma memory utilization.

Increased cma memory utilization will improve overall memory
utilization because free cma pages are ignored when memory reclaim
is done with gfp mask GFP_KERNEL.

Since most memory reclaim is done by kswapd, which uses a gfp mask
of GFP_KERNEL, by increasing cma memory utilization we are therefore
ensuring that less aggressive memory reclaim takes place.

Increased cma memory utilization will improve performance,
for example it will increase app concurrency.

Change-Id: I809589a25c6abca51f1c963f118adfc78e955cf9
Signed-off-by: Liam Mark <lmark@codeaurora.org>
[vinmenon@codeaurora.org: fix !CONFIG_CMA compile time issues]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[swatsrid@codeaurora.org: Fix merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
[isaacm@codeaurora.org: Introduce CONFIG_CMA_PCP_LISTS]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-16 16:22:05 -08:00
Jack Pham
56cdbaea04 arm64: defconfig: Re-enable USB_F_FS_IPC_LOGGING for lahaina_debug
It seems CONFIG_USB_F_FS_IPC_LOGGING was mistakenly disabled in
commit e03586f944 ("arm64: defconfig: Enable TSENS driver for
lahaina"). Re-enable it.

Change-Id: I83b306dde5ef75958fc2064b65b4ec655d439562
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-01-16 13:37:17 -08:00
Heesub Shin
095c51f202 cma: redirect page allocation to CMA
CMA pages are designed to be used as fallback for movable allocations
and cannot be used for non-movable allocations. If CMA pages are
utilized poorly, non-movable allocations may end up getting starved if
all regular movable pages are allocated and the only pages left are
CMA. Always using CMA pages first creates unacceptable performance
problems. As a midway alternative, use CMA pages for certain
userspace allocations. The userspace pages can be migrated or dropped
quickly which giving decent utilization.

Change-Id: I6165dda01b705309eebabc6dfa67146b7a95c174
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com
[lauraa@codeaurora.org: Missing CONFIG_CMA guards, add commit text]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[lmark@codeaurora.org: resolve conflicts relating to MIGRATE_HIGHATOMIC]
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[swatsrid@codeaurora.org: Fix merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
[isaacm@codeaurora.org: Introduce CONFIG_CMA_DIRECT_UTILIZATION]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-16 13:23:12 -08:00
Isaac J. Manjarres
103eb3b3d9 arm64: defconfig: Enable CMA debug configs on Lahaina
Enable CMA_DEBUGFS and CMA_DEBUG on Lahaina debug builds to collect
information about CMA statistics/allocation times through
DEBUGFS.

Change-Id: Iae10513210c85ad32101720b9ee57ac5fe49d6fb
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-16 13:16:38 -08:00
Isaac J. Manjarres
8d0b09d4f2 Revert "mm: cma: make writeable CMA debugfs optional"
This reverts commit 099c0c9a64.
CONFIG_CMA_DEBUGFS is only enabled in debug builds on 5.4+
and the purpose of this commit is to disallow CMA allocations
through debugfs on production builds. Since, this is no longer
possible, revert this change.

Change-Id: If1f322533660bfc7609fb09a5b13ff2ecbbe3135
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-01-16 13:16:30 -08:00
Jordan Crouse
01882490f0 ion: Make MSM pool auto refill built-in only
When built as a module, msm_ion_heaps.ko is missing the following
generic unexported symbols:

  ERROR: "__next_zones_zonelist" [drivers/staging/android/ion/heaps/msm_ion_heaps.ko] undefined!
  ERROR: "zone_watermark_ok_safe" [drivers/staging/android/ion/heaps/msm_ion_heaps.ko] undefined!

Make ION_POOL_AUTO_REFILL depend on ION_MSM_HEAPS=y which should make
sure that the symbols are only used when the driver is built in.

Change-Id: Ic0dedbadc048743b9f92070af97ef2656e78a0ab
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2020-01-16 13:48:12 -07:00
Konstantin Dorfman
39778e8bb7 soc: qcom: Add module dependence for spss_utils
The spss_utils driver has a functional dependence on subsys-pil-tz module.
When subsys-pil-tz module not yet registered into PIL framework, need to
defer spss_utils probe.

Also redundant input parameters sanity checks are removed.

Change-Id: I48a934b0477d5d781c041243cc8b28dacd343375
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
2020-01-16 21:22:35 +02:00
qctecmdr
059aa413d9 Merge "soc: pil: Disable error-ready timeout" 2020-01-16 10:53:39 -08:00
qctecmdr
bbf404ed4b Merge "defconfig: Enable DCC driver for GKI" 2020-01-16 10:53:39 -08:00
qctecmdr
3be4bf9d9b Merge "Revert "defconfig: lahaina: Enable QRNG driver"" 2020-01-16 10:53:38 -08:00