Use the correct member type 'struct delayed_work *', instead of
'struct work *', for the container 'struct pm8921_bms_chip *'.
Change-Id: Ifcc03472626916076c1d9a24d8f2dc2d6b61b0d2
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
Remove the parameter checks in pm_gpio_get and pm_gpio_set
callbacks because they are not necessary as callbacks of gpiolib.
This also removes an issue of NULL pointer check is after being
dereferenced.
Change-Id: Iaca83877fe93ba6335d40c9a36465f909aef2c97
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
Add checks for validity of the mem objects for the buffer
planes before using them, to prevent any potential crashes.
Change-Id: I1221092f8c13912479c72c2bd8385b93fd7226b0
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
The dsda2 target is a new platform that has two external mdm9x15
modems that operate simultaneously.
Change-Id: If51077a41b21447dcf0c245620fff7439c8c8394
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
We have seen instances where card is surprisingly taking lot of time
to complete their bkops operations. And if we let the card take long
time to complete the BKOPs then it would affect the user experience
if user tries to launch some application (or any other user operation
resulting in read from the card) while card is busy doing BKOPs.
User experience is most important aspect so we are reducing the maximum
BKOPs timeout to max 30 secs and if card doesn't complete the BKOPs in
the timeout specified above, we will send the HPI command to interrupt
the on going BKOPs.
If reduce the timeout to 30 secs then we may see the request timeout
errors during BKOPs so let's silence them out.
Change-Id: I31b11f60d1fae098770aa5797742eaf623b09ac9
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
(cherry picked from commit 926a9cb47ebfa40428b49f110135fde9e82f9cbe)
Currently we have 4 mins timeout for the blocking bkops to be completed
but we have seen instances where card is surprisingly taking even more
time to complete their bkops operations. So if we let the card take
more than 4 mins then it would affect the user experience if user tries
to launch some application (or any other user operation resulting in
read from the card) while card is busy doing BKOPs.
User experience is most important aspect so we are reducing the maximum
BKOPs timeout to max 30 secs and if card doesn't complete the BKOPs in
the timeout specified above, we will send the HPI command to interrupt
the on going BKOPs.
Change-Id: I14355fb79979058f388cd726091752797c316503
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
(cherry picked from commit 188b2a8723b4728c7c0c4c445e1aefe6e42895c9)
Currently we have 4 mins timeout for the blocking BKOPs to complete
but we have seen instances where card is surprisingly taking even
longer time to complete background operations.
If card doesn't complete the BKOPs within specified timeout, we
will send the HPI command to interrupt the ongoing BKOPs.
Change-Id: I5df81bdfd9b19bee30a394ee0ff4390b292691d0
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
(cherry picked from commit 1b22222ec61924de9b8ac51f08de113548946eb5)
Currently SDCC driver is waiting for the PROG_DONE interrupt after
sending out the CMD13 to card even if command flags doesn't indicate
so. This may cause the issue in when we try to HPI (High Priority
Interrupt) the ongoing BKOPs (Background Operations). Hence this
change removes the busy wait (PROG_DONE) for CMD13.
Change-Id: I8fb6ab4908bf1c4c5a939413d27eec29cde22f68
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
(cherry picked from commit 56fd45187495f27a7f9c3ebe947c1ffc9851fffd)
Reset SDCC controller if the check for TX/RX ACTIVE bit fails while
carrying out DPSM reset after the end of current transaction
instead of taking the entire system down by doing BUG().
CRs-Fixed: 423356
Change-Id: I9e2e945eb9a31d12e0a435df29a8215ae634724b
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
(cherry picked from commit 0a29588be6d3d6bd9122191e7e850c687bb1b166)
Signed-off-by: Maya Erez <merez@codeaurora.org>
The counter value to be loaded into GPT timer represents the time
in micro seconds minus 1 for the timer duration. The current code
incorrectly programs the timer. Fix it.
CRs-Fixed: 449090
Change-Id: I53eddb6b4323bbfaf0e3a1d3aaa0fb9120c70647
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
mdp resume bandwidth is set to the value when device was suspend, so
that the correct init value is set to avoid underrun.
CRs-fixed: 425823
Change-Id: Ie9b832f0eb5b5e1b6cb5e8979626986d896d340b
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
refx100 is used to calculate how many mdp_vsync clocks to complete one
line in the panel. This info is used by mdp h/w to sync data transfer
between mdp h/w and command mode panel to avoid tearing.
CRs-fixed: 379223
Change-Id: I3880a350b77cb8165745ea343b1525e84100a62d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
The dsda2 target is differentiated by a new platform subtype
passed to socinfo.
Change-Id: Iee6ab29200798c87ad3dd260a7afd7196d0b1b20
Signed-off-by: Joel King <joelking@codeaurora.org>
The mdm driver previously assumed that it would only need to support
one external modem at a time. This is no longer true. The changes now
support a arbitrary number of modems. Each modem must have its own
platform data.
Change-Id: I43918f92935b4b447a46d02721239fed0b5e877e
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
Update type from u8 to uint8_t for trepn daemon usage
from userspace. Also expose the psoc structures for
trepn's use.
Change-Id: I840a480432493303b105396d522ebdcb1cf9079a
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
When starting feed fails while the feed is part of a filter that
holds multiple PIDs for recording, the filter's state does not
change and therefore the feeds which were started were not stopped
and de-allocated properly. In addition the dvr-feed count
is per feed basis and should be decremented for each feed that
is stopped part of the recording filter.
Change-Id: I739e6d40596df3c80cd0843f89eb4a8d3d51ddf4
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
This reverts commit 99cef213bd94a4398433955d2bc62117c7ee7fe8.
Current code informs charger driver to draw 500ma on detecting
SDP Charger and doesn't revert its vote. With this change, on
not receiving any RESET from Host, device would keep charging
500ma until USB cable is disconnected.
CRs-Fixed: 446955
Change-Id: I1f3ed0005e1fff3595c1b3336e2be7432aeb7348
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
commit 8e6edcb (usb: ehci: Avoid phy lockup due to SOFs during port
reset) implements a workaround for PHY lockup issue during port reset.
The workaround relies on a hardware debug feature which allows driving
strobe and data lines to reset using ULPI interface. This is not
working some times for unknown reason.
This patch implements a new reset sequence to workaround the PHY lockup
issue. The controller drive reset signaling for ~50 msec when reset bit
is set in PORTSC register. The controller automatically clears this bit
after finishing the reset signaling. The software can also finish the
reset signaling any time by clearing the reset bit.
According to USB2 spec, Host controller should drive reset signaling for
50 msec for root hub ports. But HSIC spec allows shorter reset signaling
time (20 msec). Clear the reset bit in PORTSC register after 20 msec and
start controller immediately to send SOF. Use controller internal timers
to achieve this. If reset bit is not cleared in time, perform the sequence
in a loop with interrupts disabled.
CRs-Fixed: 445659
Change-Id: I6b251ced8d47b9ece4a06e58baf15c69a8bb340f
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Controller can generate interrupt asynchronously in low power mode (LPM).
Enable this interrupt in USBCMD register only when wakeup gpio IRQ is
not available.
(cherry picked from commit 0c9f29cff6b8686e9a89a500b545a9f331ab4618)
CRs-Fixed: 444883
Change-Id: I05258feb9476d1373d30645f6c750923589aa1cb
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Runtime PM resume and asynchronous interrupt can run in parallel. When
this happens, there is a possibility of PM usage counter mismatch.
Fix this by checking the return value of pm_runtime_get() and by
disabling the USB interrupt while resuming the HSIC.
Consider asynchronous interrupt case when resuming HSIC during system
resume.
(cherry picked from commit 822fbe6e90d32ec7c7b5d7cee69a8cd36869005f)
Conflicts:
drivers/usb/host/ehci-msm-hsic.c
CRs-Fixed: 444883
Change-Id: I63db49d8b45a7413f9456a93c9648511ad622b4b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This reverts commit d530d1cf40f3b45474621e0893d6c415b27d2077.
It doesn't disable USB charging on receiving RESET from Host
which is failing USB CV unconfigure current measurement test
case.
CRs-Fixed: 446955
Change-Id: I17c3277b8f0bceee690ae547e79e5287b0eb3f19
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Avoid the possible crash due to Bluetooth connection loss while data
trasfer is in progress. Bluetooth connection loss might happen due to
turn off of Bluetooth or reset of device when there is an active data
transfer over Bluetooth.
Change-Id: Ib15a9ac2df3a250d279774d6e45f1e37c9ea1cc0
CRs-fixed: 375238
Signed-off-by: Bhakthavatsala Raghavendra <braghave@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
Keep the Clock offset valid for one Hour and read it again after
connection complete so that we have most recent value. This helps
for faster ACL connections.
CRs-fixed: 430132
Change-Id: I1526878a7365f9cc0c654e0af6c4dd214fac4cd8
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
The re-authentication code changes are added to mandate 16 digit
PIN Key for SECURE_HIGH connections. But only SAP profile needs
16 digit key, not all the profiles that register with SECURITY
HIGH. Avoid the code to mandate 16 digit key.
Change-Id: Iffc02841e52b8c0b2f6e2495b27df26869e72999
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
The scatternet scenarios are difficult to be handled in SOC. This
change not to allow role switch during outgoing ACL connections
will avoid scatternet scenarios.
CRs-fixed: 392836
Change-Id: I5769b71879ea951755e115424fb2b5b504e95784
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
* Add ALLOC_CMA alloc flag and pass it to [__]zone_watermark_ok()
(from Minchan Kim).
* During watermark check decrease available free pages number by
free CMA pages number if necessary (unmovable allocations cannot
use pages from CMA areas).
CRs-Fixed: 446321
Change-Id: Ibd069b028eb80b70701c1b81cb28a503d8265be0
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[lauraa@codeaurora.org: context fixups]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
When filter is started secure-demux buffers handles
should be initialized with invalid values so that they
are not released if they were not set.
Change-Id: I79c3896130059a5118f4966cc59c80d2f3f83814
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
The memory reclaim code needs to give time to the system to
return the memory from a killed process otherwise the memory
reclaim code could run continuously, in multiple threads,
which could starve both the watchdog thread and the thread
which is responsible for returning the memory from the
killed process.
Change-Id: Ib390dbb021cb6d41e74ac64eca6fef46367daf1e
CRs-fixed: 447740
Signed-off-by: Liam Mark <lmark@codeaurora.org>
There is a chance of send a request to QSEE to load an app that
is already previously loaded. Requesting QSEE to load an app
that is already loaded will result in a failure.
Issuing a request to QSEE to check if app already exists before
issuing a request to load it, all within the same app_access_lock
mutex, fixes this issue.
CRs-Fixed: 420473
Change-Id: I5dfb02c7b0f0144d142fc70084ec1e096ada0439
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
The software flag used for storing the HDCP reauthentication state
needs to be reset whenever the HDMI device is powered off. This is
needed to avoid a potential reauthentication attempt upon a
subsequent connection which could lead to device hang as a result
of incorrect sequence of register accesses.
CRs-Fixed: 444312
Change-Id: I6b5b08394dd96ccbc08c4ca72b6dc4b2c4dbf6be
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
blt_wait flag will be set when both two writeback buffers
are used. In this case, kickoff can not be proceeded until
next dmap_done to release writeback buffer. This patch
initialize dmap_comp before wait4dmap to make sure
wait_for_completion is enforced.
CRs-fixed: 448168
Change-Id: I64f2ad599b18f9d8b346c41a55829c564fcced0b
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
The reason why the original code requires infinite loop
cannot be accounted for. However, it seems reasonable to
wait for 10 minutes.
Change-Id: I057f7ac8a83585abbc4ccd63a721df82f71ea045
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Function which converts port ID to port index can return
error value if port ID is invalid. Caller should not
blindly use return value without checking
Change-Id: I02b8112b6714e3364758907e7078bcbb88d45b6b
Signed-off-by: Patrick Lai <plai@codeaurora.org>
changing MFC heap size requires a corresponding change in TZ and
should affect only 8064 target. Reverting the size change for
8960 target
Change-Id: Iea100464218891e288714ee93cc8786b7c160f94
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
Add mdp clock control to histogram enable and disable block to
prevent system from crashing when accessing register with mdp
clocks off.
Change-Id: Ide808b332b5456f3fc639fcbb0d03d5cad0e387f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Add support for PID 0x9079 and also designate device IDs per-PID.
9079, having a device ID of 1, is intended to be able to coexist
with another probed device with device ID 0.
Change-Id: Ib8cc52a9277b0013e098baeaafa6fce1c8498c42
Signed-off-by: Jack Pham <jackp@codeaurora.org>
For compressed drivers, allow the drain ioctl only if
there are pending writes. Return a proper error (-EWOULDBLOCK) otherwise.
Change-Id: I4799351a8930c44d88d6968802df98896fc1531a
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 445370
If a drain ioctl on a compressed driver has been interrupted
by a reset ioctl, we need to return a proper error code for the
drain ioctl
Change-Id: I15f42a22b1cc13b3a0e2ae873adfcd1db2ac1e53
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 445370
qseecom_release() returns a failure, if it is unable to find
app_id of zero, associated with the handle in the app list.
There exists scenarios where the handle may not have the
app_id initialized and remain to be 0. In these scenarios,
once the uninitialized zero app_id is not found in the list,
it returns a failure.
Fix to this is look for non-zero valid app_id in the app_list when
releasing the handle.
Change-Id: I7b6489526da57cd2106f4aae9fdc0547e7a5fe86
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
If power-collapse is supported locally, then SMUX will always set the
power-collapse supported flag in an OPEN ACK which may cause confusion
for the remote side.
Mask power-collapse enabled with the value in the remote open
acknowledge message.
CRs-Fixed: 443770
Change-Id: I8ceb753e25a53d13fa5b5288457e8b1993452a18
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Sufficient testing has proven that hardware clock gating works on
8960ab. Enable the proper bits so that hardware clock gating is
used on 8960ab for the below clocks:
mmss_fpb_clk
imem_ahb_clk
dsi2_s_ahb_clk
dsi_s_ahb_clk
hdmi_m_ahb_clk
hdmi_s_ahb_clk
vcodec_ahb_clk
gfx3d_ahb_clk
ijpeg_axi_clk
vcodec_axi_clk
imem_axi_clk
mdp_axi_clk
fab_msp_axi_clk
rot_axi_clk
vpe_axi_clk
axi_s1_clk
axi_s2_clk
axi_s0_fclk
axi_s1_fclk
axi_s2_fclk
Note that the hardware clock gating on gfx3d_axi_clk is not enabled
on this target as testing has shown that having it enabled leads to
UI hang after boot.
Change-Id: I6bd9307a71b3af625b4dee8242a689a055163098
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
(cherry picked from commit 40ce88935ce62cc13026c02dbaa4212f4a4ad282)
Keep borderfill pipe's iommu info during base layer pipe
swap with original base layer pipe. Otherwise, borderfill
pipe's may contain original base layer pipe's iommu info
which cause iommu page fault due to same iommu buffer is
unmapped two times.
CRs-fixed: 436711
Change-Id: Ibdb792055287283c4449db07c2de2901aa4fe9b6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Reading the STC value from TSIF interface
is required by some application.
Change-Id: I180c54f1c74b3f82741c085880b6887bb7182d53
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Reading the current value of TSIF clock reference counter
is required by some application.
Change-Id: I5ca2a280f864fbb9c4a69518ce9672538f9c8489
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Reading the current value of TSIF clock reference counter
is required by some application.
Change-Id: I0fceb46ee50b8c76674ea9b8169e0b31f63fba3d
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
When playback is paused and proxy device disabled, afe is
not closed. This results in failure of proxy port open in the second
iteration. Fix the same by closing and opening the proxy.
Change-Id: Idfa94e5756d87e59dc0101fd688d6accfe6287e7
CRs-Fixed: 447001
CRs-Fixed: 446504
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
A new compiler generated a warning about a variable that may
be used uninitialized. To avoid this warning, initialize variable
to zero.
Change-Id: I119ca4952e8185140b02fda2c65651989892d5db
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>