Revert "arm: new way of handling ERESTART_RESTARTBLOCK"

This reverts commit f9e04c1cdf95f7e1d92d7b9d6898990c347654a9.
Clean asus changes
Update thermal driver
Update defconfig
Clean sync.c
sync: Fix a race condition between release_obj and print_obj

Before this change, a timeline would only be removed from the timeline
list *after* the sync driver had its release_obj() called. However, the
driver's release_obj() may free resources needed by print_obj().

Although the timeline list is locked when print_obj() is called, it is
not locked when release_obj() is called. If one CPU was in print_obj()
when another was in release_obj(), the print_obj() may make unsafe
accesses.

It is not actually necessary to hold the timeline list lock when calling
release_obj() if the call is made after the timeline is unlinked from
the list, since there is no possibility another thread could be in --
or enter -- print_obj() for that timeline.

This change moves the release_obj() call to after the timeline is
unlinked, preventing the above race from occurring.

Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
sync: Add a "details" callback for sync points

Allow drivers to add a callback for expanded details about a sync
point.  This provides for a much richer debug experience than can
be provided by the simpler callbacks.

Change-Id: Ic0dedbad19fddc2f9b753d886994247e8025d6dc
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
sync: Only print details for active fences

Only call the pt_log callback for active fences.

CRs-Fixed: 744197
Change-Id: Ic0dedbadf0f5979fc155cdef332fedda9047f440
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Update KGSL to "one plus one" latest driver
msm: vidc: Provide qmenu for V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_MODE

The v4l2 control framework requires a qmenu containing a string
description of each menu item.

Change-Id: Id41fd794a6f7ad8711caf9d072975ad6cabad6f9
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: initialize venus hfi locks during hfi creation

Venus hfi locks were initialized during core init,
which is invoked when the first video instance is
created. If a debugfs command is executed before
starting the first video instance, then video driver
crashes trying to lock an uninitialized mutex.

Change-Id: I472e9de91dada94a2728dd02c747e7fde63e3e4f
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: vidc: Add entry to scale buses for True 4k @ 24 fps

We weren't asking for enough bandwidth for 4k (3840x2160) @ 30 fps
sessions because we were missing an entry for True 4k @ 24 fps (which
requires less bandwith).  Now sessions of the former type are mapped to
the right ab-ib values.

Also get rid of some unused macros in msm_vidc_common.c

Change-Id: I40d3f8d079ffba586d96e8042b40bb0648ba7ae2
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
ARM: dts: msm: Add new property to specify OCMEM size

OCMEM is required by video hardware to deliver optimal
performance mostly at higher resolutions/fps. For targets
which have low specifications, OCMEM is not needed or not
needed as much as for higher targets. This change adds the
property to dtsi file to specify the size of OCMEM.

Change-Id: I65ae271bc73d302975957727a95461c7388727f6
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974.dtsi
msm: vidc: Free smem client after moving core to UNINIT

If userspace crashes prematurely, there will be a good chance that the
driver hasn't unmapped or freed certain buffers.  These buffers will be
freed in the state transition to UNINIT.  At that point the smem client
needs to be valid for the free/unmaps to be valid.

CRs-Fixed: 611946
Change-Id: I089dcbd1e79f1c2a8671e5719d3a5dbc9926b252
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: Re-program the vbif settings post-power collapse

As part of power collapse we turn off the venus GDSC. When we turn it
back on, we need to re-program the VBIF registers to overwrite the
reset values.

CRs-Fixed: 585609
Change-Id: Ic2ac40274773f9592f510ccb573b9d4920a8647f
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: Update vb2q buffer sizes

Currenttly is updating vb2q buffer size on CAPTURE port.
only.This change will update the buffer size on OUTPORT port
along with CAPTURE port.

Change-Id: Ieb0a898ae5b012f3bf1a1073d2ddf5ce72647252
CRs-Fixed: 621134
Signed-off-by: Prasad Nallani <pnalla@codeaurora.org>
msm: vidc: send release buffers cmd during instance clean up

During instance cleanup, if internal or output buffer
list is not empty, respective buffers are unmapped.
Modify the cleanup instance to send release buffers to
video core if internal or output buffer list is not
empty and then unmap the respective buffers.

CRs-Fixed: 619239
Change-Id: I56bd4248173992dedfb36098dfa9ddf35fc12a4e
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
msm: vidc: change error msg for max sessions condition

When the max sessions condition is reached, the firmware
sends session init to the driver. Change the error message
from 'core is in a bad state' to reflect the actual
behavior.

CRs-fixed: 625684
Change-Id: Iddf7d3fc72c1c2696200789954c1e69fd0419dca
Signed-off-by: Pushkaraj Patil <ppatil@codeaurora.org>
msm: vidc: remove non fatal error messages

V4L2 core fails reqbufs ioctl if file IO is in
progress. This message is non fatal, so avoid
logging it as a error message in the video driver.

Change-Id: Ie5ea22925f9c698c82cfaeb6e77b66cf77e5e866
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: vidc: return EBUSY when hw is overloaded

Component reports hw error to client immediately in
the same thread after stream on failure and blocks
subsequence errors to client. Therefore, the async
v4l2 event "V4L2_EVENT_MSM_VIDC_HW_OVERLOAD" will
be ignored in component.
When loading resource fails because of hw
overload, instead of sending V4l2 event, we are
going to return EBUSY and this return value will
be checked in userspace.

Change-Id: I26b3315afbe4c7cc4be9e740595d1db5153467dc
Signed-off-by: Jia Meng <jmeng@codeaurora.org>