MR2 Bringup on mr1_chocolate_rb1 line: Display Bring-up

Change-Id: I3d4202578f5b09d521926e246e6fe4dcf623a48f
Signed-off-by: Justin Philip <jphili@codeaurora.org>
msm_fb: Update MDP fence wait behaviour

The current fence wait times out too early in cases where the GPU
is under a heavy workload. Change this behaviour to warn and wait
for a longer time for GPU to complete it's work.

Change-Id: I8b20c22733a77c1aaea4a1fd1e4daaa14b5ec2fd
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
vidc: Fix EOS handling if video h/w has a frame in transaction

In case of video hardware is encoding a frame and EOS buffer with
with zero data length arrived, set the EOS flag to the transaction
available in the transaction table which will be passed to the
client in frame done callback from the video hardware.

Change-Id: Ia58b89b9957c3b270a773754fe203d92e238d99b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: add support for the bitstream_restrict flag

Adds support for the MFC core to add the bitstream_restrict flag in the
sps/pps for H264 codecs.  This allows for the decoder to determine how
many frames to buffer when decoding.

Change-Id: I0415de0704d0f0d5099cc97ca7937c955e504883
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm_fb: HDMI: Correct order for BKSV read operation

During HDCP authentication, the BKSV read operation
should be issued after writing AKSV as per the HDCP
specification. This change fixes this issue.

Change-Id: If5de484fe19dd3e949107d5b0d72f9594ee2e76f
CRs-Fixed: 327845
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: hdmi: CEC Message queue flush

CEC message queue should be flushed when CEC
function is enabled. If there are residue CEC
message, they might cause collision at message
queue.

CRs-fixed: 338811
Change-Id: I6268528417d660fab48818ae67e94e169abbb217
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: CEC re-transmission improvements.

Adding some improvements to HDMI CEC code flow to
reduce the risk of system crash and compliance
failure by proper CEC resiters settings and positions
in code flow.

CRs-fixed: 336541
Change-Id: I8fb3510190e5c4ff83b3785c51bade139f20692c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: HDMI: Reset HDCP reauth flag when powering off

The software flag used for storing the HDCP reauthentication state
needs to be reset whenever the HDMI device is powered off. This is
needed to avoid a potential reauthentication attempt upon a
subsequent connection which could lead to device hang as a result
of incorrect sequence of register accesses.

CRs-Fixed: 444312
Change-Id: I6b5b08394dd96ccbc08c4ca72b6dc4b2c4dbf6be
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: hdmi: update data on resolution change

On changing resolution, all information related to display
needs to be updated which helps in calculating the right mdp
clock for each resolution.

CRs-Fixed: 436151
Change-Id: I1ab6e5859491936a7fa8c62247da9ef5a0ff45ef
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: hdmi 3d length check

This change fixes a case where the length of 3d data is not
properly used which could have resulted in wrong 3d data parsing.

CRs-Fixed: 445505
Change-Id: Id285204bdb8c2d881becaa5b07b973eba4240d93
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: change sysfs node permissions

Change the write permissions of sysfs nodes from UGO to USR + GRP

Change-Id: Ided5351669eb0f3cdf9ae1a0c1607ef6e76f6852
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: Check for stale HDCP variables

Check for stale HDCP variables like An from previous authentication
failure. In case of stale data, wait for some time to make sure HDCP
has has fresh data.

Change-Id: I37685a0246f3b60c383e3bf8d024c2b13fb3e5f6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: Return proper clock get error code

This change returns the proper error code while in probe and trying
to get the required clock and fails. This is required for probe deferral
support.

Change-Id: Ief91b1f634c06d3679157313506b56e5948aa79c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: display: Fix compilation error for non-HDMI builds

HDMI dependent functions need to be guarded under HDMI panel
macro to avoid non HDMI builds complilation errors.

CRs-Fixed: 366864
Change-Id: Ib2a9f6db4eb511b2a170fcc7ac979f6c41046baf
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: Remove control of HDMI PLL regulator

The regulators required by the HDMI PLL are now controlled within
the clock driver. Remove the explicit control from mdp.c.

Change-Id: Ia2975a5a83b77cd9e21fc43cabea754b7b040dd5
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c

Signed-off-by: Justin Philip <jphili@codeaurora.org>
msm_fb: hdmi: HDMI suspend resume event handling

This change makes sure that we do the proper HDMI ON settings at resume
and also send the events to user-space about current status of HPD after
resume.

CRs-Fixed: 422372
Change-Id: I8ca79fd07840b3227c9472588853b0ca2749760b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: Do not turn on HDMI if not ready

At bootup, if HPD is not configured, HDMI is not in
the state of getting turned on. This change makes sure
HDMI is not turned on/off unnecessarily which turns on
clocks as well.

CRs-Fixed: 447511
Change-Id: I074d9c463943770775b060c4a93b9120dfe9bcf0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>

Conflicts:
	drivers/video/msm/msm_fb.c

Signed-off-by: Justin Philip <jphili@codeaurora.org>
msm_fb: hdmi: HDMI resume delay

Remove the delay in HDMI resume sequence by not waiting for HPD
to be switched on. HDMI panel will not be turned on by default
when the device resumes and would instead be turned on by HPD
sense if it is still connected.

CRs-Fixed: 440559
Change-Id: Id276dddbcebf9226e9688aa1b5dad4b281545b21
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: Optimize the resolution change on hdmi interface

HDMI resolution is changed twice on cable connect.
This will optimize resolution change by turning on
HDMI core only once, with best possible resolution.

Change-Id: I7f636b0c2c64eb3c661fda2a709b5480db05bd27
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
msm_fb: hdmi: Resolution modes on HDMI

    Add a new header file that lists all supported
    HDMI resolution modes and the associated timing
    information.

Change-Id: I6d4bc951d2f460977e14cee0028bcd1f8a449b06
Signed-off-by: Justin Philip <jphili@codeaurora.org>