video: msm: Update MDP revision definition

Update the display board file to reflect the correct MDP revision.

CRs-Fixed: 417080
Change-Id: I67fd13670225c97be857ae3826cf90bb8724bb5d
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 37bbc553754f2b15a9f87c12f5572088d9875d83)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm_fb: display: wfd with vsync driven frame push

To improve performance, hardware vsync event at mdp driver
is passed to framework so that both composition and frame
update are aligned at vsync event. This patch will upgrade
wfd to incorporate vsync driven frame push in consistence
with other interfaces.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 6f3589a302d5d3be9750b98bd75629474e9dee6e)

Change-Id: I314dbb78950b1260414545b984882d014e2314f4
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm_fb: Wifi display changes for commit ioctl

This change handles panel updates for WFD panel via
overlay_commit interface, along with conglomeration of
some common code across pan_update and overlay_commit ioctls

Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
(cherry picked from commit 9284a2701b6c030184848ba4b37c0b5019f62ed3)

Change-Id: I1d39512afd5cf3b574f41a15e05800d9aee015ff
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm_fb: display: empty pending queue during suspend for wfd

Add the logic for wfd writeback interface. It already presents on
other display interfaces.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit ec8922ceea49cfd2e13a3c1ddab9f51e2f13394f)

Change-Id: Ie14fcb152ddf021d42169e67c55a5ad048e3c177
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm_fb: display: add config of wb_mux_sel during update

To make sure for each writeback play the reg is configured and avoid
mdp hang.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 9bc28cf89a1619218fc1193409c4f614d1f826f6)

Change-Id: I95d04cd9bc18bd04d6f7ec08d914dabf882e4001
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm_fb: display: empty pending queue during suspend

Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 1ecd40f19ec16f6f5a8025ae49102b281fe016de)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>

(cherry picked from commit e51fe1fa2c2b001bd291e4db600d82ab7245fb7f)

Change-Id: If7dc2d784bfdbbb129d2fd25a4e268d064e4df38
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
ASoC: WCD9304: Fix Headphone + Lineout concurrent audio playback

During concurrent playback on headphone and lineout, it is observed that
headphone is enabled in class G mode. This causes incorrect routing to
lineout. Fix by making sure headphone does not operate in class G mode
when there is concurrent playback on headphone and lineout.

(cherry picked from commit df93d70ca9026c2db8c64fb779c9485d97eb24b8)

Change-Id: I245e89b7bfe7b3f1e47c2a7c506395c3e0d718f6
CRs-fixed: 421247
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
msm: vidc: Avoid memset of list elements in the buffer entry.

- Due to race condition between free buffer and flush output buffers,
  invalid buffer is getting accessed sometimes.
- Reset all the members in buffer entry except list elements.

(cherry picked from commit 8105df366cf6b9f1ddbc15d561fb6a5f12540416)

Change-Id: Ie9bc70a487cd4514151297d5e9f22b52a464fe18
CRs-Fixed: 411197
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
msm_fb: display: delete dsi clock control from cmdlist_commit

cmdlist_commit perform dsi clock control which turns off
dsi clock unexpectly when dsi controller is configured as
command mode during booting up. This cause display panel
can not be lit up. This patch drop clock control mechanism
from cmdlist_commit and move dsi clock control mechanism to
caller.

(cherry picked from commit cc13101bd21479dec3a629d93655bcf62462b0ba)

Change-Id: Ieb6e212245859c838381d04fb8b041f6ff6b5ebe
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: rpm: Correct MSM8930+PM8038 resource mapping

The mapping for several RPM resources for the MSM8930+PM8038
target is incorrect.  Add and update enum values in order to fix
the mapping.

Without this fix, requests made for the following resources will
appear as 0 when received by the RPM processor: NCP, CXO_BUFFERS,
USB_OTG_SWITCH, HDMI_SWITCH, QDSS_CLK, and VOLTAGE_CORNER.

