msm: mdss: Handle null panel name configuration

LK sends default panel parameter string through
kernel command line argument if auto detection
fails or display is not enabled. DSI driver probe
is failing to parse this panel parameter passed by
LK. With this change, DSI driver will select the
preferred primary panel configured in dtsi if
it parsing fails.

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

Conflicts:
	drivers/video/msm/mdss/mdss_dsi.c
msm: mdss: Sanitize read of panel properties

Check panel property's values properly before operating on
them.

CRs-Fixed: 562887
Change-Id: I26ce51e8b3a8e9328e7b6370b9c56d67fcdd1901
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: mdss: fix the non-continuous splash screen use case

In the non-continuous splash screen use case, we need to
stop the display.  The display clocks are on before we
stop the display.

Change-Id: If8f76d4776fb64f4deb89e5b78c52ab54a56f02a
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
mdp3: Wait for proper vsync when updating display frame

This fixes an issue where we would report that dma is displaying
new frame, but in fact were really still displaying the old
frame.

Change-Id: I99dc89b2341481ea42f9cce451b9b2833dd1f700
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
mdp3: Prevent deref of invalid pointer that contains err code

It is possible that mdp3_iommu_meta_put with a non null iommu_meta
that contains PTR_ERR value.

Change-Id: I440c78e324f558fec22d2db373dfd2c0e4d5fbb7
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: mdss: allow histogram stop operation while display is off

After the display is off, the user space can still call histogram
stop operation.

Change-Id: I5c28b3e7e0529319de9d22ca49bdd606994cf7fd
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
msm: mdss: Fix race condition for vsync irq enable/disable

Disable and enable of vsync happens in separate thread, which
may lead to a race condition where enable/disable may
happen at the same time and resulting irq in disable state.
Add lock to properly synchronize the enabling/disabling
of vsync interrupts to fix race condition.

Change-Id: Ib52bea5ca7a3612c866a4a962f09725a77e40563
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
mdp3: Enable sw vsync when dma is not active

Recently in an attempt to enhance sync event reporting we
prevented sw vsync when dma is turned of from toggleing display
off and on.

Change-Id: I71c9be55d36dc92e513d9f5ead4d1e42157285c6
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: mdss: Returning NOTIFY_SUSPEND while polling NOTIFY_UPDATE

mdss_fb_update_notify does not return Suspend in NOTIFY_UPDATE
case. Daemon polls on NOTIFY_UPDATE but does not get Suspend
notification. Hence Daemon would not stop polling.

Suspend Case is added in UPDATE case.

Change-Id: Iaeaf819a6849acda2eb7eb78f0fc3306866d1b64
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
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: 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>
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>
qseecom: increase load app timer delay

double load app timer delay to 4000ms

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: Wootever <Wootever@users.noreply.github.com>
dts: add msm8974pro frequency