Revert "msm: mdss: add dynamic clk status check to pipe idle verification"

This reverts commit 6290618586da63c2fd4b58cfd2420484b31baaad.

Conflicts:
	drivers/video/msm/mdss/mdss_mdp.h
	drivers/video/msm/mdss/mdss_mdp_overlay.c
Revert "msm: mdss: ensure pipe is halted before freeing buffers"

This reverts commit d12aac295b0f05c05028282c006c357bd2d6f1d1.

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_overlay.c
Revert "msm: mdss: Handle case when pipe is not idle during cleanup."

This reverts commit b861c615606b7520e483333f15d5280d33c8feaa.

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_overlay.c
Add oppo drivers/video for now
Remove VENDOR_EDIT
Clean up board-8974
msm: mdp: Add retire fence

Generate the retire fence with a +1 offset from the current
release timeline. This would mean that the retire fence of the
last frame is signaled when the current frame has transferred.

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: mdss: expose MDP capabilities through sysfs

User space applications currently rely on special private ioctl to query
capabilities of MDP driver. As more capabilities are added it becomes
more difficult to have to extend and maintain header file compatibility.
Provide a sysfs node which can be queried for MDP capabilities.

Change-Id: I59efb29bf465083a1ef65c0419226788b44085b1
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
mdss: Fix writeback

Fix retire fence threshold for writeback.
Notify when writeback buf is not available.

Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
mdss: Validate sync timeline object before inc

An earlier commit - 4b7db574f061e13857e3780ceddd24ab0681628b
removed this by mistake. Restore this check.

Bug: 10953656
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: mdss: create new vsync timeline for retire fences

Retire fence timeline should follow the actual panel vsync more closely.
In case of command mode the panel vsync can be different from buffer
release timeline. To handle the panel vsyncs better, create a new
timeline for the retire fence signaling.

Change-Id: If8a1eb717d733ca215275a8be4f0054091dbc147
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: increase retire fence timeline with retire count

Account for cases where multiple retire fences are acquire before
previous ones are signaled. It may happen that the next retire fence is
acquired before the current one has been signaled, we want to signal on
the next vsync instead of the current one.

Change-Id: Ieff3115f9b10ea1a917eebdb6a32e44bc2e71c73
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
video: msm: mdss: am54272844ee: merge fixup
drivers/video/msm/mdss/mdss_mdp_util.c: fix: warning: array subscript is below array bounds

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
video: mdss: fix uninitialized variable

Change-Id: Ic4f84375b75dd036c3df16485078ef9621e17e64
msm: mdss: implement overlay prepare ioctl

Overlay prepare will allow a full frame with multiple overlays to be
configured at once and perform frame level checks before being pushed to
display. This function guarantees that if the call is successful, the
frame can be displayed successfully on the screen when display commit is
called.

Change-Id: I276b6fe3e0a872a2e93170f3cea1002d3ce0dac9
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
msm: vidc: Add support for MBI extradata

Macro Block Information extradata (if enabled) allows interested
clients to query for metadata about each macroblock.

Change-Id: Icfee32770018338e28ae149e1ccb654f5a48cbec
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>

Conflicts:
	drivers/media/platform/msm/vidc/hfi_packetization.c
	drivers/media/platform/msm/vidc/msm_venc.c
	drivers/media/platform/msm/vidc/msm_vidc_common.c
	drivers/media/platform/msm/vidc/vidc_hfi_api.h
	include/linux/videodev2.h
msm: mdss: Add support to get/set secure flag via an ioctl

Add support to get/set secure flag for WB session through an ioctl.
This is required for WB clients such as AD/WFD, enabling them to modify
or query the secure flag depending on requirements e.g. secure video
playback when using AD.

Change-Id: I852b6f79b31b5ba027d9a5c11561c562023cb99f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_mdp.h
msm: mdss: add retire fence support

Retire fence timeline should follow the actual panel vsync more closely.
For video mode the retire fence can be signaled along with the release
timeline with +1 offset, since this is signaled at vsync.
In case of command mode the panel vsync can be different from buffer
release timeline. To handle the command mode panel vsyncs better, create
a new timeline for the retire fence signaling.

Change-Id: If8a1eb717d733ca215275a8be4f0054091dbc147
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_fb.c
	drivers/video/msm/mdss/mdss_mdp_overlay.c
msm: display: Add pipe type selection in overlay request

Allow user to specify the type when requesting an overlay pipe.
If field is set the pipe type indication in the flags will be
ignored.
Change-Id: Iee51d24b96c7a2a987dc70a439342e6548dfc8fa
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>