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: Ic0de960d92a771d74c303dac7100734d6411fc45
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: mdp: Use a waitqueue for vsync notifications

Use a waitqueue instead of completions and make sure the vsync
show event always returns the timestamp except when it is
interrupted. This simplifies the vsync wait mechanism both here
and in userspace and avoids any unnecessary locking.

Change-Id: Ia3c2fce24e50d6b1e7fa1b36c668d5cc8678a1c6
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: mdp: Wait unconditionally in internal vsync waits

Do not wait for timestamp to change for internal waits as the
waitqueue can be woken up from places where the vsync timestamp
doesn't change.

Change-Id: Ibd922d09975fad79065792f5da44816f3fea3044
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: display: Do not commit in unset for external.

In case of external, commit is happening in unset itself which
is causing flickers. This patch fixes the issue.

Change-Id: Id55346be7a155108954e23bef236db80e7b65152
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm: vidc: Don't free shared memory on channel close

The driver already frees the memory in vcd_ddl.c at ddl_close().
No need to prematurely free the memory here.

Change-Id: If1ddacf68770113423d4aeb2b72e79caf5ca07ce
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Reset stop_called state when START is called

The driver needs to reset the stop_called field once START called.
Otherwise in START, STOP, START, STOP sequences the secondary STOP will
be treated as a duplicate STOP and ignored.

Change-Id: I8b7d069236027a01103c80b7deeb19c331ede05a
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Amend error check conditions on ION APIs

Amend error check conditions appropriately to return
properly from video applications in case of ION API
failures.

Change-Id: Ibe95a8438a66e88b35dbff0af8842ff4b038c5e1
Signed-off-by: Maheshwar Ajja <majja@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: I03862906be603ff769fb6aa0a2191a9ea87529ca
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: set EOS on output buffer pending transaction

If EOS is signalled while an output buffer is in transaction,
mark EOS when that buffer is returned.
This is observed in case client sends an empty buffer with EOS

Change-Id: I9b4ce6331eb7a70886c1802d1f99e1d77d65fa64
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
patch: update graphics drivers (squashed from caf)
Revert "mach-msm: cpufreq: switch to caf version"

This reverts commit bcae1289f7f60ee707c3864bc4d11795609aff13.
Revert "cpu: lower minfreq to 144Mhz"

This reverts commit 5ff86f7f831a8ae33b063a7909641a230a7b266a.