There might be cases during bootup when backlight cmds or ESD thread
sends DCS cmds to the panel when iommu attach is yet to happen. DSI
uses physical or virtual address based on the iommu_attached status
check. If iommu attach happens when the DCS cmds are using the
physical address, it would lead to SMMU page faults. Protect iommu
attach/detach and DCS cmd sending with an iommu_lock to avoid such
race conditions.
Change-Id: I16fb0bf884f0dbbce1cd9099ec5619d132379054
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Configure autorefresh in the slave pingpong register too
when autorefresh is enabled along with pp-split.
Change-Id: I3dc51f99018bb7a97fa01cd9aebe50d63671261e
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The policy engine should only request for a specific current
amount when establishing an explicit contract. When performing
a hard reset, suspend this by requesting 0 and only if it
was non-zero before, otherwise requesting the maximum may
invalidate the default current for non-PD cases.
Change-Id: Icbef00d61f8705429105f241161362ad9f1f9d30
Signed-off-by: Jack Pham <jackp@codeaurora.org>
There is a possibility of tasklet bottom half handler racing
with dwc3_msm_suspend(). As a result before disabling the dwc3
irq, dwc3 interrupts are fired and once the suspend routine
disables the clocks bottom half handler gets a chance to run
and tries to access dwc3 register resulting into un-clocked
register access. Since dwc3 interrupt is already running in
threaded irq context, interrupt can be directly handled in
same context and avoid this race.
Change-Id: Ife9e165f6aa2112c1440819d659b97b5502a3f07
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
The charger drivers now handle setting of this property without
input from USB gadget other than the negotiated current draw
amount (set via POWER_SUPPLY_PROP_CURRENT_MAX). Remove setting
of POWER_SUPPLY_PROP_ONLINE which helps simplify the
dwc3_msm_gadget_vbus_draw() function a bit.
Change-Id: I2c5ec90cc8c45019ad75056b6feb7e6319f85514
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The gadget mode notification to draw a specific current may
occur in context with interrupts disabled, however the charger
driver's implementation of power_supply_set_property() for
POWER_SUPPLY_CURRENT_MAX currently uses a mutex. Since
sleeping is disallowed in this case, instead schedule a
work function to do the call.
Change-Id: I810ad8c102124ce22de72d83b6df58c8fc991251
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add all available interrupts to the mpm gic map list such that new
enabled interrupts are automatically added to bypass list and do not
block XO shutdown.
CRs-fixed: 1044164
Change-Id: Ib68da5c234ab270c401fa54adc99d4416a3cb987
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Disable RB sampler data path DP2 clock gating optimization
for 1-SP A5XX GPU's. Optimization leads to precision
difference during interpolation which cause rendering
difference between Binning and Direct rendering mode.
CRs-Fixed: 1040638
Change-Id: I40d1ce2f5db0ed75453feda5c31152f8201b8697
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
- Add support for internal codec driver.
- Add regmap support for internal codec
The code is migrated from msm-3.18 kernel at the below
commit -
commit <bbf356f8bd26039cf3e0b447c064de6e2455b101>
<Merge "thermal: qpnp-temp-alarm: add support for
GEN2 PMIC peripherals>
CRs-Fixed: 1046168
Change-Id: Ib0cd2ed579bd370cc8979cafcc14acb083a408b6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Commit 5ad6300524 ("genetlink: disallow subscribing to unknown
mcast groups") disallows userspace to subscribe to groups that don't
exist in kernel. As a result, communication between processes is
not possible unless they explicitly register a dummy group with the
kernel even if the communication is between userspace processes
only. NETLINK_USERSOCK cannot be used here since userspace processes
would require CAP_NET_ADMIN to receive multicast messages which
is available for priveleged processes only.
Fix this problem by reverting the change till a solution is
determined internally and upstream discussion.
CRs-Fixed: 1052589
Change-Id: Id559d9ef9d1e0a25e3bbdc81503978f01c6ed85f
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
In some cases, the jiffies of the wait function can
jump between reads, leading to wrongly detected
ping pong timeouts. Prevent to fail in this scenario
by making sure that the time elapsed during the
wait is valid.
CRs-Fixed: 1048727
Change-Id: I3a1ecc89f379a90d9fdacf0baa9b6c8498bb93fb
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add jdi 1080p video mode panel config file and necessary configs
to enable it in msmcobalt MTP and CDP.
Change-Id: I51ac777abdf0d95c74535c20afbbd555c31c358a
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Add necessary power and panel timings to support sharp 1080p
cmd mode panel in msmcobalt. Add support for it to work with
both CDP and MTP.
Change-Id: I145da5e01bcdb3aa28804e851c97c00fa4d39114
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Set APR to use SMEM for the Glink transport
type instead of smd_trans. SMEM is used for all
Glink transport. The transport smd_trans is no
longer used and use of it as a transport causes
Glink to take a very long time to establish a
connection.
Change-Id: Ie65f79051bfc452c63067c21efcfd9d98429bb15
CRs-Fixed: 1050763
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Add IPA unit-test framework. The framework supports
definition and execution of tests that are grouped
into suites according to IPA functional blocks.
Debugfs file system is being used as a user interface.
An example test suite is added for reference.
Change-Id: Ide4ed54970c62f6485809c3bd63960536b4ace4f
CRs-Fixed: 1040200
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Currently, if read pointer is behind write pointer and there
is not enough space toward the end of the ringbuffer for
new commands, then write pointer is being set to 0.
This is problematic, because it leads to the overwriting of
unexecuted commands with new commands at the start of the
ringbuffer. So, instead of setting the write pointer to 0,
look for space from the start of the ringbuffer up till the
read pointer and if there is room, update the write pointer
accordingly.
CRs-Fixed: 1028465
Change-Id: I1cbdbf139b14988513a22030aa2be4a99a221880
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
In machine driver probe, platform device pointer is assigned prior to
codec registration which might be invalid if wcd9335 and wcd934x sound
card registrations are going on simultaneously. Update the pointer after
sound card registration to avoid null pointer dereference.
CRs-Fixed: 1048402
Change-Id: I315e191227e14e207187673b8efb5401143dec9d
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Set the memory retention flags for certain hardware clocks to
save power. Memory does not need to be retained for these
clocks since the driver reinitializes the vfe hardware
whenever the clocks are turned on.
CRs-Fixed: 1044373
Change-Id: Idea83ef287710add893b48af0ecd9465e4ff7a98
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add a new soc api to set the flags of a clock.
CRs-Fixed: 1044373
Change-Id: I81c8ffc49166f7bf6d5c6eb3b61bfb5699dfb091
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add support to read new current property tag from PMIC LED.
This parameter is used for torch mode.
CRs-Fixed: 1021009
Change-Id: I368a8bc2760d4f8bed847aefae59af2839e828cd
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
warm_jmp_addr variable datatype is uint32 in tz version 2.X (32 -bit)
and uint64 in tz version >=3.X (64 bit). But HLOS side always hadling with
uint32. So this is causing mismatch data types between Tz and HLOS side,
which is providing wrong 'Warmboot jump address'. So updating
tzdbg_boot_info according to the TZ versions.
Change-Id: I216f9d4407592ae0112902fe423a807ae3c146d0
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
The CDSP peripheral now supports SMP2P communication, so add the
necessary support to allow the apps subsystem to talk to CDSP
peripheral.
CRs-Fixed: 1043377
Change-Id: If28a0f801411a215b02647f8acfccb1edb1033d4
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Smem item definitions must be kept in sync with remote processors; if
the definitions do not match, item lookup can fail between processors.
Add smem item definitions so that the local definition table matches
the table on remote processors.
CRs-Fixed: 1043377
Change-Id: I7d23da099b5ed9deb3d074c1b72d286560fd705c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Add sysfs entries to upgrade the firmware from userspace. Update_fw
sysfs entry upgrades the firmware inside the touch controller only
when the controller's firmware version is lesser than that in
userspace's firmware file. Force firmware upgrade sysfs entry
forcefully upgrades the firmware inside the touch controller even
when the controller's firmware version matches that of the firmware
file in userspace.
This patch is propagated from 3.18 kernel 'commit 580ca1a4437e
("input: msg21xx_ts: add support for firmware upgrade")'
Change-Id: Ib6046de5230c395b48818d01f26eb9394046808b
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
When fingers on the panel decrease, release corresponding touches.
This patch is propagated from 3.18 kernel 'commit 24e3a5036d3c
("input: msg21xx_ts: release touch when finger leaves the panel")'
Change-Id: Iafc3a9dda252417fcd06e3d9d24fb73b4d6f8e58
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
When clients specify color space information, venus HW
should embed it in the bit stream. This helps to
regenerate original colors when decoded by decoder.
When decoder detects the color space VUI, Venus fills
the corresponding extradata
CRs-Fixed: 1026204
Change-Id: Ie9523558c23a8edc7a7ee058937658dd87ef5b16
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
Upon usb composition switch there is possibility of ep0 file
release happening after gadget driver bind. In case of composition
switch from adb to a non-adb composition gadget will never gets
bound again resulting into failure of usb device enumeration. Fix
this issue by checking FFS_FL_BOUND flag and avoid extra
gadget driver unbind if it is already done as part of composition
switch.
Change-Id: I1638001ff4a94f08224b188aa42425f3d732fa2b
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Set USB core clock frequency to recommended value to allow SVS mode
when cable is connected.
Change-Id: Ia452476bd3bb7316a86efd08fed52c54f3efa34e
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Add support for setting USB core clock to particular frequency so that
core clock frequency can be passed through dts property.
Change-Id: If9ff41037d22d7be7f09c9468e8d4cc92280a28e
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Enable to lower the battery current FCC based on the system thermal
levels. At level
- 0: no mitigation
- 1: reduce FCC to 1500mA
- 2: reduce FCC to 1000mA
- 3: reduce FCC to 500mA
- 4: disable charging
CRs-Fixed: 1041206
Change-Id: Idcffb2d897615dc2ba842b55086d5fd583cb19f6
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
SeempLog driver is needed for QSSP malware detection feature. Enable
support for it.
Change-Id: Ic0c252450c4b6a4b98a032fb091e81d3100f7022
Signed-off-by: Ahmed Sheikh <ahmedsh@codeaurora.org>
Currently, certain memories are set to retain their contents
even after clocks are off. Here, we set the no memory retention
flags for the associated clocks, to save power.
CRs-Fixed: 1044381
Change-Id: I632086bebf11802d08acb0189f848fb1426b41b8
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Update codec driver register configuration for all the Lineout paths on
codec. The register configurations are updated for Lineout mono and
stereo configuration.
CRs-fixed: 997556
Change-Id: I7a09aeb2a02c30fb851ef21dcaad194413f17955
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Enable micbias at 2.7v for special headset till
headset is removed, to avoid fake electrical removal interrupts.
CRs-Fixed: 982110
Change-Id: I6643973a3b506d7f920e611ca51f06df94cc5a94
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Currently, certain memories are set to retain their contents
even after clocks are off. Here, we set the no memory retention
flags for the associated clocks, to save power.
CRs-Fixed: 1044381
Change-Id: I87c34fece6cb352ecef3aaeb8a02c1196fa8bcc3
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Initialize param length with user space argument and
check the condition for maximum length in
SND_AUDIOCODEC_EAC3 format.
CRs-Fixed: 1032820
Change-Id: I710c1f743d7502e93989e8cc487078366570e723
Signed-off-by: Surendar karka <sukark@codeaurora.org>
Enable memory latency monitor and governors to vote for higher DDR
frequency on detecting latency bound workloads.
Change-Id: I4a3f415263b94d4eab16de05bbb9843b7bb04113
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Memory allocated with devm_kzalloc() is automatically freed if
the probe function fails and returns an error code. So there
is no need to free cpu_grp explicitly for the failure cases
that might come up after it is allocated. Additionally calls to
devm_kzalloc() must be accompanied by devm_kfree() if memory
deallocation is necessary.
For these reasons remove the kfree(cpu_grp) from the probe
function.
Change-Id: Ic4838fd58d40d283ac301facc64b06813eb3bd7d
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
This change adjusts the ot limits in the mdp vbif
for msmcobalt by removing the xin ot limits and
adding the axi ot limits to the mdp vbif.
CRs-Fixed: 1040746
Change-Id: I365976021dcf02fbc3687091371d7d72cb711605
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Depending on the impedance across HPHL and HPHR, set classh
configurations so as to avoid false OCP events.
Move wcd9xxx_registers.h to uapi folder, as this header
file is used by userspace for wdc9330 codec.
CRs-Fixed: 963843
Change-Id: Ie2fb4b75b7f74013580bd3912372c64ddefc734e
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
Fix to GSI reset stats logic to clear the correct stats per channel
Change-Id: I94ae8c769ec2868a291e75a2f47c85bd8a449937
CRs-Fixed: 1046484
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
IPA driver uses 8k buffers for RX packets as those are aggregated.
If these packets deaggregated in IPA driver, cloned and provided
to clients, later calls to skb_copy() results in creating an 8k skb
which may lead to high memory utilization.
This change avoid the use of skb clones and allocates new skbs
for LAN clients and copy the packet content to it.
CRs-Fixed: 1050670
Change-Id: Iba47db8936b49309360791c1c6b482dcfcffd4d7
Acked by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Use of cpu_suspend is deprecated. Instead use arm_cpuidle_suspend for
32bit systems.
Change-Id: I5c61c970e17cba44c555e60418a9ece80c61488f
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
Synchronization is required because bind/unbind can happen in two
different contexts. For example, function unbind due to
unregister_gadget_item can race with bind which is initiated from
sysfs.
Change-Id: Iec93a9d4cb2a10b833cbba0d5256b64161147de2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Release the lock before unregistering gadget item.
Unregistered gadget item will result in unbind call back
to the driver which may use the same lock and resulting
in deadlock condition.
Change-Id: I2f8fba73a831d3bb711fe9310c5758221359819e
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
GDSC regulators in case of 'qcom,skip-logic-collapse', would require block
assert/deassert of the clocks. Add support for the same to use the reset
controller APIs.
Change-Id: I83651b3b3515e0923d7431cfe8b70e6059b51067
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add the block reset clocks which will be used by clients to
assert/deassert these clocks using the reset controller framework.
Change-Id: I3e9f7f85bf1faf0e1bb501196ba9d7e197111a03
Signed-off-by: Taniya Das <tdas@codeaurora.org>
A reset signal is associated with each clock branch but sometimes a reset
signal is associated with a handful of clocks. Either way the register
interface is the same; set a bit to assert a reset and clear a bit to
deassert a reset. Add support for these types of resets signals.
Change-Id: Ic9d00c0a03507a55ca6c96f977a6ddf55b4b5db7
Signed-off-by: Taniya Das <tdas@codeaurora.org>