msm: mdss: Cleanup iommu ref count implementation

With current iommu ref count implementation, iommu is
attached at points when only needed and detached once
finished. Iommu reference count in overlay pan display
path is currently missing hence add it. Also remove
code repetitions and unnecessary error checks while
decreasing iommu ref counts in overlay and writeback
path.

Change-Id: If1aed768e5d704dd6c9d4bfd17c1ec368c8d8711
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
msm: mdss: Make sure clocks are on during kickoff

Avoid a race during kickoff when DCS commands are sent.
Keep clocks on until our irq is enabled and the start
bit is finally written.

Change-Id: I2a7fe57cd9aff0b60bc7969ff514203ee5c72e1b
msm: mdss: Fix error handling in DSI panel on sequence

Change-Id: I5abad64202b631a71f534e67cf6d590c6c702029
msm: mdss: dsi: Share panel alignment restrictions through sysfs node

Read panel alignment restrictions on left, top, width and height values of
the updating ROI from the dtsi file and share through sysfs node.
Framework needs these details for configuring MDP for certain
features (e.g. Partial frame update).

Change-Id: Ibe6973b721bb20120a6d7a217bad2d0d159cc836
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
msm: mdss: Share minimum width and height limitations on panel ROI

Add panel ROI limitations on minimum width and height values
to the panel info sys_fs node.

Change-Id: I3297beb20e7f207a296e6cec114daf2305324898
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
msm: mdss: Consider FLIP flags while optimizing pixel fetch

While calculating source and destination rect of a pipe for the
programmed ROI, consider FLIP flags set for the pipe.

Change-Id: I631453c26f443b08a23556f83195d9914e05b41d
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
arm/dts: hammerhead: Set panel name

Change-Id: I7f0f460050b3ab60abfc631a5933e88a9d951b56
msm: mdss: update DSI ULPS exit sequence

Analog upstream commit: e8c272ba5c3f23e6cece61bde7834cab7922a1d4

When MDSS idle power collapse feature is enabled in conjunction
with the DSI Ultra Low Power State (ULPS) feature, it is possible
that the MDSS GDSC can be turned off once the DSI lanes are in ULPS
mode. When ULPS mode is subsequently exited, the DSI controller
should be reset prior to executing the DSI ULPS sequence so that
the exit sequence conforms with MIPI D-PHY specifications. However,
this could sometimes lead to DSI lanes not being in the stop state
after exiting ULPS leading to DSI command transmission failures.
To address that issue, force the DSI lanes to be in stop state upon
exiting ULPS.

Change-Id: I2c775fd257e2236670acd90b440912da1a9ee005
msm: mdss: Disable the PP features if partial update feature is enabled

Check the whether partial update feature is enabled or not before enabling
any post processing features.

Change-Id: Ibf2111d5ca8714279903980d14e63bab556bb41f
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
msm: mdss: double check mdp ping pong done state

There are cases where the irq trigger may get delayed for more than
expected, in such cases the ping pong done status may have been updated
by MDP hw. Add additional check to see if this has been triggered even
though interrupt wasn't scheduled for pingpong done.

Change-Id: I4730d166d95f238f4525eab2b5c99be40b30699b
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Revert "msm: mdss: Enable overfetch unconditionally"

This reverts commit 0c2915e6a0c034e37dd6c983a9b80add5748b9a8.
It fixed the time green line but broke neflix video playback.

Change-Id: I39c5f992ed42256c7bfc0d6fba7f959bd26c2c4e