msm: kgsl: Add arch_mmap_check() stub definition

Add a stub definition for arch_mmap_check() in kgsl.c for
situations where the function is not defined, similar to the
stub definition in mm/mmap.c

Change-Id: I2d0f7f8c76f35cbec1554893433199e256f76df4
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
msm: kgsl: Remove cpu_is_msm8960() check

The check in the code will always evaluate to true now that we
don't support A-family and does not affect the if statement that
uses it.

Change-Id: Ifdf88cc0305eb64a6a50f72a23e69239173ee4c6
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
msm: camera: Fix possible NULL pointer dereference.

The result of memory allocation in msm_isp_get_buf is not checked for
success before use. This can lead to NULL pointer dereference.

Change-Id: I83cb56bbcd5e7526bf57a6de1077a30f9a2b5349
Signed-off-by: Petar Sivenov <psiven@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>
msm: lpm: remove redundant assignment

Removed the redundant cpu level is assignment.

Change-Id: I1aecc4f3d1eb55cd9e057c82f63b8f145401c0fc
Signed-off-by: Venkat Devarasetty <vdevaras@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>
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>
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: 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>
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.
ASoC: msm: qdsp6v2: clear old memhandle list when SSR happens

When SSR triggers, ASM gets RESET_EVENT callback.
Clear custom topology related old memhandle list here.
Otherwise for next ASM session opened after SSR,
old memhandle is sent to DSP and result in no audio.
Also, for ASM session while unmap during SSR, APR
command fail is expected, even then go ahead and
clear old mem handles relating to session.
Add changes to clear it from list.

CRs-Fixed: 592823, 589762, 592580, 590719, 589450, 593497
Change-Id: I10fc8190e929c7a4a344b1d393233e6cbcfcee97
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: kgsl: Fix the NULL context submission size

When submitting commands with a NULL context the size may not be
calculated properly. Fix this calculation.

Change-Id: Idcc37772349673da8a9b9d5127f88946ced8fff6
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>