vidc: Adjust core timeout based on current core frequency.

Core timeout value is calculated based on the current core
clock rate during video play back.

Change-Id: I52f38560eda71dd0eaf208da68b4c3f74955661b
CRs-fixed: 354069
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker_api.h

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
vidc:1080p: Set video core timeout value for Thumbnail mode

Video core timeout value is set only for thumbnail mode.
For normal playback senario default value is set.

CRs-fixed: 367222
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
(cherry picked from commit 740d5ad28484b42ae675721a66a1bd93081712c8)
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>

Change-Id: I32ee573b21fd79d44d578a773294ba9973f1c00d
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm_fb: display: remove mixer1 waiting4vsync when staging down the pipe

dtv_pipe is the base layer pipe for mixer1. Waiting for vsync when
staging down this pipe (it happens when we unplug HDMI cable) causes
mixer1 under run because at the vsync moment dtv_pipe is disconnected
to mixer1.

CRs-fixed: 349765, 355110
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit b2bdae8ee4262a4e1d8e8e7f9c91b80790bdff27)

Change-Id: Ifcc38e5c954c4e58a9328ea3c85a5a1baa5ad826
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit 8ff14bda4a8de3ab4c567c06d9eb283a996bb686)

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: vidc: Fixes bug in handling duplicate frames.

Fixes bug while closing encoder which supports
duplicate input frames. This fix decrements
the reference count of original frames
appropriately.

CRs-Fixed: 366268
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
(cherry picked from commit af4a0ef0c6162e89c063b04da0a037246fcc76b9)

Change-Id: Icf36d82e78588bf4b5becf480bdccd4c7cda94a5
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit c4cee17571e07afd6c0fe0c50c8934ccfef50ae2)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
msm: vidc: Perform cache flush only for non-secured
mode.

The cache flush for secure mode is not needed as
no memset is performed. Pass the correct parameter to
cache flush to avoid kernel panic.

CRs-Fixed: 374719
Change-Id: If9bfe1025b15b24e17ec49590c21a59d77f9414c
Signed-off-by: Arun Menon <menon@codeaurora.org>
msm: vidc: Extract PAR info for MPEG4/DIVX.

Display needs the pixel aspect ratio information
from the video decoder to display the picture
with the right aspect ratio. Video decoder extracts
the pixel aspect ratio information from the
video core and passes it to the client/display
as extradata.

Change-Id: I513e93bb8c2c08aa7ad85e5b82718cb9dab724ec
Signed-off-by: Arun Menon <menon@codeaurora.org>
vidc: 1080p : Add support for slice delivery mode to encoder

Slice delivery mode enables confguring the encoder to deliver
one slice per output buffer. This mode is valid only for h264
codec when multi slice config is set to slice by mb.

Change-Id: Ibc9f3193faa3e1bc6009a6521475ef15966fc7c1
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>
vidc: 1080p : Add support for skip frame in slice delivery mode

Slice delivery mode for H264 encoder will deliver constant number of
output slice buffers for each frame. In case of CBR rate control method,
core will skip frames to maintain the output quality, in which case
driver need to send out the output buffers with data length as zero
for skipped frame output type from the core.

Change-Id: Id81330b28f1f17b97eb2c79c86558bd072b62c4e
CRs-fixed: 362356
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm_fb: display: prefill two writeback frames for lcdc.

Pre-fill two writeback frames before enable writeback mode
to avoid flickering for lcdc.

CRs-fixed: 325327
Change-Id: I2ae6edea4578441f2027cc7657c851cf9646a28c
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Update Toshiba DSI-to-LVDS to support WUXGA panel.

Add 1920x1200 WUXGA panel support to the Toshiba DSI-to-LVDS driver.

Change-Id: I2de71377f83de9847ef6b25b89dc5ae563279d1b
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Read DSI platform's data lane swap for Novatek panel

Read DSI platform's data lane swap setting for Novatek panel and
set it in panel info for programming internal lane control
register

Change-Id: I762ed4a526e205803ff64c8eb92ce7758ab1d946
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Add write permission for 3D barrier file.

Allow user space application to write to 3D barrier for control.

Change-Id: Ia58597ad3707faa3f2d89de5f53fc77cfd97530a
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Featurize pm operations for external display

Featurize suspend/resume operation of the external display
to resolve compilation error in cases where external display
features are not defined.

Change-Id: Ifae276f514b67314a22e50fd80237e2168482d3f
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: add mixer2 writeback userspace support

Apps, e.g. fbtest can access mixer2 writeback functionality in
userspace by providing ion writeback buffers.

Change-Id: Ia56ac5275854231f1f28066f78db6dda97bb7b85
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Add mutex during display turn off

There is a possibility that suspend operation trigger during
a display update. Add mutex to serialize suspend and display update
operations

Change-Id: I52dea1bd718e8c54d894ae3830e86105f951efab
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Add I2C interface to Toshiba DSI-to-LVDS driver.

The Toshiba bridge has both DSI and I2C interfaces.
The DSI interface is used for configuring the bridge registers
during setup.
However, when video is running via the DSI interface
then the I2C interface is used for read/write
the Toshiba bridge registers.

Change-Id: I6e90244948e09710fb9f55f1d828e73e1218e266
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Initialize work queue for MIPI command mode panels

Initialize workqueue for MIPI command mode panels for s/w refresher
mechanism to work in x-window type architectures.

Change-Id: Id67c54452aa0b02a39f480709fc4bcd6c7bde2eb
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb:display: add display support for mdm platform

add setting for no mdp hw case
add ebi2 epson qvga panel setting

Change-Id: I91b9ef1890a66eb95c14f8a393b89baa757904a5
Signed-off-by: Zhang Chang Ken <kenz@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:
	drivers/video/msm/Kconfig
msm_fb: display: remove #if 0

Cleanup all #if 0s in display driver.

Change-Id: I32473b33ad4dff3e5d3d91aae42d70955836cd52
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Epson ebi2 panel support

Support fb with ebi2 only(without mdp)
Add Epson ebi2 qvga panel support

Change-Id: If61b2c522a102133f98f27b21dcc18d057b7ef25
Signed-off-by: Zhang Chang Ken <kenz@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:
	drivers/video/msm/Makefile