Invert the bit clock for afe tdm ports for msm8996 to
align the lpass and ext codec hw clock and avoid
bit corruption.
Change-Id: Ic36ab733b227a34ebb8401dd11e99f943b0c8839
Signed-off-by: Derek Chen <chenche@codeaurora.org>
CRs-fixed: 973480
This change set default value for uninitialized variables,
to address errors related to them.
Change-Id: Idd306cafa4dfca322945ea8398e0c4d6c18d6ff6
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Adding default case to handle other events which might be triggered from
modem and adsp schdule free_resource work item when already it has been
freed.
Change-Id: Ibe6a8eae31d70e80fada3a1fc18f8f2bee42dbda
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Fix the wraparound logic when searching for ibs in the ringbuffer.
The ibs can either be type3 or type7 packets so handle both cases.
CRs-Fixed: 971163
Change-Id: I9bc4b4a72cddfe7f3d3892612c6e28861fdd0324
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
APR driver was using SMD as the underlying transport layer. In order
to provide a unified IPC solution, G-link is introduced as the replacement
which APR adapts as the new transport layer for audio packet routing.
Change-Id: I60d96e39ce665b808498d1130e371df8288e370a
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
In speaker protection usecase, if SWR_CH is already
set to 2 due to bootup tone playback then the initial
calibration fails. As the WSA register writes will
fail due to gr_sid will not match with dev_num
and temperature read will return negative value.
To address this, when session teardown reset the
soundwire master channel count in tasha driver.
CRs-Fixed: 961023
Change-Id: I80ee0dedac8fa81ce54a0e61c839a97b9b45d36b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Enable direct programming of GPU-BIMC interface clocks
from kernel driver when moving in and out of TURBO.
This is done only for targets with a device tree
entry defined for GPU-BIMC interface.
This is done because some targets do not support
B/W requirement of GPU at TURBO, for such targets
we need to program the GPU-BIMC interface clocks
with TURBO values to meet the B/W goals.
Change-Id: Ibe82db8718040513ae0d96366195d41001549189
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Introduce new Kconfig for purpose of enabling LPASS
audio driver debugging utilities. Initial utility is
to induce kernel panic upon encountering error from
audio components in ADSP.
CRs-fixed: 968775
Change-Id: I9f802f32892d55be83d4b8a6e861ab09f6336093
Signed-off-by: Patrick Lai <plai@codeaurora.org>
no-map-fixup feature for dma-removed reserve region does a
late memblock remove. This late removal is a slight
deviation from conventional memblock flow. That leads to a
race between pfn_valid->memblock_search, and
memblock_remove.
To fix this, use a read seqlock in memblock_search, which
would ensure minimum overhead in search path. And export
two APIs to let code doing late memblock remove apply
write seqlock. write seqlock would ensure that search
retries if the list is updated concurrently.
The two exported APIs which should be called before
and after modifying memblock regions, late in boot, are
- memblock_region_resize_late_begin
- memblock_region_resize_late_end
The code to alter memblock regions should be guarded by
these APIs.
CRs-fixed: 967728
Change-Id: I6a10c3e980002048aafeaf829a16119848c6a099
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Set the group id to default when number of channels are less
than or equal to one. This change will configure the group
id correctly during device switch scenarios.
CRs-Fixed: 961023
Change-Id: I2cb4447b36fef111ed1f9b8991b3882b8d57f6a7
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Do session/stream node destroy with lock before
reducing opn_idx to avoid conflicts while closing
node and mutex getting destroyed while other node
still holds it, Also trigger the stream delete to
backend for nodes which are only created by HAL.
CRs-Fixed: 971839
Change-Id: Iefc1132e5790d8f7ba025ee140e536a2b3ca21c0
Signed-off-by: Hariram Purushothaman <hariramp@codeaurora.org>
Return early if the branch clock does not need the rate
aggregation support. Only take the common branch_clk_lock
when needed; doing so unnecessarily will lead to lock
contention in some cases.
CRs-Fixed: 972426
Change-Id: I00476d1c193df025a1da19aa0d0ddf0f0462b4d0
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Correct the settings to switch to always-on clock source
during certain LPM mode exit paths on msm8996 Pro.
CRs-Fixed: 972298
Change-Id: Ice256b453fad07bc80be79d9c15d10545c90fb20
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add a new cmdbatch profiling flag that populates the seconds
and nanosecond fields of the cmdbatch structure with the time
since boot instead of the wall time.
CRs-Fixed: 968114
Change-Id: I4e752d5237a74192b3ea9cc125c11bae574c1b36
Signed-off-by: Jonathan Wicks <jwicks@codeaurora.org>
Update hx8394f's initialization sequence, which modifies
its gamma value to standard 2.2. We need tuning panel gamma
to 2.2 as per display standard, this is panel specific
optimization that comes from vendor.
Change-Id: I1c032b39cff20c8f7741a8da0e9a2f3aeb1520dd
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This patch adds support for SSM driver which is
a framework to which a client can register itself specifying
different attributes and defining various permission levels associated
with different combination of attribute values and mode of the system.
CRs-Fixed: 970190
Change-Id: Ia030ebad56a22ba9103af17f6557c7906b762b76
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Add msm8909 architecture flag to enable support to qualcomm
crypto engine drivers on qce5.0 device.
Change-Id: Ia5cdd033abf3068e91d1240396ce17dc65b9f9c4
Signed-off-by: Brahmaji K <bkomma@codeaurora.org>
Enable OVP irq properly in WLED driver only when WLED state
is changed to ON and ovp_irq support is enabled.
Plus, disable the ovp_irq before dis/enabling the WLED
module by writing to QPNP_WLED_INT_EN_CLR WLED register.
CRs-fixed: 969344
Change-Id: I75fa040c6e6f0e6ee40ec3e931c654f2c27ffcaf
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Change L2 GDHS flag passing to TZ to trigger L2 gdhs mode
on non-psci targets.
Change-Id: I0d4fed45fa8afa6c9a73661b9169c29644169ba4
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
When DMA I/O is performed to or from high memory, an area is allocated
in low memory known as a bounce buffer. When data travels between a
device and high memory, it is first copied through the bounce buffer.
Systems with a large amount of high memory and intense I/O activity
can create a large number of bounce buffers that can cause memory
shortage problems.
In general, when communicating to SPI framework,it's recommended to
use gfp_dma,since the buffer mm client passes is used by the spi
driver for dma ops.
CRs-Fixed: 967770
Change-Id: Idd7e0229d1a128516298ee18bf2c798e6218c71b
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
While parsing the device tree node, perform a null check
along with the error check by substituting IS_ERR with
IS_ERR_OR_NULL on the parser pointer.
CRs-Fixed: 971705
Change-Id: Id91981be0cdc135099b8e3d9866549268ab237a3
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
The splash screen for HDMI as primary utilizes a piece of memory
to hold and subsequently display the splash logo while in the
bootloader. We need to reserve the same splash memory buffer
in order to support continuous splash screen on msm8996 target,
when the device is booting into the kernel. This memory is
cleaned up later once display driver hand-off is completed
and the framework has booted up.
Change-Id: I59a5dcf05ef0effcf31cb03979c4464394d68896
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Due to an issue with the RBBM perf counter being corrupted after
NAP state, force turn on the gfx3d_clk peripheral memory at probe
and leave it enabled.
CRs-Fixed: 933216
Change-Id: I707b44c56e5e6d3ec9056dded9fe488163be276c
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
The clock ramp controller helps in mitigating PDN droop during
low power use cases. Add the sequence to enable it in the clock
driver.
CRs-Fixed: 942848
Change-Id: Ia9afcd6492ddb38e3371a469c15ea07143c3c358
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
This reverts commit 099e839e730b89630404bfc9a375049ac01b8f93 ("ASoC:
wcd-mbhc: Fix plug removal detection from extension cable")'.
Headset insertion is giving spurious electrical insertion removal
interrupts. Hence headset is not detected properly. This is seen on
RCM devices for normal US headset on 8937/msmgold/msmtitanium. On MTP
some specific headsets are exhibiting this behavior.
Change-Id: Ida016cc29950dabcaaf6bfc1b751e77e3cccd20c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
To improve the wlan throughput add power management quality
of service support in cnss sdio platform driver. The cnss sdio
platform driver export PM QoS API to wlan host driver.
CRs-Fixed: 970872
Change-Id: Idcea4cde74b280b26706be1bd88b822de80c0ff3
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
If any of the Graphics rendering threads are running
on masked CPUs, avoid L2PC for some duration on that
CPU. This reduces latency on CPU (latency mainly
because of L2 cache flush) and helps on performance.
This change uses pm_qos_update_request_timeout() API.
Add l2pc-cpu-mask property in device tree to enable
this.
CRs-Fixed: 962598
Change-Id: If90090cd2c68ea7c07e269723931fef7201ef136
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Memshare driver allocates and share the memory with the clients
sitting on modem so that they can use it. Add device tree
information for memshare driver for msm8996.
CRs-Fixed: 970173
Change-Id: Ib93a9d60fc4a22f0755cecb6ff3ea8e2457d2d28
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
This patch adds support for the hyp call to set up permissions
for the memory allocated for the modem clients.
This patch also identifies the debug messages with memshare
driver.
CRs-Fixed: 970173
Change-Id: I862a3c21eb4f791d5c7d93d4fb523bf8714c20cb
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
The ULONG_MAX value on 32 bit compilers is +4,294,967,295 and when divided
with some high frequencies, it could lead to min_div > max_div. Thus
resulting in clk_set_rate failure for higher frequencies.
CRs-Fixed: 971371
Change-Id: Id982328aeadf24d29e295e042a57453ea4e35c1b
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add GPU frequency and bandwidth support for MSM8996pro.
CRs-Fixed: 967494
Change-Id: I8c754d23abeb5b496e62a9cf2c574afcfbd091ed
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
The memory size of a slot in the prealloc table should be order of 2,
otherwise some memory will be wasted since kernel only allocates
contiguous physical memory in pages by order of 2.
Change-Id: I762ad490d300f8b622a3ed1f9ccbe2af2d926c49
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Currently the driver gives a memory slot only if its size is greater
than the memory requested by the caller. This will waste a bigger slot
if the memory requested is equal to the slot size. Hence fix it by
adding the equal check when a memory slot is requested.
Change-Id: Ib48477607e9332c8942894301ead606a31fa3284
Signed-off-by: Yue Ma <yuem@codeaurora.org>
fix version of MSM8996pro to V1
CRs-Fixed: 971276
Change-Id: Id5392aeffeab557f5141f4efd0e8b55bbfe63127
Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
Remove additional delay after poll.
Delay in ms is acounted during polling the register.
If read is successful and match fails,
then poll is non-fatal.
CRs-Fixed: 971014
Change-Id: I655a272bed125edc2dc60504640f1d57652a64e2
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Fix NULL pointer check while setting group ID to avoid
dereferening of the pointer.
CRs-Fixed: 971240
Change-Id: Ic5aae901244e7b2b96a894d265a6cc5c119f0367
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Remove the over-rides in place for the clock drivers in order
to enable them on RUMI for MSMCOBALT.
CRs-Fixed: 971162
Change-Id: I5a0e1b8e74f70cadf303694c4c279dd9224e8ec7
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Don't redefine the macro since that could result in inconsistent
data if one of them changes and the isn't updated.
CRs-Fixed: 971159
Change-Id: I57ab3113fbdd82c70cba1c79f4b996cea09a8739
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
CP_QUEUE_THRESHOLDS is only used in A3XX. Move the register setting
out of common ringbuffer initialization and into A3XX specific region.
CRs-Fixed: 971153
Change-Id: I05ef504a802534f1582e62085c5b12b20ac57209
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Ensure that all the logs that can be triggered from the
interrupt handler are rate limited.
CRs-Fixed: 971145
Change-Id: I9fe4a6b28be0dc6299467fb8402bef3694aeac76
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Remove enabling of interrupts in lpm_cpuidle_select in case of
no low power mode selected as it is taken care in cpuidle_idle_call.
Change-Id: Id9fabe6116908b4c64bd6659d02252684db10958
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
Use recommended ab and ib settings for isp to ensure
isp requests required bandwidth
CRs-Fixed: 943154
Change-Id: I871854e059963bf64665201fb9ea7d99861ebe8c
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
In preparation to add more debugging hooks to LPASS driver, convert
adsp error code and string conversion functions to C source file.
CRs-fixed: 968775
Change-Id: Ic074a318ede4188a8fd603efddce71ed820ee560
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
The start offset for protected mode ranges needs to be aligned with
the block size. 0xE87 is not aligned with 16 (1 << 4). The hardware
assumes alignment internally so it turns out that 0xE80 - 0xE8F is
the range that gets protected. Luckily for us that this is the range
we want protected so nothing critical has been left unprotected, but
the software should reflect the hardware to prevent incorrect
assumptions.
CRs-Fixed: 968713
Change-Id: Ic0dedbad6ec7be5cc473afbbc52655663ea65159
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
In the LLM sleep sequence, the IDLE_FULL_LM bit (0) needs to be set
to force the children to sleep. Also, after the first child is
put to sleep, we need to wait for the idle acknowledgment before
taking the next child down.
In the wake sequence, poll until WAKEUP_ACK is 1 *and* IDLE_FULL_ACK
is 0 to ensure that the wake sequence was successful.
CRs-Fixed: 970270
Change-Id: Ic0dedbadfca1e0882d84965d634166f921f1e630
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
The current MMU code assumes a binary state - either there is a
IOMMU or there isn't. This precludes other memory models and
makes for a lot of inherent IOMMU knowledge in the generic MMU
code and the rest of the driver. Reorganize and cleanup the
MMU and IOMMU code:
* Add a Kconfig boolean dependent on ARM and/or MSM SMMU support.
* Make "nommu" mode an actual MMU subtype and figure out available
MMU subtypes at probe time.
* Move IOMMU device tree parsing to the IOMMU code.
* Move the MMU subtype private structures into struct kgsl_mmu.
* Move adreno_iommu specific functions out of other generic
adreno code.
* Move A4XX specific preemption code out of the ringbuffer code.
CRs-Fixed: 970264
Change-Id: Ic0dedbad1293a1d129b7c4ed1105d684ca84d97f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Add support for SENARY_MI2S_TX port to enable FBSP.
This port is configured to send VI feedback data from
WSA to ADSP during FBSP.
Change-Id: I4fb1beb7bfedbe513ba43a69e67fbcc815d34595
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
early_init_dt_alloc_reserved_memory_arch passes end as 0 to
__memblock_alloc_base, when limits are not specified. But
__memblock_alloc_base takes end value of 0 as MEMBLOCK_ALLOC_ACCESSIBLE
and limits the end to memblock.current_limit. This results in regions
never being placed in HIGHMEM area, for e.g. CMA.
Let __memblock_alloc_base allocate from anywhere in memory if limits are
not specified.
Change-Id: Ifca54781b4b2ae2ccd0a3d414a488c8888d4472f
CRs-fixed: 969426
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Fix the incorrect mask/shift values specified for 'dtest-sel'
debugfs entry.
Also, add a special handling to enable/disable dtest-sel via
debugfs.
echo 0 > /d/qpnp_pin/pm8xxx_gpio/dtest-sel to disable DTEST
echo 1...4 > /d/qpnp_pin/pm8xxx_gpio/dtest-sel to enable and select DTEST
CRs-Fixed: 970023
Change-Id: I51e9af5d71bbf8b9b9023f6f3d747550e0fab0fa
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>