Delete: MSMFB_METADATA_SET ioctl

Change-Id: I8ade36cf09985277cf66c39d4f09c3c2f38e7953
msm: display: Buffer sync point support

Add MSMFB_BUFFER_SYNC ioctl for the communication of
the acquired and released fence fd between kernel and hwc.

Wait for acquired fence before pan display.
Signal the previous released fence after pan display

Change-Id: Ief14b55fc9905efafe10be93bbba2073dc2041c6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm: display: add sync point support in overlay commit

Wait for fence signaled before commit, signal previous
fence after commit done. Same as pan display

(cherry picked from commit e622fc13cb58becfc077a830421e471abcc08140)

Change-Id: Ic7f95de86c5776a17ab1e5b7457e2dfb1108b576
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: display: make pan display as a non-blocking call

Schedule a workqueue, do the current job in the workqueue handler.
Block the second entry if the first one has not finished

(cherry picked from commit c760154faefd4772824cc2b032f5375f4ff1b75e)

Change-Id: I38d5487a9002d08449f865b35720adb54e158f5b
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: display: add display commit ioctl

Display commit ioctl will do what pan_display
can do, addtionally has customized setting, such
as non-blocking call.

(cherry picked from commit d88df9d27e44fc35d16c7a4ea92508db1df12d8f)

Change-Id: I17e781c96f93f3d937020392e3bb7f090283a0b2
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: display: buf sync enhancement

Support waiting for acquire fences in the buffer sync ioctl.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: fb: make the pan task interruptible
msm: display: allow fb open even in suspend state

resume might be coming later, allow fb open sucessfully, only
panel driver needs be delayed

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: display: panel recovering from suspend

In suspend state, fb_open cannot turn on panel, need save this info
for resume.
In suspend state, blank setting needs be cached to be used at resuming.

(cherry picked from commit 9f7c82eaed91b9950d5ff5b1bbc77c6221a98afb)

Change-Id: I222f706774d0eed61a1cba6e8154ffd2337c2563
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: display: Do not create release fence in suspend

When in suspend state, display operation will be stopped,
fence will not be signaled

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: display: add more checking to ensure display is idle

Before execute operation on display, make sure it is complete idle
Because non-blocking display update has been introduced, need make sure
display update has finished in all entrances except the ones for
initialization.

Change-Id: I0660080262b7e5895f5f558c0a9f71aa84b9aa99
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: display: Increase timeout value for fence waiting

In some benchmark use case, graphic engine is extremely
busy, need increase the fence waiting timeout value.

Change-Id: I3c483f98fa86030b283edd8a79e7b70fa1c06335
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: display: check get_unused_fd_flags return val

Not checking the error code, which might be negative, will cause us to wrongly
reference fdt[fd] by using the error code, causing kernel panic in fd_install.

Change-Id: I1f8e68e74bdbdd5b81bc3450f7d93b5cd96c9439
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: display: display idle checking update

msm_fb_blank_sub might be called for UNBLANK from
display update work queue, which is at commit state.
Idle detection is invalid in this situation
Add detection for external snd earlyuspend/resume interface.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm_fb: call complete for no_update timer after power flag is set

In Suspend case, after we complete for no_update timer and before
we set power down flag to false we might recyle the CABL sequence
which might cause do_hist to fail till resume

CRs-Fixed: 434491
Change-Id: I51f9f0d9edb26c7671d44162f55c01acdde8f3d7
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>