msm: kgsl: Add cache flush for A20x

Adding extra cache flush command to make sure that CP block
gets event from RB all the time to avoid race conditions because of
clock switches. this is to improve stability on 8x25 target.

(cherry picked from commit fd5f8a4e3dc902d32f5b37de67555e56b887f759)

Change-Id: I32063b1d4ab6180159f868b47c7e0fd79d7b12b3
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm: kgsl: Restore the value of RB_BC_CONTROL on context switch

On 8x25Q, when GPU footswitch is turned off during TCXO shutdown, the
RB_BC_CONTROL register value is lost which causes GPU hang after coming
out of TCXO shutdown. Now the value of RB_BC_CONTROL is preserved properly
during context save and restore.

(cherry picked from commit 6b761ba560847bd7df4c6ff9de87bd6298d4b6e2)

Change-Id: I1999f88a5416445568c4b63ca0b99233551258f4
CRs-fixed: 441134
Signed-off-by: Vinay Roy <vroy@codeaurora.org>
msm: cpr: Set turbo vmin 1.175V for 1GHz parts

Set Turbo vmin to 1.175V for 1GHz 8x25 parts.

(cherry picked from commit 6cb2ccc2cc16702e55a550548530d3733b600146)

Change-Id: Iaea8638eb9c8acc300ca41c3fc777be8a55c05a2
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
qdsp5: mvs: Fix kernel panic due to early closure of endpont

MVS driver closes the RPC endpoint while it sends reply to the
RPC read sometimes. The RPC write for this reply results in
crash as endpoint is already closed.
Wait for RPC read and reply to complete before closing the
endpoint.

(cherry picked from commit d8b6569a81ee7fde1e216b70bed58a4c34a005e4)

Change-Id: Id086fd910826ee4e18aa950bd1e87b273abc3e84
CRs-Fixed: 443706
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
video: msm_fb: Ensure backlight is scaled atomically

Ensure that when backlight scaling ratio or backlight level is being
changed that the operation execute atomically. This prevents a backlight
level change from being overwritten when it interrupts a backlight scale
update.

(cherry picked from commit f4fef8225ce6730257ef5ae276e89eeb32e3abd7)

Change-Id: I520758435355f5a6bf1730d85085ed77ee18c87c
CRs-Fixed: 424084
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Fix race conditions for backlight update

Fix race conditions for backlight update thread to ensure
that panel specific artifacts are not observed during rapid
suspend/resume.

(cherry picked from commit cf6c96eea42169074ab477c7d189d628bad66090)

Change-Id: I82fedc2d9656fcce541f6fb9fef07b946ed3beb2
CRs-fixed: 424084
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Avoid backlight scaling during resume until backlight is set

Currently, if we try to perform backlight scaling before we set the
backlight on the target during resume, display doesn't come up
due to backlight level zero set on target. Hence, avoid backlight
scaling until backlight is set on the target during resume.

(cherry picked from commit 54a18e8ccb851947ccc828b7b16a1c1e89ce395b)

Change-Id: I8d6f15b92571e8cc1f1e55a857bb3364fae761ef
CRs-fixed: 437550
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Bluetooth: Fix hidp_get_connection()

This functions needs crtl_sock and intr_sock to be set first.

(cherry picked from commit be96be79a7fdd31825666ae645107da25a78bd12)

(cherry picked from commit c606d51788c5f8857ffa6cd8c952e19314b62855)

Change-Id: Ib0108ff4039421202182183add28f1df44e67d62
Signed-off-by: Sumit Bajpai <sbajpai@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
Bluetooth: hidp: safely acquire hci connection

Claim device lock to safely enumerate hci connection list and bump
hci connection proxy device ref count simultaneously.

This patch incorporates David Herrmann's fix to prevent adding an
HID device when the hci connection no longer exists.

(cherry picked from commit e0a15cea91da20b047f30244f06de238008e0685)

(cherry picked from commit e82588e3c3726bfd50ff21be76ba26a04a2eddbd)

(cherry picked from commit e96fa42348ec6e26f0e2634a10bf36e66b3d3f09)

Change-Id: Iac6837ae3521ad7732085d48e8ba59ddfa509796
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Sumit Bajpai <sbajpai@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
Bluetooth: Rename hidp_find_connection()

hidp_get_connection() makes more sense because we hold a reference to the
connection inside this function.

(cherry picked from commit c7e4ebda4ab85605b3b2aba66411989d3dafdb7d)

(cherry picked from commit 35de6889ece45e9a8df116c37657c3c322604ccc)

(cherry picked from commit a45b586b388bfc37ef64170e39d1ccbc7472e42e)

Change-Id: I7db98bbc189b96953a1f2555b07c85f7bcb70337
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Sumit Bajpai <sbajpai@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>