msm: camera_v2: protect all cmd ack q accesses around mutex.

This change protects all cmd ack queue acceses for a particular
session around a session-wide mutex. This ensures proper
synchronisation and prevents use after free scenarios. It also
ensures that the commands coming from HAL are posted to the
camera daemon in a synchronised fashion.

Change-Id: Ied6fcacd775aed69b97c8fe9ccc1ffffbdcbe0e8
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
msm: mdss: enable CA filter only for YUV frames

Content Adaptive filter is meant to be used only for YUV content. And
should be disabled otherwise it may lead to MDP hang.

Change-Id: I399c83211b40c67d0ebe65e7f11acb547b707f39
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: vidc: Fix a bug in closing the instance

When sending the SESSION END command to FW, driver
is moving to OPEN state due to a bug. This is causing
state transitions to go out of order. When session end
is recieved from FW, driver is accessing the memory which
is freed.This may cause pointer mismatch resulting random
crashes. This change fix the same.

Change-Id: I89373ccbcf72983e82119b9247ff29defc6f5305
CRs-Fixed: 468218
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
ASoC: msm: qdsp6v2: Fix crash while unmap in NT mode encoders.

On non tunnel mode enconding stability runs there is a crash in unmap
regions. There is an invalid access to the buffer node after it is
freed. Fix is to come out of the list once buffer node is freed.

CRs-Fixed: 470017
Change-Id: Ic699da7b85e62746ce22322f6bede5382435bcab
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Merge "msm: camera_v2: protect all cmd ack q accesses around mutex."
Merge "msm: vidc: Fix a bug in closing the instance"
Merge "msm: mdss: enable CA filter only for YUV frames"
Merge "ASoC: msm: qdsp6v2: Fix crash while unmap in NT mode encoders."
mmc: sdhci-msm: Fix issue with MSM bus bandwidth voting

The driver is using wrong clock rate to calculate the required
bandwidth and due to this voting is happening for more bandwidth
than it is required. This is ultimately preventing system core
voltage from entering into low power mode.

The sdhci_host clock indicates the clock rate as requested by MMC
core layer and the actual rate that is set is indicated by clk_rate
within struct sdhci_msm_host.  As of now, sdhci_host clock is being
used to calculate the bandwidth whereas bus-bw-vectors-bps indicates
only supported bandwidths and hence a mismatch. Fix this by using the
right clock rate which is clk_rate within struct sdhci_msm_host.

Change-Id: If7d81e44a9b479c4c8e9fbaa7e092af2afb9cb9f
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Merge "mmc: sdhci-msm: Fix issue with MSM bus bandwidth voting"
msm: acpuclock-8974: Update (decrease) L2 voltages for 8974v2

Hardware characterization has shown L2 voltages can be safely
lowered for power savings. Update the data accordingly.

Change-Id: Ic52ab01e2426a32e2208994dfa86f3de40c3f89e
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: acpuclock-8974: Add support for Speed Bin 2 (2150.4MHz) parts

Add the 7 PVS bin tables for the new speed bin.

Change-Id: I68e71ba218ddd1892fc3f60080fd7e5b05461ca8
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: acpuclock-8974: Update 8974v2 CPU->L2->Bandwidth mappings

Testing has shown that updated CPU and L2 mapping may improve
power and performance. Implement these updates.

Change-Id: Ia2b1d612ef5cc06a5aeb2de205acc4d594af59fb
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
power: qpnp-charger: don't call ADC API in ISR

the qpnp_adc_measure API can not be called in ISR
as it invokes usleep.

Fix this by scheduling a worker to request the
ADC.

Change-Id: I90b8d6220a1a97d7faa07e48ae1783d116f4c6ee
CRs-Fixed: 470068
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
msm: camera2: Add support to send error status in cpp driver

The error status need to be sent as part of the payload so
that userspace can identify and do frame skip if needed.

Change-Id: I02e42439e84d71dc34e90ebb76f7da75c3f3c180
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
Merge "msm: camera2: Add support to send error status in cpp driver"
Merge "msm: acpuclock-8974: Update (decrease) L2 voltages for 8974v2"
Merge "msm: acpuclock-8974: Add support for Speed Bin 2 (2150.4MHz) parts"
Merge "msm: acpuclock-8974: Update 8974v2 CPU->L2->Bandwidth mappings"
Merge "power: qpnp-charger: don't call ADC API in ISR"