msm: mdss: Fix DSPP layer mixer programming

DSPP block being programmed should be the same as layer mixer attached.

Change-Id: If2b051682cc03563b13264b736ddfc2e1c9ed638
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: mdss: Fix register address range check

Register address range was incorrect. Fixed the bounds of the check

Change-Id: Ide6d912c77aa9e182e854d502551fc71f4bd3615
Signed-off-by: Benet Clark <benetc@codeaurora.org>
msm: mdss: Fix ARGC copy size from user

User cfg for ARGC gives varying number of rgb stages. Fixed ARGC config
to only copy data based on number of RGB stages.

Change-Id: I425527b12364b03bbcd8c9d984a2675cd8444d62
Signed-off-by: Benet Clark <benetc@codeaurora.org>
msm: mdss: sanitize histogram bin count

Ensure that histogram bin count value is sanitized,
this ensures that the length of data copied back to
user remains in check. This prevents excessive
data in kernel memory from being copied back to user.

Change-Id: I0f7787603bad950c0b187d8c38d4fa3366bc06b6
CRs-Fixed: 517476
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
msm: mdss: Support planar output format for rotator

For high end targets planar format as output from the rotator
can be supported as there are more SMP blocks available relatively.
Also, this gives HAL flexibility with the output buffer as currently
its always defaulted to Psuedo Planar.

Change-Id: I0428ea2a227bf73bc4eada0d2533520799321195
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: mdss: Prevent AD backlight calculation before suspend

AD backlight calculation should be prevented when backlight has been set
to 0 to prevent AD from conflicting with suspend state backlight levels.

Change-Id: I831258b03e81fd4bc2d305a0cb8ece7c42f4b9fb
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
mdss: Add return value when copy_from_user is successful

Return successful when the ioctl MSMFB_OVERLAY_PLAY_ENABLE
is successful.

CRs-Fixed: 492570
Change-Id: Id279be87ed2ccb519109b0dd491511af007c3841
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
msm: mdss: WARN typo correction

WARN typo correction

Change-Id: I8bbb8e63d3b5f5953ba7e629434c18f3ab29dbb8
Signed-off-by: Se Hun Kim <sean2.kim@lge.com>
video: msm: mdss: insert panel parameters for width and height

for calculating dpi on HAL,FB should check panel physical size.
so, this patch make panel driver parse dt and fill panel's width
and height. and provide the information to FB.

Change-Id: I0fbe12470c903e90c50e06ae2fbbe786187cc133
Signed-off-by: darren.kang <darren.kang@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm: mdss: add debug message in setting backlight

Added this debug message to help analyze turning backlight On/Off

Change-Id: If037f3e40875d7a7f3ebc576e71d4b435d2f1bde
Signed-off-by: shihhao.feng <shihhao.feng@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm: mdss: only the main display can update the bl_updated flag

The backlight brightness setting might be rejected due to bl_updated flag
status was wrong

Bug: 10032778

Change-Id: Ic07251bff5db39dcb9e48c6daf5485044d73e0fc
Signed-off-by: shihhao.feng <shihhao.feng@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm: mdss: Add read/write buffer support for calibraiton tool

This change allows to process read/write operation through
buffer instead of single IOCTL call. It is part of
optimization to save DIAG packet processing time.

Change-Id: Iffaab2dd160959f8c7950ebca043b1e0cf25877c
Signed-off-by: Arpita Banerjee <cabane@codeaurora.org>
msm: mdss: support enter/exit DCM for calibration

This change supports the enter/exit DCM for calibration tool.
It blocks the unblank operation if target is in DCM (Display
Calibration Mode).

Change-Id: If65449b9863bb1f9ca0346d736b6939261d1394e
Signed-off-by: Arpita Banerjee <cabane@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_fb.c
msm: mdss: validate fb backlight inputs

Ensure backlight level is less than the max backlight
brightness and the backlight scaling factor is at most
1.

Change-Id: I424ed22af48ecae46371291fe88a114cf3fc7c31
CRs-Fixed: 516699
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Revert "msm: mdss: only the main display can update the bl_updated flag"

This reverts commit cd344456bdd28255b9596447dda1123c84dc34a5.
Replaced with another change from CAF
Revert "msm: mdss: add debug message in setting backlight"

This reverts commit 58a8c36fb655e2e64429698a5ba86b71ab4f17b6.
msm: mdss: maintain backlight-related variables in mfd structure

Backlight status are framebuffer specific and should be maintained in
mfd data structure. Otherwise, the release of one fb (e.g. fb1)
prevents backlight updates of another fb (e.g. fb0).

CRs-fixed: 520695
Change-Id: I7baaebda22a6ae0c7c391d5898c5a7e2467be0be
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_fb.c
Revert "msm: mdss: Prevent non-zero backlight following display blank"

Patch broke assumption that blank/unblank does not modify backlight value.
This reverts commit 3d4c5574f8284df4b29b4bdbe31fc2b6c4aef079.

Change-Id: I5dfeb0504d23089e7a9dca423726185eddb40d7e
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm: mdss: Make mdp sync point generic to use

Currently mdp sync point supports buf sync ioctl for
normal mdp overlay operation. So making it more generic
such that it can be used for rotator also.

Change-Id: I04c5f29a5259238ef1de26f6e801269b89cf5fed
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>