The incorrect VOLTAGE_CORNER mapping results in the VDD_CX
regulator always staying at a low voltage even when the clock
drivers have requested a high voltage immediately before scaling
up the Krait core frequency.  This could lead to stability issues
during high load use cases.

Change-Id: I9efcf8185f9f3a017760c72baa3b8fdb213c770a
CRs-Fixed: 426912
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit 64c86fbb30db169d8cebfd12095592c66e9277e2)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm_fb: display: add wfd clk ctrl in pipe_commit

mdp_clk_ctrl on is not called when commit is from overlay commit path
which can cause mdp hang. mdp_clk_ctrl off should be after mdp
overlay2 is done, so schedule a work in overlay2 done isr.

(cherry picked from commit 1fdd101b95c275118f6a0c9c732d5559f815b1bb)

Change-Id: I16c9c5e3b2641252b535201b4f67086c26eb3852
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: board-8930: Remove force mode configurations for PM8917 S3 and S4

Change the active and sleep set force mode configurations for
SMPS 3 and 4 on MSM8930+PM8917 targets to "none".  This ensures
that crashes to not occur due to instability caused by using
"auto" mode.

(cherry picked from commit 1c9d4124676c5c9b5d68e83909bc0763e4880e81)

Change-Id: I7d081f17011954d8b578b43890f35681d87b6859
CRs-Fixed: 432618
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm: display: include msm-specific ion header

All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>

(cherry picked from commit 6c7b2d322826aaf12b7682079cadb8ac9179fbce)

Change-Id: I5ea11254adc7a9f1ae4c9afbcfc20f9c78d789bb
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: board-8064: include msm-specific ion header

All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>

(cherry picked from commit cc827ace8a6d523156ebd3b2a882310a41a0973a)

Change-Id: If8d862c0b93c1c8c045da5aa8083b49e53a3cc7d
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: board-8930: include msm-specific ion header

All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>

(cherry picked from commit d0b5da0404e57339dd15a2e5748403e5d284931f)

Change-Id: Ied606d380d4dbcb92886458d04c4e427f16b159d
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: include msm-specific ion header

All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>

(cherry picked from commit af2e5c54827a85efc3662df70ff8a4e42f91747c)

Change-Id: I5f02785623eaf622fd4143d5a1f476b3c7f1a801
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: move msm-specific ioctls to custom_ioctl

To avoid collisions with future ioctls that may be added to ion,
msm-specific ioctls should use the `custom_ioctl' interface provided
by struct ion_device, as originally intended.

(cherry picked from commit d88b8eb288bd2d4c5da827d546c4ce56ff169bfb)

Change-Id: If5b190d703c25b3f287a7d4a4f66500bb83f6618
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: Add compatibility with future changes

Several changes are pending to be pulled in which are
not compatible with our changes:

* a new field to the allocation ioctl is added
* the ioctl numbers for cache flushing need to be changed.
* the size of the structure passed to ION_IOC_IMPORT
has changed

Add these changes now until full changes can be pulled
in the future.

(cherry picked from commit 0eec15100e6fc46e7ae5b7cd18dfe3a329661a1f)

Change-Id: I571a6096ebbf59c80a5730480da3a5c704e27edc
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ion: remove ion_validate_buffer_flag

ion_validate_buffer_flag is no longer needed since its only callers
are moving to a new format for buffer flags.

(cherry picked from commit b6e920c1e371d940f2e3824ffaf157132b95284c)

Change-Id: Id7336257fd8339c3097d73f36a58a0e7ce4abbc0
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: IOCTL return success when error occurs

ION_IOC_IMPORT may return success when an error occurs. Add correct
error handling to ION_IOC_IMPORT.

[mitchelh@codeaurora.org: re-adding patch that fell out]
(cherry picked from commit 865e97f4943d9bf0c11763b694569fb4797c52b0)

Change-Id: I170f8a7dfc6e00e837530d14d6a14dbd40d28726
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>