Table (of type msm_dump_table) is virtual address for app's base
table of memdump, which is converted to physical address and
holds it in the memdump.table_phys. This memory is not intended
to be freed. When kmemleak scans, it can't deduce that the reference
we are holding is via physical address and not virtual address.
Hence, kmemleak will treat this as a leak as it can't find
a reference to this variable. Suppress this by using
kmemleak_not_leak API.
Change-Id: I5236c940688829a3b5f255c5ee9fcf309cf8ebb7
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Add the clock controller files for GCC/GPU/MMSS and modify the clock
macro names for blsp clock MSMfalcon.
Change-Id: Iaed16dbb3415a77f427ad7318017487acb7891a3
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add all the clocks which are supported on msmfalcon and would be used
by the clients for all clock operations for GCC, MMSS, GPU clock
controllers.
Change-Id: Ie328cb0516644d8a3d66fd0c054575a5cff637dc
Signed-off-by: Taniya Das <tdas@codeaurora.org>
There is limitation when IPA is performing de/aggregation with MBIM
in scatter-gather mode. Hence instead of 2KB buffer use 16KB buffer
(i.e. size of aggregated frame) with each TRB for MBIM DL case.
CRs-Fixed: 1032467
Change-Id: I4f73d30711b5606c2ac88ce9d05a8483d64b665d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Use existing IRQ flags definitions since devfreq_spdm driver no longer
overrides interrupt type. Interrupt-edge property is no longer used
as an indicator of interrupt type.
Change-Id: Iddf6b1b8a85100bbb3b6ff2d2dda88880b6e64f2
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Enables support for USB audio and USB MIDI devices
connected via the USB bus.
Change-Id: I3fa2168b905b5242894ba985b8c615bfbb10492a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
ufs_qcom_print_hw_debug_reg_all() function is having a bug
where it might incorrectly modify undesired bits in UFS_CFG1 register,
this change fixes it.
Change-Id: I2605beeb41f3c319877f48e35723f597f7dfb9da
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Creates a work queue for concurrent writeback to wait and signal
the CWB retire fence on WB done interrupt.
Change-Id: I169e3df1a68616be93377defdc30e3c326aff79f
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
S10A and S13A regulators are not needed since APC voltage rails are
controlled by CPRh.
All of the PM8005 regulators have been defined properly as SPMI
regulators in msm-pm8005.dtsi
CRs-Fixed: 1025447
Change-Id: I2a93ffe3b5ce17a09ce836ef00f40c38678b9796
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Remove bimc_clk references from GNOC as there is no resource associated
with GNOC.
Change-Id: Id038f13305c765336c85444f1064d38a0a61c9a2
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Enable SPDM governer and SCM call through Hypervisor support.
CRs-Fixed: 1025515
Change-Id: I911f84a44229b84491ea5b78e1ed2d8181b2c804
Signed-off-by: David Dai <daidavid1@codeaurora.org>
When ICE is used and there was an error during endio, the error was
not propagated properly to upper layers, fixed.
Change-Id: I5c428e4a02f7012f95e3a32486920e69b93ea3fc
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
init_cpu_topology has a bug where
1. It's referring to out of bounds array.
2. It's not actually resetting topology for each cpu.
Fix this by iterating for each cpu for resetting topology.
Change-Id: I4df03fb4fbe9cb636f135de982e35173b1900ec2
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Add support in Kconfig for msmfalcon chipset 32-bit platform.
Change-Id: I5509787b16e7837c674203a3a900159f449b14a6
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Normally, it takes few msec for SPSS to responde with ACK for TX data.
However, due to SPSS HW issue, the SPSS might disable interrupts
for a very long time, and not ACK for the data.
Change-Id: I88a0b7a0637fb62d62ac760e9a8a946a5888d406
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Enable CONFIG_MSM_ADSP_LOADER in order to enable
ADSP PIL loading during bootup.
Change-Id: I0d8a15283ec43bdf0818c4d9cbe92ac4474cb833
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
This makes it possible for drivers to use a longer, more descriptive
name for a sync_timeline, which improves the readability of the
sync dump in debugfs.
Change-Id: Ifb83aebf6fd820ebb26aca2ff230ac1116e65ce9
Git-commit: cb63e61b80ec905f01cbe1c21081aa0d1fef082d
Git-repo: https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Omprakash Dhyade <odhyade@codeaurora.org>
Remove default panic error when no aggregation scheme is selected,
this is to support virtual fabrics that have no clocks or bandwidth
to aggregate.
Change-Id: I4fd8977845dd123890afc5076cd55499992e488e
Signed-off-by: David Dai <daidavid1@codeaurora.org>
There's a stray #define left over from initial development of the fast
map feature. Rip it out.
CRs-Fixed: 1035430
Change-Id: Iae0649dc3fe878f948ad872803317eb4bf7ec1c6
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
nt35597 panel ESD detection is required in msmcobalt and this is
to enable the ESD detection support based on BTA method.
CRs-Fixed: 1035341
Change-Id: I4e1b47a1422e454a919352c75a2fd5921c98a443
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Panel ESD detection supports few different methods, and should determine
the detection mode before checking the correct DT value. This change
make sure BTA and TE detection mode does not need to care for REG read
DT settings.
CRs-Fixed: 1035341
Change-Id: Ib3070f739571fa73684a9c88c35d9af42bca9850
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Enable dev_freq SPDM support in order to increase BIMC
vote based on bus rejection rate. Make cci_clk an optional
property as it's not always a relevant indicator of cpu performance.
CRs-Fixed: 1025515
Change-Id: I713cc396c8d563735981547e0dc18a63f6f15180
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Per Process Reclaim tries to avoid reclaiming of
shared pages by passing the target VMA. For anon and
file pages this works, but not for KSM. This is because
vma_address(page) will not return the intended value
resulting in crashes like this
[From 3.10 kernel]
kernel BUG at kernel/mm/rmap.c:534!
(vma_address+0x28/0x2c) from [<c01eff94>] (try_to_unmap_ksm+0x4c/0x170)
(try_to_unmap_ksm+0x4c/0x170) from [<c01e4834>] (try_to_unmap+0x34/0xa4)
(try_to_unmap+0x34/0xa4) from [<c01c8e64>] (shrink_page_list+0x3f0/0xa34)
(shrink_page_list+0x3f0/0xa34) from [<c01c9688>] (reclaim_pages_from_list)
(reclaim_pages_from_list+0xb0/0x100) from [<c0240ed0>] (reclaim_pte_range)
(reclaim_pte_range+0xf0/0x164) from [<c01e79a4>] (walk_page_range+0x1d0)
(walk_page_range+0x1d0/0x260) from [<c0241ccc>] (reclaim_task_anon+0xb0)
(reclaim_task_anon+0xb0/0x114) from [<c01f8d98>] (swap_fn+0x220/0x460)
(swap_fn+0x220/0x460) from [<c0133a38>] (process_one_work+0x294/0x430)
(process_one_work+0x294/0x430) from [<c0134720>] (worker_thread)
(worker_thread+0x224/0x358) from [<c01390d4>] (kthread+0xa0/0xac)
(kthread+0xa0/0xac) from [<c0105f38>] (ret_from_fork+0x14/0x3c)
CRs-Fixed: 984947
Change-Id: I5208fb68372f7af72868e39399bf545fb7b774f3
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
It is observed that in some cases process reclaim work
doesn't get chance to run due to presence of RT scheduled
on the same CPU. This is leading to user space freeze and
a live-lock situation where RT itself is looping for a
page to be present in swap cache while process reclaim
work is unable to schedule and do the same.
Schedule process reclaim work on unbounded cpu workqueue
so that the work has opportunity to be scheduled on to
other cpu.
Change-Id: I6852f7e8d0a344ab5631b188627263f11414f27e
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
swap_fn iterates through the threads of selected tasks after
a rcu_read_unlock which is wrong. But we can't extend the
rcu_read_lock since it will result in severe performance
issues. So better avoid iterating over the threads. Just
lock the group leader and use it further.
Change-Id: I36269b1b6619315f33f6f3b49ec73571a66796f2
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
The logic used to skip reclaim on low efficiency results
in process reclaim not triggering at all. Fix it by
properly handling the skip_reclaim atomic variable.
Change-Id: I119097bb9b1baf8f3e8d4afa0a6dc2c30c0de6e7
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
With this patch, anon pages of inactive tasks can be reclaimed,
depending on memory pressure. Memory pressure is detected
using vmpressure events. 'N' best tasks in terms of anon
size is selected and pages proportional to their tasksize
is reclaimed. The total number of pages reclaimed at each
run of the swap work, can be tuned from userspace, the
default being SWAP_CLUSTER_MAX * 32.
The patch also adds tracepoints to debug and tune the
feature.
echo 1 > /sys/module/process_reclaim/parameters/enable_process_reclaim
to enable the feature.
echo <pages> > /sys/module/process_reclaim/parameters/per_swap_size,
to set the number of pages reclaimed in each scan.
/sys/module/process_reclaim/parameters/reclaim_avg_efficiency, provides
the average efficiency (scan to reclaim ratio) of the algorithm.
/sys/module/process_reclaim/parameters/swap_eff_win, to set the window
period (in unit of number of times reclaim is triggered) to detect
low efficiency runs.
/sys/module/process_reclaim/parameters/swap_opt_eff, to set the optimal
efficiency threshold for low efficiency detection.
Change-Id: I895986f10c997d1715761eaaadc4bbbee60db9d2
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
dm-req-crypt based devices are capable of supporting discard option.
DM layer by default does not enable discard option for DM devices.
Since underlying device supports discard option, mapped target should
also allow it.
Change-Id: Ia540a814c3dcd91f573d1f25d637107a48309a58
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
Backend DAIs are not enabled for low-latency-record
bt-sco. Update mixer control array of MultiMedia5
mixer to enable backend DAIs.
CRs-Fixed: 1029460
Change-Id: I8e01302baf2d78afca930ef1f251906a971a8234
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
This driver handles the Inter-Processor Communication(IPC) Interrupt(IRQ)
from remote subsystems directed towards Qualcomm Technologies, Inc. Secure
Execution Environment(QSEE) and notifies the QSEE listeners waiting in
the userspace.
CRs-Fixed: 1021749
Change-Id: Id0cab5773099e2f6267f8a5bd4fd5aeb3324e68b
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
The TLMM IRQ numbers were set incorrectly. This can prevent the UART
peer devices from waking up the core from sleep.
Change-Id: I11e725ac31f78f838ac9b8e1e08c384d11ea14a6
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
GPU will vote off gcc_gpu_iref_clk when going to low power modes.
CRs-Fixed: 1024948
Change-Id: I13b7a70f1fa748f2f4cdfb485dda2f7857e0b3d2
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
It is to be ensured that venus is in power on state before scaling
clocks. When venus goes to power collapse, a resume can happen
either when driver writes some command to the command queue or any
response comes from firmware. So when client requests a particular
perf_level, venus is not resumed and scale clocks is called.
CRs-Fixed: 1000809
Change-Id: I2ac46c481065ada2b62a5eb248fbdf18f2b1a91f
Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
msm_comm_kill_session is called in driver only in situations where
the driver state goes bad. session_abort is called on firmware
which may be honored. But still the session_error needs to be
communicated to the client or else client will operate oblivious
about the bad video driver state.
Change-Id: Iafb90cde31a985bf5377fdcdd1a9653a965c5600
Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
After reclaiming vmalloc and adjusting lowmem, the two
regions are no longer contiguous. Update the messages
printed during bootup to list all regions corresponding
to low memory and vmalloc respectively.
Change-Id: Ib3e25b530b3dfbd1f9796cdc580fb79da484e850
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
The unused virtual address space in low memory is given to
vmalloc for use. This reduces the low memory space and
increases vmalloc space. Adjust the vmalloc_min in order
to increase the low memory.
Change-Id: I0dbef5b6e5ec3d19f5f93f06ed03a4cf1215dc4d
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
If KTM get a trip threshold trigger notification and if the
temperature stays the same as the recent trip threshold, KTM will
re-activate the recently triggered threshold, resulting in back to
back interrupts. To avoid this add support in KTM to maintain the
recently triggered threshold state and then re-active the threshold
based on the last threshold trip.
This state is updated for mitigation features like VDD MX retention,
CX phase control, VDD restriction, OCR monitor and external clients
like CPR low temperature monitor etc.
CRs-Fixed: 969112 972634
Change-Id: I44c0a93e1507a9f0b8a65e5c2ce5a98962bb335b
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Deep nap timer value was not calculated right when read from dts file.
CRs-Fixed: 973565
Change-Id: I11a70c61d408921edd89b1417b209c5c5a3ddf24
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
When stop the RDI stream, the wait flag should not be set to true if we
are halting the system. In the new logic, the halt will cause the system
timeout due to ispif might be stopped.
The change will stop the RDI without waiting if the VFE will be halted.
CRs-fixed: 991080
Change-Id: Ia0a7512006c1eeb15deb10b87aaff5668a7b5ef2
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This change fixes a framedrop issue due to unsynced epoch signal.
In dual vfe case, the epoch signal from each VFE might arrived in any
order. Since reset the framedrop pattern for both VFE is done in the
epocch signal, we need to align this action with the last vfe epoch
signal. The current implementation is to do the reset always on the
vfe1 signal, this has led to incorrect framedrop pattern reset which
cause the framedrop pattern out of sync between two VFEs.
This change aligns this action with the latest epoch signal so split
will not happen.
CRs-fixed: 991080
Change-Id: I20a911fd8cec9e36e6867fa19428513f36054a8a
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add support to increase UB size to 48K and also change
burst length for MSM8917 as per HW specifications.
Change-Id: I086aa920fb93524aa2bf8a740514a3012cd5f8a0
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
The GPU clocks on msm8996 have three dedicated PLLs, MMPLL2,
MMPLL8, and MMPLL9. We leave MMPLL9 at the maximum speed (624
MHz), and we use MMPLL2 and MMPLL8 for the other frequencies. To
make switching frequencies faster, we ping-pong between MMPLL2
and MMPLL8 when we're switching between frequencies that aren't
the maximum. Implement custom rcg clk ops for this type of
frequency switching.
Change-Id: Ia71dfc9947f858b485e7c7ea254d6f52de0e7f7d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Some gdscs might be controlled via voting registers and might not
really disable when the kernel intends to disable them (due to other
votes keeping them enabled)
Mark these gdscs with a flag for we do not check/wait on a disable
status for these gdscs within the kernel disable callback.
Also at boot, if these GDSCs are found to be ON, we make sure we
vote for them before we inform the genpd framework about their
status. If genpd gets no users, it then disables (removes the vote)
them as part of genpd_poweroff_unused()
Change-Id: Idd26e1460aea84834cccac15a86adf35681e511e
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Some gdsc power domains can have a gds_hw_controller block inside
to help ensure all slave devices within the power domain are idle
before the gdsc is actually switched off.
This is mainly useful in power domains which host a MMU, in which
case its necessary to make sure there are no outstanding MMU operations
or pending bus transactions before the power domain is turned off.
In gdscs with gds_hw_controller block, its necessary to check the
gds_hw_ctrl status bits instead of the ones in gdscr, to determine
the state of the powerdomain.
While at it, also move away from using jiffies and use ktime APIs
instead for busy looping on status bits.
Change-Id: I9e435ba071a9d1aa67bddc5d2c7cd7b66fb86c58
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add a helper function devm_add_action_or_reset() which will internally
call devm_add_action(). But if devm_add_action() fails then it will
execute the action mentioned and return the error code.
Change-Id: I70562e95e0ef672db7dc9bd9f24d9a3b356bf89c
(cherry picked from commit a3499e9bf0fe ("devm: add helper
devm_add_action_or_reset()")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
This change enables logging of irq number and name which triggered
wake up of the system from deep sleep. This helps in debugging the
spurious wakeups due to interrupts from various subsystems.
CRs-Fixed: 1033023
Change-Id: Ieeec5959475740e2b0cc75871c1f7e10e1098fa4
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
This is a snapshot of drivers/irqchip/msm_show_resume_irq.c as of
msm-3.18 commit <e17a72ad7344065> ("Merge "ARM: dts: mdm: Adjust
memory region peripheral1_mem for MDM9640"").
CRs-Fixed: 1033023
Change-Id: Ia928cf5e23eebc7a0f80638f4be81beec7ed2878
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>