Previously, the error case for retire fence did not handle
removing of fence_install for release fence properly. Fix it
by doing sync_fence_install for both release/retire fence
after successful release/retire create_fence.
Change-Id: I6e983a1a1d843ddca46729c37a49cb85eda74cfe
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
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>
Reset clocks are required by clients those require to reset their subsystem
blocks using the reset framework. As clock mmss supports reset clocks, add
support for the same.
Change-Id: Ia8f5e0b9e86b49077f15db8da2dc7a3cda6b1748
Signed-off-by: Taniya Das <tdas@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>
Cleanup the gt915 goodix driver from checkpatch failures.
Also have cleared the checkpatch errors on 4.4
This patch is propagated from 3.18 kernel
'commit 9ccc3ab159ba ("input: touchscreen: Goodix gt915
driver cleanup")'
Change-Id: Id841423f229b6abc674cc1e3c6441d55062b6ab4
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
[abinayap@codeaurora.org: fix checkpatch errors for 4.4 kernel
Use of the '__DATE__' macro makes the build non-deterministic
Also including it in the output does not provide any value.
So remove its usage.]
Signed-off-by: Abinaya P <abinayap@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>
If solid fill is enabled the driver code skips the programming of
scaler which leaves the scaler in invalid state if it was
enabled in previous configuration on this pipe. The change
addresses this by programming scaler configuration before
the solid fill check.
CRs-Fixed: 1048727
Change-Id: I093e494800dacefda447b27da4fc2ea9c0cdeda6
Signed-off-by: Abhijit Kulkarni <kabhijit@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>
Mstar driver uses the ic-type DT property for dynamic detection
support. Driver reads a register from the controller and compares
both the values to check if connected touch controller is of
Mstar or not.
Remove all DBG messages and convert them to dev_dbg/info.
Add a debugfs entry for suspend/resume.
Remove ts_data/pdata global declaration and use dev_get_drvdata()
and input_set_drvdata()/dev_set_drvdata() instead.
This patch is propagated from 3.18 kernel 'commit adbc104e3cb8
("input: msg21xx_ts: Mstar touch driver optimization")'
Change-Id: Ia053745d48faf68b946fbb0cf16d392cbfdd2a3c
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Signed-off-by: Abinaya P <abinayap@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>