msm: kgsl: Fix the extra draw packet on resume for A305

The extra draw command on resume was missing some state. Add the missing
state registers, to avoid stability issues.

Change-Id: Iad51cbe3be7b2951563c989625a690178491e0c8
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Bluetooth: Disable Sniff on HID ACL(s) if SCO is active

This patch disables sniff support on HID ACL(s) if SCO is active by
updating Link Policy settings. Once SCO is disabled, link policy is
again updated to re-enable Sniff on HID ACL(s). Without this patch
it was seen in presence of SCO, disconnection was observed on HID
ACL(s).

Change-Id: I81e0b3725bdadffe06ddb345afb9de2e042d5f9a
CRs-Fixed: 509616
Signed-off-by: Hemant Gupta <hemantg@codeaurora.org>
msm: bam_dmux: delay shutdown until DL polling is complete

Bam_dmux assumes that a shutdown event will not occur while downlink (DL)
polling is active. If this assumption does not hold, bam_dmux stops
polling, but does not cleanly switch back to interrupt mode until the next
power-on event. This is a problem because the next power-on event could
occur in the distant future and until that time some resources may be
incorrectly accessed or not released. Instead, if a shutdown event occurs
while DL polling is active, delay processing of that event until polling
completes.

CRs-Fixed: 503046
Change-Id: I67e4216b4820942e6070944557cd13f59600a2aa
Signed-off-by: Brent Hronik <bhronik@codeaurora.org>
spi_qsd: set device's runtime PM status to 'suspended'

Device's runtime PM status is not in suspended state during
system suspend.

CRs-Fixed: 512718
Change-Id: I5c0cb39c0b91782d8686c1b3da81125169ccf9be
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
msm: display: Do not commit in unset for external.

In case of external, commit is happening in unset itself which
is causing flickers. This patch fixes the issue.

Change-Id: Id55346be7a155108954e23bef236db80e7b65152
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
radio: iris: Handle force close gracefully

Do not queue the FM disabled event while in OFF state.

Change-Id: I8f8cd31198f8bb1a7521920844e0f0c5c3190b08
CRs-Fixed: 492216
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
tty: n_smux: fix deadlock between RX and TX workers

smux_handle_rx_open_ack function acquires the channel state spin lock
and tries to add the channel into ready list causing spin lock lockup
between smux_rx_worker thread and smux_tx_worker thread running on
two different CPUs.

Add the channel to ready list after releasing the state spin lock.

CRs-Fixed: 514726
Change-Id: I11729290c5c28a13bed66cf7506b8aaf48a32d2a
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Merge "msm: display: Do not commit in unset for external."
msm: rotator: Wait for the pending commits in finish IOCTL

Due to asynchronuous rotator mechanism, sometimes the
MSM_ROTATOR_IOCTL_FINISH arrives before the previously queued
do_rotate work is completed. This causes fence to be signalled
before the buffer is used by rotator. In case of fast YUV 2 pass
scenario, this causes IOMMU page fault on 2 pass buffers, since
the buffer is unmapped when the rotator is still using it. Hence,
wait for the pending commit works to be finished before releasing
the fence and freeing the 2 pass buffers.

Change-Id: Iec9edd11406d102c7dd102c2ad7935184bbbba93
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
diag: Command registration not happening properly

Some CM command registrations are not happening properly
on apps side. This could be because some smd events
for control type were getting missed. Make changes
in order to read pending SMD packets for control
type.

Change-Id: I0fe25455275f6169bee91d151d8657330081c104
CRs-Fixed: 516718
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Merge "tty: n_smux: fix deadlock between RX and TX workers"
Merge "radio: iris: Handle force close gracefully"
Merge "Bluetooth: Disable Sniff on HID ACL(s) if SCO is active"
Merge "diag: Command registration not happening properly"
Merge "msm: rotator: Wait for the pending commits in finish IOCTL"
Merge "spi_qsd: set device's runtime PM status to 'suspended'"
power: pm8921-charger: vote D0 when running kickstart

There is a small window when the PMIC could lock up while
running the kickstart routine. If PMIC sleeps right while
kickstart is run, it causes a short sleep which is known
to cause PMIC locksup.

To prevent these, specifically vote for D0 clock while
running kickstart which guarantees that the PMIC will not
sleep.

Change-Id: I9ea27ef73098d0ec5e8391352ee005d8a78daa9a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: pm8921-bms: fix calibration and UVLO issues

The bms is not running a hkadc calibration before calculating the
first SOC. This causes accuracy issues with the power on SOC.

Also when the battery gets in the low voltage range, don't limit
the corrections. We have seen UVLO where even though the BMS was
calculating SOC quickly it was not lowering the SOC fast enough.
Skip limiting ocv change when battery is near cutoff voltage.

Change-Id: I07747546867dcc90ccf7cb353c4e7a2c2c42520d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Merge "msm: kgsl: Fix the extra draw packet on resume for A305"
Merge "msm: bam_dmux: delay shutdown until DL polling is complete"