Revert "msm: mdss: move rotator SMP reservation to rotator setup"

This reverts commit 5c80158b3ddf53387444acf3c8a1732dd91330c6.
Revert "msm: mdss: Avoid variable overloading"

This reverts commit 89489261180378f6c7fb7b38e2c1f943dc46d037.
msm: mdss: Fix ARGC error when writing LUT to registers

When updating the ARGC LUT registers, the data is incorrectly written
such that the arrays are off by one index. This patch fixes that error
by starting from the correct index.

Also, when the READ flag is enabled for ARGC, the dirty flag is no longer
set.

Change-Id: I7e8e19c51d5891cd11344a425f1a8ac47d57368c
Signed-off-by: Benet Clark <benetc@codeaurora.org>
msm: mdss: Set correct flush bit for writeback mixer.

Wrong flush bit is being set for writeback mixer which can cause
MDP hang/unexpected behaviour when the mixer is used in line mode.
This patch addresses the issue by setting the correct flush bit.

Change-Id: Ie0c2ee27b1f466164a8fb84f7daae9309b74d1d8
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
mdss: Avoid panel ON commands during boot up for command mode

In command mode, when continuous splash is enabled, we do not
send the panel OFF commands through the SPLASH_BEGIN callback.
Avoid the SPLASH_FINISH callback also for command mode since
panel ON commands are not required to be sent. This avoids
unnecessary warnings during boot up.

Change-Id: Ifc249f259655045ecd799b57e1efb964238c504a
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: increase height constraints for panel resolution

MDP is able to support higher resolution and is only limited in height
by the MDP clock rate. There is already check in place for the MDP clock
requirement, however need to update phase step calculation to handle
proper overflow conditions for these higher resolution according to
hardware constraints based on potential overflow while scaling with some
phase steps. At the same time hardware is able to handle some conditions
that are currently failed, so enable these to allow more cases that can
go through MDP.

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

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_overlay.c
msm: mdss: set the mdp core clock rate on 8x10

During the kernel initialization, we need to set
rate on the mdp core clock rate.  Otherwise, the
core clock rate is at its minimum, causing display
under-run on large panels.

Change-Id: Idcd69a758cbf3022f8ad6590b021f21dad5972b1
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
msm: mdss: Fix debugfs string overwrite

If more than one display paths are active, like split display or external
mirroring, and stat debugfs node is read then debug data for only one
display is shown. Fix this by using correct offsets.

Change-Id: Ia8b36eb3105f6df8f096ff544b82cc49c9b31a48
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
mdss: display: add support of additional EDP color bit component

Add support of additional color bit component in addition to
existing 6 bit color component.

Change-Id: Ia0ee7b5d62deb963b13741d2bfcd03a40993d96e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
mdss: display: add edp frame rate

Add edp frame rate so that run time bus bandwidth requirement
can be calculated correctly.

Change-Id: I6ac147f35dd6d35aec9799d8f9e5c96e149d8161
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
mdss: display: add mdp core clock to edp control

Since mdss interrupts are generated in mdp core clock domain,
mdp clock need to be enabled along with edp clocks to have edp
interrupt be delivered to edp during edp probe.

Change-Id: Idad19dddfdc2aed9efda15b28b666ac0411dbbda
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: mdss: do not shut down edp link during link training

Use locks to prevent shutting down edp link at panel off if link
training is ongoing, since EDP Link training requires that link
is in running state.

Change-Id: I79715675f0a919815dfc60689215f4771400b28a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: display: hdmi: vic search

When looking for vic code, get the one that can
match the basic timing if cannot get the one matches
all.

Change-Id: Id054b1c7586d2bfe420443d94c8d5750c96c64d8
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: mdss: fix IGC access for calibration service

Fix IGC address range access on DSPP and SSPP pipes
for calibration service.

Change-Id: I5601f0da1088ea9c31d98e13d0cc5f9c7e33ce3b
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
msm: mdss: clean up overlay resources properly when display is off

When display is turned off, the clocks are already turned off and
unprepared.  Earlier, when unsetting the overlay resource, we were
trying to re-enable the unprepared clocks.

Change-Id: I36e79e4a0bdbbe35f4474527a09a4da59cbec96c
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
mdp3: ppp: simplify ppp completion logic

This fixes issue where ppp would no longer process requests
claiming that ppp core is hung, when in fact ppp core was
not active at all.

Change-Id: I257858a61df5b3141d835ad6c6fff78c72bf7cbd
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: mdss: allow re-queue of writeback buffers

When a buffer has been properly processed, client may choose to use sync
fence to acknowledge when buffer is complete. In such cases dequeue is
not necessary, allow this use case by allowing client to re-queue
writeback buffers as long as the buffer has been properly processed
already.

Change-Id: Ibac1eb9710477734e1ee2daf8136085d4439b0d4
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: initialize write back arguments in kickoff

The kickoff code relies on the fact that write back arguments are zero
initialized to check for available buffer. If it's not zero initialized
it may pick dirty buffer address from stack.

Change-Id: I7309f8fe508640833a182a8ecdb2d3be1797fab7
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: add iommu attach in bus bandwidth control request

Add mdss_iommu_attach in mdss_bus_bandwidth_ctrl to
attach iommu on bus bandwidth enable request.
mdss_iommu_attach/mdss_iommu_dettach can happen in
separate thread, which may lead to a race condition
where attach/detach may happen at same time. Add lock
to properly synchronize the iommu attach/detach to
fix race condition.

Change-Id: I45c8ef1fa1fa1c2da9c6c3702bd007856e469b9d
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: mdss:Add splash logo configuration entry in fb

Framebuffer driver displays penguin logo image
for all targets. Bootloader also displays the
same image. However, customer has to change this
boot image at two places if they want to display
different image than penguin logo. This change allows
customer to disable/enable the splash image from
framebuffer driver.

Change-Id: I56e78ce93aa8c218adffef03bfebd462d6bda254
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>