msm_fb: display: clean pipes from commit queue at suspend

There has possibility that pipes pending at queue and suspend
comes without commit executed. At resume, pipes pending at queue
will be committed with new pipes just added which may cause iommu
page fault due to pipes may had been move to other mixer. This
patch remove pipes from pending queue at suspend.

CRs-fixed: 440254
Change-Id: If6a142d4c55453c0ceacc677399f58570abe47b8
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: writeback panel commit should not happen when buffer is NULL

The change handles the NULL buffer case for writeback panel.
It avoids the H/W commit when buffer is NULL and also adds it to
free queue.

CRs-Fixed: 448340
Change-Id: I60f5d343d6de0f96353b081aa113f347c73c61af
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
msm: display: reduce timeline to 1 for smart panel

For smart display, dsi command and wfd, since it has its
own buffer, the input buffer can be released once the
display commit finishes, hence the fence threshold for
creation can be smaller. This patch reduce the timeline
from 2 to 1 for samrt panels. Also, it needs to
wait4dmap/wait4ov after kicked off. Otherwise, tearing may
happen.

Change-Id: I9eca871d8d863ef23b1d67b6e1e9cffea40ae4a6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: vidc: unsecure heaps in the right order during error handling

Unsecure MM and CP heaps in the right order in case of failure
CRs-Fixed: 445400

Change-Id: I2b5d414c5d9f109740a931b75b0cfbdb196c465f
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
msm_fb: display: remove extra mdp4_dsi_cmd_clk_check()

Since mdp4_dsi_cmd_clk_check() is called inside of
mdp4_dsi_cmd_pipe_commit() also, mdp4_dsi_cmd_clk_check()
is called two times from pan display route. This patch
remove mdp4_dsi_cmd_clk_check() from mdp4_dsi_cmd_overlay()
to avoid mdp4_dsi_cmd_clk_check() called twice from
pan display route.

CRs-fixed: 449809
Change-Id: Idbeb968e6af73abac2bb8c800a8c55015ea6a0bf
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: vidc: Move metadata shared input mem to firmware heap.

Metadata shared input is used to communicate between the
video core and video driver. Allocate it from firmware
heap for specific targets as MFC command heap size is
limited.

CRs-Fixed: 450118
Change-Id: I3d04cf6dd498ae67adcec7a8cba513bd7932d158
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
video: msm: Calibration config implementation

Allow software to selectively read/write MDP color calibration registers.
This is needed to allow calibration tool to individually configure
registers.

Change-Id: I5db2dcbca0b3433c7fedf9033ceff0cf6a5e0e1f
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit afc6fbf054d079761d5c2ee85242e56d640ee409)
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_util.c