Add dai link MultiMedia20 in reference machine driver and
kcontrols for sample rate of SEC_MI2S_TX port.
CRs-Fixed: 2045651
Change-Id: I7c6bc45b2d71403ed19ee0993a85c82649acda7d
Signed-off-by: Cong Tang <congt@codeaurora.org>
If there is any failure while registering a DBA client with MDSS
driver, then remove the client from device client list first and
then free the client. Otherwise driver might crash when
traversing the device client list in later stage, because of an
uninitialized entry in the list.
Change-Id: I60666f4c3dea5c7ea7b7c77bcb14b080ee25b54d
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Add new frontend MultiMedia20 and update routing to support ASM
Loopback from SEC_MI2S_TX port to TDM port.
CRs-Fixed: 2045651
Change-Id: Ief9ebfda4469d0761ff96bf673b9d593a9576f44
Signed-off-by: Cong Tang <congt@codeaurora.org>
Check the user parameters in ispif to prevent buffer overflow.
Fix out-of-bounds frame or command buffer access in cpp.
CRs-fixed: 1097390 2002207
Change-Id: Ifdaf223d1b1c418596c2fb43d970dad728abd4a3
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
Signed-off-by: Andy Sun <bins@codeaurora.org>
For SCO use cases, we should not program multi chanel
registers. Programming this leading to silence randomly
in SCO Rx/Tx.
CRs-Fixed: 2048423
Change-Id: I5e41591fb81b5bd3cf9358819c0a62a5cfe60e13
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
Check ion_import_dma_buf() returned handle is not NULL or error code,
by using IS_ERR_OR_NULL() macro.
Check channel name is null terminated on create channel command.
Check minimal command size from user space.
Fix spelling.
Change-Id: I81631c1844982952498eaf2bff84ff90578720b2
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
After spss reset (a.k.a SSR) the spdaemon tries to open spcom char dev.
Avoid flooding the kernel log with error messages until the spss link
is up.
Change-Id: I7abd37f50fa4c172e07c8551c287b6ccf0511a44
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
spcom_open() should increment the ref count only after successful glink
open the channel.
Otherwise, the following attempts to open the channel will fail.
glink_open() failure was noticed after SP reset (SSR), when attempting
to open the channel before the link between SP and HLOS is up.
Change-Id: I8be28ce810f54cc3fa95d14c7244921acf7edaa7
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Currently the read of battery's voltage_max property (FV) and battery's
current_max property (FCC) returns the value of DEFAULT_VOTER voter.
But such a voter doesn't exist on battery's voltage_max property. Fix it
by returning the value voted by BATT_PROFILE_VOTER.
Change-Id: I2dac98f2ce9a423d5045788dbe120591f10c5a9e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently main charger ends up voting to disable parallel(USBIN_I_VOTER)
if the settled current is less than 1.4Amps. It could be that the
parallel path is drawing some current and the draw is higher than
1.4Amps.
Move this disabling to battery, where the parallel charger's input current
is taken in to consideration.
Also while voting to disable, make sure that the main's input is limited.
If there is more room for ICL to increase that means more power could be
drawn from the charger and so we must keep the parallel charging enabled.
If the ICL ceiling itself if 1.4Amps then disable parallel charging,
because even if ICL has room to increase it wont cross 1.4Amps.
The main's input limited state is set while AICL steps up - this
ensures that we keep parallel disabled while AICL is running and settled
is less than 1.4Amps.
When the charger is removed, the main's input limited status is unset,
however we want to keep the parallel charger disabled. In such situations
the main's settled current is 0mA - use this to vote for disabling
parallel charging.
For any ICL change vote request:
Disable parallel using USBIN_I_VOTER if requested current is less than
1.4Amps and to un-vote (i.e. when ICL vote is higher than 1.4Amps) rely
on event from AICL done or status_change delayed work.
Note that USBIN_I_VOTER is effective only for non-QC chargers. For QC
chargers USBIN_V_VOTER continues to keep charging enabled since parallel
need not be disabled is a lower current is requested with a QC charger.
Change-Id: I61d7cd161a87de2904470b2d870058a0fe199116
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
We clean up the logical end points only for the un-registering device
in bridge mode. However, the other physical end point's local end
point still points to the the un-registered device.
This may lead up to a crash if one of the physical devices in bridge
mode is un-registered. Fix this by unsetting the local endpoint.
It is still possible that packets in a different context across cores
might try to access this data. This usually manifests as packets
requesting a very large headroom. Handle this by dropping these stale
skb's.
CRs-Fixed: 1098513
Change-Id: I1ba4d877a6ed3eca66946fe056938f0927bcd9a5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
During shutdown of sdhc drivers, power off notification (PON) is sent
to eMMC device. But it doesn't prevent the clock scaling framework
from kicking in and sending commands to card after PON is sent. So
exit clock scaling framework of sdhc before PON is sent.
Change-Id: Ibfe097732042458965db529f235a7fd28cfabaab
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
When resume clock scaling is not possible because there is no devfreq
framework, it is not an error. So avoid printing an error and return
success. This is necessary in certain scenarios like during shutdown
where we unregister the clock scaling devfreq.
Change-Id: Ib37eabdcdbbb58a336ee87220e5758bb559625af
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
Add USB2 device node for SDM660 for using secondary USB2 port
in host only mode.
Change-Id: I8ff06411902bcafbb5b3f429634760d4c44a7b20
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Enable TE irq for the panel when there is a pingpong timeout.
Wait for TE to come for five vsync cycles before starting the
recovery for panel dead. If the TE comes from the panel during
the wait, call panic for pingpong timeout.
Change-Id: I88d06562e3e19880bb327b5f347ed79057f0e8c3
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Add IRIS camera support on sdm630 mtp platform.
This is required for secure camera feature.
Change-Id: Ic18eb896e7e2099debcf755dca4278c25295f8b9
CRs-Fixed: 2042077
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
Correct failure prints in rpm stats and rpm log drivers.
Change-Id: I4a2d4a8cf4df4c9c1d750a65beb7454041fc06c2
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Add support for IEC61937 which is an audio packaging
standard used for compressed HDMI pass-through. Any
audio format can be sent through HDMI pass-through
formatted as IEC61937.
Change-Id: I09821add306e2aeae6530cecbac189471a55e589
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Secure decode doesn't need userptr and uses ion fd instead. We were
conducting userptr validation regardless of the decode mode (secure/
unsecure). This forced user to populate userptr with a dummy value
during QBUF in secure mode decode on both output and capture ports
to avoid a userptr validation fail.
CRs-Fixed: 2049213
Change-Id: I0060efb52792201a2634072f648a537ebb02d17c
Signed-off-by: Prabhakar Reddy Krishnappa <prkrishn@codeaurora.org>
PCIe bus driver maps registers to IOVA. So add IOMMU_DEVICE flag for
the mapping here.
Change-Id: Idfeb43ac0f93c68082f308d0db744a65f0c65f41
Signed-off-by: Yan He <yanhe@codeaurora.org>
APR deregister is to be called for two ports from both
q6asm_callback(during RESET) and q6asm_audio_client_free.
In race condition between the two, APR deregister is called
only for one port. The mismatch in apr register-deregister
count causes apr not to reset service after ssr, causing
APR communication failure.
Change-Id: Ibd0528215bf2fb986eda03ae0d683b2af31358fe
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Remove TCSR_QUSB2_PHY_CLAMP_DIG_N_1P8 resource entry for SDM660
which is not required to set now during disconnect as writing to this
register causes USB3.0 port and USB2.0 ports working independently.
Change-Id: Ifb91c4e493ca1ecd31ef649c9e85acd809b9eec6
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Currently PHY driver is using TCSR_QUSB2PHY_CLAMP_DIG_N_1P8 register
to avoid leakage issue seen during disconnect. But this could fail
USB ports working independently if this register is used as that
could clamp both inputs going to two QUSB2 PHY on platforms having
USB2 port. To fix this, it is recommended to powerdown QUSB2 PHY
by setting powerdown bit in QUSB2PHY_PORT_POWER_DOWN register
during disconnect and removing writing 0x0 to TCSR register. Removed
updating TCSR register from dts file as separate change.
Change-Id: I6b0915faa346e5d88310106eeddb3c7a1bfb1d08
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Currently driver is scheduling pm_qos_work again even though
pm_qos_latency is not passed from dts file. Add a check for
pm_qos_latency and don't schedule work if pm_qos_latency value
is zero. Also remove use of static variable for last_irq_count and
add the variable for the same in dwc3 structure for the case where
multi DWC3 usages are used.
Change-Id: I55e1e3a7d48fbea0a421802aae176ac57a48869f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
There can be a case of race in the call to tmc_etr_bam_disable(). The call
from usb_notifier() to tmc_etr_bam_disable() is within a lock
'drvdata->mem_lock' but the call from tmc_disable is not under any lock
which can lead to race.
This patch adds the missing lock.
CRs-Fixed: 2047196
Change-Id: I3986b498ae8e2b2ddfe8f5b3315fdefab197d11c
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
ipa post init is accessed from user space
context from ops structure.
While user space program triggered post init
there could be a chance, where the
user space context may get killed at any time,
due to which the memory allocation in post init
gets failed and in turn which clean up the
IPA driver.
Because the memory allocation of the
sigkill pending process will fail.
Make changes in ops structure write func-pointer to
queue a work instead of directly invoking post init.
So that ipa post init will execute in workqueue context.
Change-Id: Ia11b3a868d960111422c357bcc9924ef7b220e67
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Add board-id for UFS board which has a different board sub type.
Change-Id: I34963569b793a017f2e67298eb615b1d59a3c9ba
Signed-off-by: Arun KS <arunks@codeaurora.org>
Currently driver is allowing MODE change even if there is no active
cable connection and is waiting for to complete. For this MODE
change to complete, driver first sets power role to none to do
type C disconnect and then switch to new mode. Here disconnect won't
come as there is no active cable connection. Fix this issue by returning
error in case there is no active connection.
Change-Id: Ie423bd8b61ab7b2624f98c84e8d8e75b6c853b00
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
With DSC enabled in the panel interface, the horizontal pixel count is
smaller than the panel width due to the compression. Correcting the
time_of_line and total_line calculation by calling the proper macro.
CRs-Fixed: 2048339
Change-Id: I36c1b9d30d5a440dfef4b4638f4f3ebf807782c8
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Fixes compiler warning when a logical-not on a variable
is applied while comparing it with value zero.
Change-Id: I92aa16bd0d57a0d59ecd26eef1ac92220332998d
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
When driver calls ops_bus_request with high bandwidth requirement,
affinity of wil6210 interrupt is set to first big core. However this
setting is not cleared when driver lowers bandwidth requirement.
This causes WARN_ON_ONCE(desc->affinity_hint) upon wil6210 rmmod.
Fix this by clearing affinity hint upon low bandwidth request.
Change-Id: I87b6b7ec9b369b84a9d3724d92a821a1302d1f83
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Update HDMI drift mixer controls name to be aligned with
drift mixer controls for other devices(speaker, BT).
CRs-Fixed: 2036899
Change-Id: If7aa29ea9511b65de71ff12143a1c34d977de2b8
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
As a part of 'commit 64db44d65e ("ARM: dts: msm:
move ref-clk from phy to ufs node in sdm660")',
ref-clk node is moved from phy to ufs and ref-clk
related property should be prefixed with "qcom,".
This change updates the same for sdm660 mtp so as
to turn-off the ref-clk supply when link is off.
Change-Id: Iee0fcaaaa34108c35d836d6136f8c1a0964f0fa4
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Initialize mutex before using in irq handler.
CRs-fixed: 2047720
Change-Id: I5ebfbc22f2a64dde239fcbb13eb26be50543b484
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>