Revert "mmc: sdhci: retune on cmd or data CRC error"

This reverts commit 6ec99eb687b989ef4af701475d4a162e990964f9.

Change-Id: Ic4186af897484a346bba5930fac4f8bd5bb7e0a0
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Revert "mmc: core: do not reinsert prepeared FUA and FLUSH requests in stop flow".

This reverts commit 762211a18930d0a750849cc7f91f3fedb71c9b43.

Change-Id: I8fe3069ae73a45d6f63f2b0bc3b3c99018908f5a
Signed-off-by: Abhinay Reddy Vanipally <avanip@codeaurora.org>
Revert "msm: mdss: Fix DSI event handler for dynamic FPS configuration"

This reverts commit 59ed8072cfcac90153e36a80a179062908dac5c1.

Revert "mdss: display: Add support for dynamic FPS"

This reverts commit d5ab773b20596697b6e96d48c0b1a6ab1b19042e.

Revert "msm: mdss: delay freeing buffers for additional vsync"

This reverts commit 04df881b95d39d4c45f6033aba101c86c86474c7.

Change-Id: I1c7f8cc458c5e1fce9cd639daaf8c0dd5e192f1a
msm: vidc: add sleep of 100us before clock disable

ARM9 execute following sequence when venus is idle
1. Disable ARM9 watchdog
2. Set bit 30 of A_VENUS_CPU_CS_SCIACMDARG0 register
   to indicate venus is idle
3. Write HFI_MSG_SYS_IDLE to message queue
4. Raise interrupt to host
5. ARM9 execute wait for interrupt instruction to go
   into low power state. This will internally drain the
   ARM9 write buffer which can generate bus transaction.
6. ARM9 in idle

Host clock gate venus based on following sequence
1. Host receive HFI_MSG_SYS_IDLE from the msg queue
2. Host check both cmd / msg queue are empty by
   comparing the queue read/write pointers.
3. Host check bit 30 of A_VENUS_CPU_CS_SCIACMDARG0
   register to confirm it indicate idle
4. Host clock gate whole venus

As the host clock gate venus in step 4, ARM9 is still
in step 5&6. The sleep will ensure that step 5 and 6
are completed before host clock gates venus.

CRs-Fixed: 589417
CRs-Fixed: 595251
Change-Id: Idf1f788718adea2dacceca97afa4ba4fe4562ddd
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
arm: if there's no handler we need to restore sigmask, syscall or no syscall

Change-Id: Id43457ef30eaf9e90048644fae1d89030cb6fec9
CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 7dfae72027cd8345247e675a3b27439df95fe06e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
arm: new way of handling ERESTART_RESTARTBLOCK

new "syscall start" flag; handled in syscall_trace() by switching
syscall number to that of syscall_restart(2).  Restarts of that
kind (ERESTART_RESTARTBLOCK) are handled by setting that bit;
syscall number is not modified until the actual call.

Change-Id: I0dac789dbb0cf26f5bf6a562f440305189676bd2
CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 6b5c8045ecc7e726cdaa2a9d9c8e5008050e1252
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
msm: msm_bus: Modify IB aggregation at master

The IB aggregation at master assumed that the sel_clk pointers were set
before trying to access them, but there could be clients that register
but don't do any transaction at all which could lead to data aborts during
the IB aggregation. Change this to directly access the allocated pnode
entry instead of relying on sel_clk pointer.

Change-Id: Iefffdd5ff835496fa54d3de97e416a62735154a2
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
ARM: dts: Reintroduce dual config for CPU on msm8974

Reintroduce the dual configuration mode for CPU masters on msm8974.
This will enable throttling of CPU in certain low bandwidth usecases
to alleviate timeline issues for other real time masters in the SOC.

Change-Id: Ic32f217ce40ee6ead4edd191811f9ce9f4e7e7ce
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: mdss: Return suspend without delay in NOTIFY UPDATE

NOTIFY_UPDATE returns Suspend after 4 seconds delay.
Delay would cause HISTOGRAM_STOP ioctl to be called late.

Return suspend case without setting timer for no delay.

Change-Id: I356086de96cab85cd203bf1ad529ecf0b3bbfce3
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
msm: mdss: Reset pipe's mfd parameter during pipe free

There is a corner case with dma pipe. If its set call
fails as line mode (for mdp) and is configured
subsequently as block mode (for rotation), mfd parameter
of the dma pipe structure does not get reset during set
failure cleanup. This causes unnecessary force dma
cleanup call in rotatorp lay which gets hang and
results in rotator fence timeout.

Change-Id: Ia090e9eebf43ab6e28a2746f8fe57e2c3da34e59
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: lpm_levels: fix driver compilation issue

Assigning an unsinged long value to unsinged int is not
correct and it cause driver compilation failure. Fix by
assigning a proper value.

Change-Id: Ia8d214425c3ba07006e748bc74365da6bc22f224
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
ion: remove unused function

Somehow, during [83c50939e88d0 gpu: ion: optimize zero'ing of pages] we
retained some cruft. Remove it.

Change-Id: I38f2ef5d6cd1baa3fe8a758a0bf8164695e2b657
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: fix use-after-free in ion_heap_freelist_drain

The `buffer' variable is being used after being freed. Fix this.

Change-Id: Iea3471fa7dc7535bbf0620c1639fea2008d7cf19
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: lpm: remove redundant assignment

Removed the redundant cpu level is assignment.

Change-Id: I1aecc4f3d1eb55cd9e057c82f63b8f145401c0fc
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: mdss: Check extra mmb allocated to a pipe

If set call to a pipe changes smp configuration such that
calculated no. of  mmb blocks are less than allocated mmb
blocks, fail this set call. This ensures pipe disconnection
and smp configuration is possible in next commit cycle.
Also, check that no extra mmb is left allocated to any plane
when pipe's format changes. If so, fail the set call to let
correct smp configuration happen in next commit cycle.

Change-Id: Iec2b8cb18088587655cf0c68dc81e3ac7b819cbc
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
audio: ocmem: fix the ocmem driver crash during video playback

Triggering SSR during wait for client callback by the audio
ocmem driver causes de-reference of freed memory in ocmem_free
function. Fixed by assigning NULL to the ocmem buffer pointer after every
ocmem_free function call.

CRs-Fixed: 589762
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Change-Id: I53208de26a4d22f6b60d118e47d16a3ad29a8040
ASoC: compress: Update lock for dpcm calls

Compress driver calls into the dpcm framework when
usecase is started/stopped.When calling dpcm framework
api's it should acquire dpcm mutex.
This change replaces the card mutex with dpcm mutex when
dpcm apis are called.

CRs-fixed: 596103
Change-Id: I66abb823e07a0d7eb5d9687927526d785959410f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: msm: hold lock while allocating and freeing ASM clients

ASM client allocation and free have to happen atomically to avoid
ASM APR being in wrong state. So hold lock while allocating and freeing
ASM clients.

CRs-Fixed: 554249

Change-Id: Ie6d2e87445cc06de990c9e8bed6dbf88ac79cd3a
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
ARM: dts: msm: Increase OCMEM BW request for video decode

There are framedrops observed on high bitrate clips because
OCMEM BW is not sufficient for these clips. Increase OCMEM BW
to avoid framedrops.

Change-Id: I7f3238036259e43a12899f2f7c73318328ae8eca
CRs-fixed: 571634
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>