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>

Conflicts:
	drivers/video/msm/mdss/mdss_fb.c

Change-Id: If109eb7dcc4e3e26ac707e0540cb3694e6f20127
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: 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>

Conflicts:

	drivers/video/msm/mdss/mdss_mdp_overlay.c

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_overlay.c
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>

Conflicts:
	drivers/video/msm/mdss/mdss_mdp.h
msm: mdss: Support multiple vsync handlers for CMD mode

Add support for multiple vsync handlers for command mode panels.

Change-Id: I21bf032ac20100dce252dcc09400ad2142a1dcf4
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>