Existing solution to reserve the memory region for CNSS ramdump
collection has it's own limitations because of reserving the
memory region for each platforms even before CNSS driver is
probed. Add implementation to allocate the required memory for
CNSS ramdump using dma_alloc_coherent API and update the physical
address in dump table so that tools can find the starting address
of the CNSS ramdump in the crash dump.
Change-Id: I9fb3d77fdd35de54ca2a7a27d4a55bd12049311f
Signed-off-by: Komal Seelam <kseelam@codeaurora.org>
CRs-Fixed: 957203
Prevent gdsc code from modifying the MDSS memory retention
and PERIPH ON and OFF bits on msm8996.
Change-Id: I020ab27336227a2ad8577ff882defa517bde8464
Signed-off-by: Ping Li <pingli@codeaurora.org>
Add snapshot of the batterydata-interface files from msm-3.10, this
is required for qpnp-vmbms module.
(msm-3.10 commit - 7704c94d47f8ed7cc81e487ab9d576ef52e0f1e5)
Change-Id: I322774879dec5856443c90280f7eb8b1b7f07798
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
A freemem list entry maybe truncated/deleted even if it doesn't
overlap with a new buffer, for example, if the new buffer is entirely
to the left or right of the entry. Fix the conditional logic so
that an entry may be truncated/deleted only if it overlaps with
the new buffer.
Change-Id: Ib1519f20d3b56c1e0ed36e9e0afb33c1b31d6166
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
For the case when newly allocated gpuaddr falls between
a memfree entry's gpuaddr and size, the size of the mem
entry was being truncated to a negative value. Fix
the math to reflect the truncated size correctly.
Change-Id: Id39519acc2af106240db8f41539b9fd1dc0cb0eb
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
All the mem entries were being written to a single location hence
the snapshot consisted of only the last mem entry of the process.
Fix this by writing each mem entry to consecutive location in the
snapshot.
Change-Id: I1971fc4b3adce3146768862a56db2b11c6ac44c4
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Update MSM8996 HS UART interrupt mapping as needed based on
GICv3 ITS changes.
Change-Id: I3cba4522249dab94b4d94b89880b4edcd1803f06
Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
current avtimer ioctl uses deprecated logic to query
avtimer. Use the updated API to query avtimer to avoid
wrong timestamp values when query using ioctl interface.
Change-Id: I16e4373226903b6121c911ed9f2ca31851de80e5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
There are extra EOT packages sent by r69006 panel, so its
output does not match what DSI host expects. Ignore EOT
in the end of transmission.
Change-Id: I50ac96dbc92ab0062f403af0ebbe052a966f0671
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
We call msm_iommu_bus_register only when legacy
msm iommu driver is enabled. If for some reason
the driver is disabled, we never register our
dummy bus msm_iommu_non_sec_bus_type. So, we might
end up with NULL pointer exception if clients try
to call iommu_present with this dummy bus.
Put a NULL pointer check to ensure we don't end
up crashing system if legacy driver is disabled.
Change-Id: I7122e3355459e5115d639a8c1aab547bf0fc7f6e
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
_gpu_find_svm() makes a BUG_ON if the returned address is
greater than ULONG_MAX.
But in 32bit kernel, Error conditions would also make the
comparison to be true. Because it compares address or
error in unit64_t with ULONG_MAX which is in 32bit.
Check whether returned address is an error before making the BUG_ON.
Change-Id: I482b330db3e06a1bee31dd6931faf239a61f9ab8
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
Disable the regulator vote on CX only if there is failure,
also check if the regulator handle is valid.
Change-Id: I8cbb8aad3c99d0a619dfeb2f68873c39316f0158
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
BUG: KASAN: global-out-of-bounds in dyna_alpha_pll_enable+0x1a8/0x450 at
addr ffffffc003412ee0
Read of size 8 by task surfaceflinger/548
page:ffffffba45a3cc60 count:1 mapcount:0 mapping: (null) index:0x0
flags: 0x400(reserved)
page dumped because: kasan: bad access detected
Address belongs to variable p_vco_8937+0x20/0x40
Call trace:
Memory state around the buggy address:
ffffffc003412d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffc003412e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffc003412e80: 00 00 00 00 fa fa fa fa 00 00 00 fa fa fa fa fa
^
ffffffc003412f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffc003412f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
==================================================================
When slewing is enabled the expectation is the vco will operate in the same
vco mode. The calibrated frequency should use only index '0'.
Change-Id: I1fdcb7d8c09b4f7ff41a1c1a9b36351a6c808c47
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The GPU core on MSM TITANIUM can be powered by an internal
MSM (on-die) LDO or BHS. Typically the lower voltage corners
are powered by the LDO and the higher corners by BHS. Add
support to configure the LDO and hand-off between LDO and BHS.
Change-Id: Id13b6b601c91aa6c2c2f0e6d820a244144b60437
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Currently, there is a possibility of double freeing the
buffer in memory device mode. This patch protects the
buffer properly and also does the required cleanup once
buffer will be freed.
Change-Id: Ia016884bff4d41f2f8c59a547bd00a862c477e01
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
If low-power mode is not entered due to timeout, it is possible that
HW has actually been turned off by ADSP but the response was not
received by driver on apps on time.
Change device state to sleep to make sure HW is woken up for
subsequent runtime-resume operation.
Change-Id: I4e454f7e90e1244985c86286b95202eecfc50a7e
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
For RPM messages that dont require to be waited on, when an ACK is
received, there are no drivers waiting on it. So the element never
gets freed resulting in a memory leak.
Change-Id: I5cce36750e0acfa66b3d23a770986bd1de20601c
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
When a system is entering RPM assisted sleep, the NOACK messages are not
accounted in preventing such sleep modes as no driver is waiting on it. In
such scenarios, some active messages could still be in the Apps RX buffer
which reduces the number of outstanding sleep messages.
Fix by accounting for NOACK messages while flushing sleep set requests and
ensuring that they are read before sending any Sleep set requests.
Change-Id: I804cd923b88809b9d638756d934403914b5feff5
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
As per hardware specifications register read
cannot be done upon setting GDRC register
with HW_CONTROL. This change will set
GDRC register with HW_CONTROL after
firmware load to ensure that HW version
returns correct value
CRs-Fixed: 950485
Change-Id: Ia08a14f9f05cd410140cf01c26b41d3afba94513
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
The PLL hardware configuration does not mandate to modify the test control
bits of the PLL, in those cases introduce a flag which when present will
skip configuration of the test control bits.
Change-Id: I70588398cffae193d56cb510faa19b1f96f05fea
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The current implementation would check for the parent rate and decide the
handoff state of the clock, which is not true for mux clocks. With this
logic the function returns 'enabled' even when the clock downstream of this
clock is disabled. The handoff code will unnecessarily enable the current
parent of this clock.
If this function always returns 'disabled' and a clock downstream is on,
the clock handoff code will bump up the ref count for this clock and its
current parent as necessary. The clocks without an actual HW gate can
always return handoff disabled.
Change-Id: I1f06842e2761b336b49a9390a556064de44f2e36
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Currently, whenever a peripheral is going down, diag
driver is not updating the peripheral status correctly
which leads to wrong result. This patch fixes this issue.
Change-Id: I59065cff4b1a1521d321422e427762bd2661be12
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
As per the hardware documentation, PON device of PMK8001 should
be configured when the system goes for a reset. Enable it so
that it can be configured in a similar way when the primary PON
device is configured during system reset.
CRs-Fixed: 953825
Change-Id: Ic10b003b4c2bd9b4c851b616795aacf308200244
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Add 2ms delay after enabling the VAF voltage regulator
for actuator. slave needs time for getting detected after
powerup.
Change-Id: I61e7a779825002c19dcd9d67ce68cbdf6dac2fda
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Add support to log the last 10 instances when the
tsens monitoring threshold test gets to run and
handles completion interrupt or in polling mode.
In addition clear the status before enabling the
interrupt mask for threshold monitoring and reduce
the timed wait completion during polling mode.
Change-Id: I75a376b209f15d33cdfe3e43806db0f0cf45538e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Make sure the allocated memory is freed before returning.
Change-Id: I6da7d1ffbd83ad206970e38ac99f9da211ffe86c
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Register subsystem device for SSR recovery. Create
ramdump device for cnss fw dump collection. Implement
cnss SSR API to wlan sdio driver.
CRs-Fixed: 944010
Change-Id: If81fd84bb6080df73b12f235a2aa0eff6f717ce1
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
mapping multiple pages on a fault result in page_check_references
hitting more number of referenced inactive pages and this results
in increased pressure on reclaim. Reduce it to the lowest possible
value. Reduced kswapd wakeups are observed with this change.
Change-Id: I03c6cac9f28fa328abab7b40f5f01144084a147c
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
APSS is unable to open apr_voice_svc channel with destination processor
as MODEM. This is due to MODEM is no longer opening that channel, also
none of the clients on apps are using this channel. Hence, don't request
for the SMD channels when the destination is MODEM, but ensure that apr
clients should be able to receive SSR notifications from MODEM subsystem.
Change-Id: I566dd065ccd75956ab8fd594bb94e09b699258dd
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
msm_pcie_pm_control is an exported pcie API to request for
PCIe link suspend/resume for auto suspend feature. The
auto suspend feature now moved to use the runtime pm
framework which is handles the PCIe link suspend/resume as
part of runtime pm callbacks.
Hence removing the unwanted resume call in system resume
callback.
Change-Id: I0e56f228f819eb3a6fc6a0c732b4e5adc0cc82b0
CRs-Fixed: 952659
Signed-off-by: Komal Kumar <kseelam@codeaurora.org>
Audio drivers to configure ADSP MFC in cases where fractional
resampling is needed.
Change-Id: Ifc85ff788347ddd893f8858064f71a07fa1ddd9c
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
Update the PHY sequence of PCIe Endpoint mode to support L1ss.
Change-Id: Ib80a2fab167e232540240183387a441d246463a5
Signed-off-by: Yan He <yanhe@codeaurora.org>
Enable FP and SIMD settings for the MSM8996 during the execution
of the AArch32 processes and disable these settings when you switch
to the AArch64 processes.
This commit also adds CONFIG_ENABLE_FP_SIMD_SETTINGS to support
FP and SIMD settings.
CRs-Fixed: 952837
Change-Id: If9537ca7390d8f08a6b48fb8865d1b349a93bcee
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
As anc_mic_found is not initialized, it is taking
input as true and report as ANC Headphone results
in wrong accessory detection. Initialize the flag
to false that fixes the issue.
Change-Id: I1c9912e2ab396a8a0a31065b826d6f92a0603215
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
During normal SSR there is a corner case that somehow WLAN driver fails to
read PCIe configuration space which can result corruption when it tries to
save it. Hence recover PCIe configuration space from shadow registers as
well in normal SSR. This is same as the recovery for real PCIe link down.
Change-Id: I2bae0f2e322829a9689d3a129145b54c079dccdf
CRs-fixed: 886245
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Give upper layers enough time to turn on screen before
falling back into SUSPEND.
Change-Id: I162f25dffdbbeb783d0bca673d6e6db8de412aac
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
This reverts commit c9b3e1ebbeb726a911ac6cf67f9a6386f7fb79ae ("ARM: dts:
msm: remove sync-wait-broadcast from jdi panel"). Sync-wait-broadcast
flag was removed for JDI dual dsi cmd mode panel as there were fps issues
when used along with partial updates which is currently fixed. The flag
is required for mode switch as sending the switch commands individually
during cmd-to-video switch causes flicker issues. Revert this change
to add the flag back as it is needed for mode switch.
Change-Id: I5b86d293aea7905b115621df1eab3e6f8aece966
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Add the support of MDM2AP GPIO so that MDM can notify AP about
updated status.
Change-Id: Ia5a020898d4d04dcd4fec6b3928aba380663ac56
Signed-off-by: Yan He <yanhe@codeaurora.org>
Add the support to generate both PCIe PARF based MSI generation
and iATU based address write MSI generation for unit test.
Change-Id: I8c5abf8dcae4ebf2c33fee182f6bc147979f74dd
Signed-off-by: Yan He <yanhe@codeaurora.org>
During SSR, all channels are removed and ports are disconnected since
slimbus HW is not functional. Return success to clients for such
calls so that client can mark channel/port state constistent with HW
Change-Id: I9b18f8e7ffe233090c9612d0811a7d36645d0329
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Add appropriate entries to support HDMI
on msm8996 Fluid.
Change-Id: I2000744eb0cb3d6d5c402d17a05f55ff55c43707
Signed-off-by: Bruce Levy <blevy@codeaurora.org>
Runtime-pm autosuspend delay is set to 1 second. This
long period is used to avoid thrashing due to long time
it takes for bus-pm voting. The period is reduced to a
quarter to optimize power. This number is tested for
trade-off between power and performance.
Change-Id: I973495e23852f1caefb981b1d8f26da5f09ca7bc
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
After subsystem restart is completed, driver will try to restore the
internal clock state to state before subsystem restart. In some cases,
it is possible that the internal clock state is not restored properly.
This causes the internal clock to be off when it is expected to be
turned on. Fix this issue by making sure the clock states are restored
correctly post subsystem restart.
CRs-fixed: 948899
Change-Id: I0084287b2d3b62c7498bae423952e64dd0d6e0f4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Set up the execution environment before PCIe link training to
provide better adaptability to various hosts.
Change-Id: I72721d3b88a7e5b1a0a1f408da2228391559468e
Signed-off-by: Yan He <yanhe@codeaurora.org>
The PCIe clients will utilize the original MSI address instead of
mapped local address when active config is enabled. The change here
provides the original address to the clients.
Change-Id: I0d35fa9508d7c3ec2e97bd7d61754974e798bf8a
Signed-off-by: Yan He <yanhe@codeaurora.org>