Update msmcobalt machine driver to support S32LE format.
Also add support of 384Khz for USB_AUDIO_RX.
Change-Id: I576bd9c3c776ad5c24a15adf1447a9206dc61b89
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
Add support for 32 bit data format (SNDRV_PCM_FORMAT_S32_LE)
and sampling rate of 384Khz. Also update platform drivers
to use latest version of pcm media format command
ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4.
Change-Id: I6b7ea860a398a7e4dd5f7e23ac3906ff0c6f2b3e
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
Add support for ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4
command. This command adds support to playback/record 32 bit data
in 32 bit word and also provides a way to inform DSP about the
endianness of the data.
Change-Id: I3b013bedde8ccfa97a02e255e237df0cf2de13b8
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
Add support for configurable bit width for AFE encoder.
Add new mixer ctl to set for usecases which enables
configuring different input/output bit format
on AFE for usecases such as APTXHD encoder for 24bit input
and 16bit output.
Change-Id: I62326a097cbd71a3ec2b93a0120284d8f71f5d57
Signed-off-by: Naresh Tanniru <ntanniru@codeaurora.org>
Using %pK instead of %p to hide kernel pointers
based on kptr_restrict.
Change-Id: I065cff2a9e092d74d0e8c35da6551fab3805e83e
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
Add the IOMMU config options that are used for the correct operation of
IOMMU driver on msmfalcon.
Change-Id: Ia6c446eca8a42800e781dfdaf46eab7bd44c126f
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Fix the dangling pointer issues on CoreSight that can cause the kernel
panic.
Change-Id: Ic20405cf2f64c6bc38e994780577b7da42cf6aba
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Add device tree configuration corresponding to all supported ion heaps
for msmtriton.
Change-Id: Ia4709c8be580f9a2de9e3e80819097144c2413ee
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Reschedule the idle work in case transition to idle state is rejected
because the GPU is busy. This change avoids the condition where
transition to NAP state gets rejected due to a pending IRQ which is
currently getting served by IRQ handler because of which GPU remains
in active state even when GPU is idle.
Change-Id: I472a30b6a0e83cdd6957ed12eaa39d0c7731fcb5
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
The bimc-bwmon4 hardware module is only available on msmcobalt-v2.
Therefore move the bimc-bwmon4 setting to msmcobalt-v2 DT so
that msmcobalt-v1 can continue to use bimc-bwmon3 to measure DDR
bandwidth.
Change-Id: If6a44d83a4088e34eda3604ffa770b46653989f5
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
During image download, the status is set after post download events
are broadcasted. This could possibly lead to race condition if other
drivers requested to boot the dsp before the status was set. Change
makes sure the wdsp status is set prior to broadcasting post download
events to avoid possible race conditions.
CRs-fixed: 1071949
Change-Id: If3ec6202b4729b24ee839c3a8aa4edf2482d6e59
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Change the mapping table of mincpubw to vote for 681MHz at the Fmax
of the lower speed bins of the CPUs.
Change-Id: Ie8b9abaceaa8585ab5b132076772b9c7ca71cbfe
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Remove unused suspend/resume functions as pm_suspend/pm_resume
are the functions that being called during system suspend/resume.
CRs-Fixed: 1074250
Change-Id: Ifd1d90402d6f79dc96246c4825d46d41296b0ba5
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
The clock driver does not currently use the secure API to write the
APM threshold value. This leads to the value being always left as 0.
Fix the write.
CRs-Fixed: 1074198
Change-Id: I61d8f930f7fe8c3539803a1e9b942095df0b0f86
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
BCL gets the state of charge(soc) from the BMS power supply, which will
not capture the HLOS overidden soc value. This can create a scenario
where the mitigation will not be released if the soc value is
overridden in HLOS.
Use the battery supply notification, which can get the state of charge
value from the BMS or the HLOS overridden soc value if present.
Change-Id: I66d1ba1c6c3a942a80d3cee24746b00541fde3bc
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Add a bit mask to enable workarounds only if they are needed for a
particular hardware revision.
Change-Id: Ibd9a896ff6746a48ddab249d7c8ab762ed3c2fbe
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
When the codec DSP is crashed / unresponsive, in order to recover
from the crash, it is required to shutdown and restart the DSP.
Add support for subsystem restart feature to recover from crashes.
CRs-fixed: 1071949
Change-Id: Ibe1918cbf525c41d8fa82fc772b3afe20cac6eb7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Currently, the clock request is performed during init and the clock
is kept on assuming that there will be code download event followed
by init. This assumption may not always be true and might cause the
clock to be enabled when it is really not needed. Change fixes clock
disable such that clock is disabled right after init and re-enabled
again if code download event is raised.
CRs-fixed: 1071949
Change-Id: Icc415e911653012726e5b81b4fc09199560d5691
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
It is possible that wcd codec DSP can crash or become unresponsive.
During such case, an error interrupt is generated by the codec. Add
support in manager driver to handle this interrupt and perform
subsystem restart to shutdown and reboot the DSP so that the DSP
can be recovered from the crash.
CRs-fixed: 1071949
Change-Id: I4662b5120bf7f731e399a27d8a613e2f3b648b00
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
On MSMCOBALT v2, the qcom,llm-sw-overr flag is no longer needed.
This causes an issue where the corresponding array in code is not
filled up but the check to make the writes to the llm register
still succeeds. This leads to us writing 0 to the register
erroneously multiple times. Fix this check.
CRs-Fixed: 1074141
Change-Id: I2dd529a78d06ac08a34546df39cb01ad4c6cb3d5
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add support to collect the codec memory dumps when any fatal
interrupt is raised from the DSP indicating the DSP is either
unresponsive/crashed. The memory dumps are only collected if
the debugfs node 'ramdump_enable' is set to true since ramdump
collection is debug only support.
Change-Id: I805ec63d125770b869cac892db8cf56f45510d6d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
It is possible that the manager driver may try to read codec memory
section through the wcd-spi driver. Add support in the wcd-spi driver
to handle the WDSP_EVENT_READ_SECTION event and perform reading of
the requested memory section.
Change-Id: If7fb228dc15cb47079c8a791443c4d12c29eeb9c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
The codec driver is notified through interrupt whenever the
DSP in codec is unresponsive/crashed. In such cases, collecting
dumps of the codec memory is useful in debugging the issues.
Change adds support in the wcd dsp manager driver to collect
the memory dumps upon notification of error interrupt.
Change-Id: Ib91cd4fc1476ee1a9ec448cde1a083070443f726
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Currently, when manager driver interrupt handler callback is called,
there is no way for the caller to provide any data information along
with the type of interrupt. Change adds argument to the interrupt
handler so that callers can use this to pass agreed data when an
interrupt occurs.
Change-Id: I1c049227875a802491e21998c13c0bcd8eab7de6
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Do not create /sys/kernel/dload/emmc_dload sysfs entry
when imem-dload-type is not defined and also fix error
paths of sysfs entry creation.
Change-Id: I354e1f7635c5163516e256ed71b8510d1665877d
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Based on the kernel parameter download_mode, disable the SDI
execution. Also disable SDI execution for kernel panic/crash
scenarios. Currently SDI is getting executed for kernel crash/panic
scenarios, but it does not required in these scenarios.
Change-Id: I5a64107e2bf210f82d94ab03c4f86f27f9a330c8
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Add function to auto disable the SDI when the ramdump is disabled.
And make the device do hard reset at the same time.
Change-Id: I14e2d13792ef535364a082cdaed0b79c262ecfe5
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
GFX3D clock source might require to ping pong between the available PLL
sources, so add support to check the current source and switch the next PLL
source for different frequency.
Change-Id: Iaf98e4d18fc0c3deb75ccce53e1c09cfc9dde550
Signed-off-by: Taniya Das <tdas@codeaurora.org>
RPM controlled clocks are required by clients to be able to enable/disable.
Also add support for the PMIC XO clocks and QDSS clocks.
Change-Id: I210432d27f433f3160db53a842e503c83fd14891
Signed-off-by: Taniya Das <tdas@codeaurora.org>
"int" type is used to hold the time difference between the successive
updates to nr_run in sched_update_nr_prod(). This can result in
overflow, if the function is called ~2.15 sec after it was called
before. The most probable scenarios are when CPU is idle and
hotplugged. But as we update the last_time of all possible CPUs in
sched_get_nr_running_avg() periodically from a deferrable timer context
(core_ctl module), this overflow is observed only when the system is
completely idle for long time. When this overflow happens we hit
a BUG_ON() in sched_get_nr_running_avg().
Use "u64" type instead of "int" for holding the time difference and
add additional BUG_ON() to catch the instances where sched_clock()
returns a backward value.
Change-Id: I284abb5889ceb8cf9cc689c79ed69422a0e74986
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Existing video driver maintains a static array of
video formats. Video instances have a pointer to this
common array. In multi-instance scenario, different
instances read/write to common structure, resulting
into invalid plane count for other instances. To
avoid such situation, keep plane count structure
specific to the instance.
CRs-Fixed: 1051541
Change-Id: I9bd487459277e509cf64c0124a2d2e3f5fdc443b
Signed-off-by: Saurabh Kothawade <skothawa@codeaurora.org>
The kgsl driver relies on checking the PagePrivate flag for secure memory.
Commit 471a5dd237 ("ion: system_heap:
Add a new allocation method") did not properly set this flag in all cases.
Fix this.
Change-Id: I4f29ee151158cd70a1617d365decc7d3fd8fe6ac
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Hide kernel pointers from unprivileged users by using %pk format-specifier
instead of %p. This respects the kptr_restrict sysctl setting which is by
default on. So by default %pk will print zeroes as address. echo 1 to
kptr_restrict to print proper kernel address.
Change-Id: Ia300e3e38b8662afac15edda28959564b05c9367
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
Make sure test_rq is not accessed after its freed.
Also take care of initializing num_bios_per_request before use.
Change-Id: Ief9e4ff118691d74782f4f405dc195cb9bdb7c32
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>