msm: acpuclock-8960ab: Increase L2 frequency

Power testing has indicated benifits increasing L2 frequency from 702
to 810 MHZ.

Change-Id: I14aa892c3afd3d3dc7a32f1f6d51a4a872e1315a
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
msm: camera: Recovery through camif stop and overall reset

Change-Id: Iba6576777f05135cc13c1ee0c9db764d35c7282a
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Ninad Patgaonkar <ninadp@codeaurora.org>
msm: display: Limit dynamic fps feature only to MIPI video panels.

As dynamic fps feature is supported only for MIPI video panels,
return -EINVAL if sysfs node is written for panels other than
MIPI video. This change also removes world writable permissions
for sysfs node.

Change-Id: I72260e6032cb8a758b0457c36a808263a981260f
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Merge "msm: acpuclock-8960ab: Increase L2 frequency"
msm: camera: Invalidate the vpe_ctrl frame info field during close.

During VPE subdev close, if there is a pending frame with VPE HW,
we unmap the frame, but dont invalidate the frame info field. This
might cause issues if the VPE subdevice is opened again and closed
without sending a frame to VPE. Hence we need to invalidate this
field during close.

Change-Id: I8944af7b5233e277a42b15644e297332f9e38341
CRs-Fixed: 479655
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm_fb: display: issue completion when disabling vsync irq

When vsync irq is disabled, vsync_wait_cnt is reset to zero and
completion is issued out as they are done in isr to make sure all
wait_for_completion is released.

Change-Id: I689f0c8cde43404d0caf5bb4644efa6385798d0e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
ASoC: audio: Fix BE not disconnected even codec teardown

Scenario:
When FE1(LowLatency) comes in which opens BE1 and puts it in state
SND_SOC_DPCM_STATE_START. Similarly FE2(LPA) comes in with
connecting to same BE. Now FE2 is in SND_SOC_DPCM_STATE_PREPARE
state and waits for TRIGGER_START. Meanwhile FE1 is closed which
doesn't affect BE1 and FE2 which are connected.
Also, for FE2 pcm_close is called before TRIGGER_START itself.
In such a case, BE1 is not getting disconnected (afe_close is
not called) while Codec is teared down resulting in Slimbus
overflow.

Fix:
Whenever BE1 is found to be in SND_SOC_DPCM_STATE_START state
and FE1 being connected is not started yet, and close sequence
happens for this FE, then allow hw_free to happen for BE1 if
this is the only FE connected to this BE1. This allows BE to be
disconnected which calls afe_close then followed by Codec teardown
not resulting in any Slimbus overflows.

CRs-Fixed: 468118
Change-Id: I03a80a12c1fd0cf09bd2e3dfe1f1eb56589016d3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: Add support for ION Flushing without virtual address

Video has very large buffers to be flushed. Due to lack of
vmalloc space, ion_map_kernel cannot be called on each of
the video buffers. With this change the ion handle can be
flushed without the need of the kernel mapping.

Change-Id: If026f21e44a2cce6c2b8c232fc80a69d0dabcd14
Signed-off-by: Neeti Desai <neetid@codeaurora.org>

Conflicts:

	drivers/gpu/ion/ion_cp_heap.c
	drivers/gpu/ion/msm/msm_ion.c

Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: Remove kernel mapping on input/output buffers

This change will remove the kernel mapping of input and
output buffers for both video encoder and decoder to
avoid the errors resulting from ion_map_kernel() for
high resolution video concurrency use cases due to the
limited vmalloc space. It also removed the metadata
processing in kerner video driver as kernel virtual
address is removed. The metadata processing can be
done in user space video component.

Change-Id: I3f2c9b7c13b3e09097ce07ca7b59154b97401052
CRs-fixed: 471135
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: Free buffer pool entry and then delete address table

Free the buffer pool entry first and then delete the
address table (which will unmap the buffer with iommu)
else we might get a corner case where the entry was not
freed but the buffer is unmapped and the next buffer is
mapped with the same physical address which is still
available in the buffer pool entry, which results in
video recording failure.

Change-Id: I6978d5e5de35db63f43a7f38c58940216217b676
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: camera: Fix for camera crash

Add NULL checks to avoid NULL pointer dereference in
msm_vfe_subdev_ioctl

Change-Id: I215f87e0c35a63404fa4f7c02f743b25550c2e00
CRs-Fixed: 475242
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
msm: camera: Handle incorrect parameter properly

By this change, when incorrect size is passed, we
return back rather than proceeding forward.

CRs-Fixed: 477936

Change-Id: I8f3ea3c7680a468e36ed0cdb026e95cc29e3f4be
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: vidc: Correct log tagging for kernel messages

This change amends the log tagging in kernel.

CRs-fixed: 478607
Change-Id: I2c7056d8fc9ec82ffbc6824790c064033481a9af
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
msm_fb: display: Do a pre-fill to writeback buffers.

When switching mdp operating mode to blt, writeback buffers need
pre-fill. Move the pre-fill code from isr routine to do_blt, where
actual switch to blt mode happens.

CRs-fixed: 471098
Change-Id: I0f845397894c749ac518a1fa605f84cd5fc2ad15
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: Remove the extra MDP clock enable in writeback_commit

There is an extra MDP clock enable call in writeback commit
which causes the MDP clock to be enabled always once a WFD
session is setup. Remove this additional clock vote to make
sure the clock enable/disable calls are balanced.

Change-Id: I8b101f3eb76fe00ecf6d3967d0bf113146447db3
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
ALSA: include: Add new ioctl for metadata mode

Add a new ioctl to support metadata mode in lpa driver. This ioctl
allows lpa driver to work in default alsa compliant mode and also
metadata mode.

CRs-Fixed: 458904
Change-Id: I8111e8652bbfb6dd93bdbda69bd16f53b45cb756
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Add metadata mode changes to LPA driver

Playback hangs for three seconds on seeking to EOS. This is
because the lpa driver works on period size. Partial buffers
are not handled. Add metadata mode changes to LPA Driver to
support partial frames.

CRs-Fixed: 458904
Change-Id: Ieb89b59dbca4b40ec0915a286d53c4617c23c471
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
msm_fb: display: keep a minimum mdp ib bandwidth request

The calculated ab and ib bandwidth requests are very small which cause
underruns if mdp composites only very small layers. For these use
cases keeping a minimum ib request based on the baselayer size can
prevent underruns and no power impact is observed.

CRs-fixed: 472444
Change-Id: I08e77610aafdfa84c5c2a882a0c95a51950aa069
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: display: Adjust video timing generator parameters for 8930 EVT device.

This change adjusts the video timing generator parameters to properly configure
porch values for the panel.

Change-Id: I920646f1edbf4fe0043336dd0e2914f0302be2d8
Signed-off-by: Sangani Suryanarayana Raju <csuryan@codeaurora.org>
Merge "msm: vidc: Correct log tagging for kernel messages"