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>
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>
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>
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>
This reverts commit Ida5128ae0ed9335be17ea220d6d26a386d35ac02.
PM QOS feature is moved to qcacld driver.
Change-Id: Ia6181b90b462ce1e1dd02e3f9e01746e566c88af
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
Instead, use the pwr->icc_path as both are for gpu ddr
voting.
Change-Id: I0f2b1e49dde9433ee062bbf71d7197d8e2ea7a83
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
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>
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>
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>
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>
Correct the offset to read accumulated sleep length.
Change-Id: I7b05c85cb1664762781dfd6bd1917708e276f429
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>