msm_fb: display: remove mdp_lut_enable call to avoid hang issue

Change-Id: Id9c26a8f9fc8b24dad08dde03cc0aa36d955aa97
video: msm_fb: Increase display timeout to 2 seconds

One second time out for no frame update, as in current implementation,
does not allow CABL to reach minimum backlight level possible because
histograms dont get generated after one second. So increase time out
period to two seconds which seem to be sufficient for complete black to
complete white and vice versa transitions.

CRs-Fixed: 370804
(cherry picked from commit 1bb4edf9242b0397975636a4442318713a53b5e6)

Change-Id: I0712924d669abcb820654cd6ca5f7da37bed57e6
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm_fb: display: Add mutex during display turn off

There is a possibility that suspend operation trigger during
a display update. Add mutex to serialize suspend and display update
operations

Change-Id: I52dea1bd718e8c54d894ae3830e86105f951efab
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: audio: qdsp6v2: Fix memory leak in aac encoder

Memory leak observed during stability testing as
codec_cfg structure is not being release.

Fix this issue by releasing the codec_cfg structure
in the release function

CRs-Fixed: 317736
Change-Id: I0b5bca1ecb3a4bfaba6011c868b69ca454e61696
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
msm: audio: qdsp6v2: Disable idle wakelocks for pcm driver

Change-Id: I8705869cfeb4549a54c3fe866c382c4dadbe009a
CRs-fixed: 307647
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
msm: audio: qdsp6v2: Block write to dsp till buffers are available.

Signed-off-by: Panneer Arumugam <panneera@codeaurora.org>
msm: acpuclock: Fix error path in multicore targets

Several acpuclock drivers have inherited the same error path bug in
acpuclk_set_rate(). If an invalid cpu is passed as an argument to
these functions, they should return immediately instead of jumping to
the 'out' label, which attempts to unlock a mutex which has never
been acquired.

Change-Id: I47b9709605673a5200caf73a2f2a5086fde63efe
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
board-tenderloin: only enable SPC if enabled in defconfig

Change-Id: Ibfa462af3a5be64e8648b4a27e46c91d7e25392d
rpm_resources: Squash of two commits from CAF

msm: rpm_resources.c: Compare sleep time with idle state overhead time

  When determining an idle state to enter do not enter a state
  if the sleep time is less than or equal to the overhead time
  or the time needed to enter an idle state.

  Change-Id: I764002b573ff39db56e69943dee85ae5959ad462
  Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>

msm: rpm_resources: Disable L2 SPM when msm_rpmrs_flush_buffer fails.

  When rpmrs_flush_buffer fails, L2 SPM has to be disabled. Otherwise, it
  could result in L2 being power collapsed when the Cores subsequently
  enter clock gating mode. During clock gating, the L2 doesn't get
  flushed, there by resulting in a crash if L2 SPM isn't disabled.

  Change-Id: I21fb81cac6085bed2e5fc703add9721ae1093e2c
  Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>

Change-Id: Ib1c0d4a9d29da0af4e00d521fba3a2be87a3bada