display: modify unset_bl_level to fix no backlight when encrypting
In the original code logic, when auto-brightness turned on, the
unset_bl_level would be 0. Thus no backlight command when starting
to encrypt.
Do not set unset_bl_level to 0. The logic by unset_bl_level could
be mentained by bl_updated.

Note that mipi command mode panel need extra backlight command in
msm_fb_commit_wq_handler. If we embeded the backlight command in
power on sequence, there would be screen mess when panel power on.

Issue 9260406

Change-Id: I7978f18326afde27c5c3f1e8e205a1dd21511b87
Signed-off-by: yetta_wu <yetta_wu@asus.com>
display: JDI: workaround to fix resume messy screen
1. The backlight turns on before framebuffer comes out.
   In command mode panel like JDI, there would be messy screen
   when resuming.
2. Framebuffer comes out at first msm_fb_commit_wq_handler()
      -> mdp4_overlay_commit() after resume.
   We should delay backlight to after framebuffer comes out.
3. Add set_recovery_backlight for the backlight in recovery mode.
   Default backlight 40/255, may modify afterwards.

case 01124703

Change-Id: I62ace8bb85ac62b6eaf214588caa8a89ba094a67
Signed-off-by: yetta_wu <yetta_wu@asus.com>
msm: msm_fb: Backlight change after resuming from suspend state
This change will fix the flicker issue when the system resume
from suspend state.The change will update the first backlight
level as scaled backlight level when the device come from
sleep state and then flicker is not obseved as the backlight
level will be same as before.

CRs-fixed: 473283
Change-Id: I8bbb497710ede5c91d4fc8f0e87e340f9d847a43
Signed-off-by: Mukesh Jha <cmjha@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
display: enable TE vsync function

1. Enable TE vsync function in gpio config.
   Note that pinfo.lcd.refx100 need to be align with TE frequency in panel.
2. add lcd vertical porches to have correct value of MDP register 0x100
   and 0x210
3. remove the mfd->ibuf.vsync_enable in condition to have correct value of
   MDP register 0x20c

case 01186196
Bug: 8767597

Change-Id: Ie8c3021d447c255c811ca95bf71ec4cfb2949b6f
Signed-off-by: yetta_wu <yetta_wu@asus.com>
video: msm: Undo overmapping changes due to IOMMU page faults
Revert "msm: msm_fb: Fix Regressions because of overmap changes."
Revert "Revert "Revert "msm: msm_fb: Map RGB layers to the max possible size."""
For N1 only. We are still using it for Find5.
video: msm: Set correct w/h for N1 display

Conflicts:
	drivers/video/msm/msm_fb.c
msm: fb: Fix security bugs in msmfb_notify_update & msm_fb_ioctl

msmfb_notify_update: Correct signature of msmfb_notify_update from
the ioctl declaration.

msm_fb_ioctl: Add appropriate null check for mfd data structure
before accessing it's members. This prevents null pointer accesses
in the driver.

CRs-Fixed: 526286
Change-Id: I731018057214fb0fa58c7617934100d2425617f8
Signed-off-by: Neti, Ravi Kumar <ravineti@codeaurora.org>
msm: mdp: Adjust bandwidth parameters

720p video on 1080p panel have upscaling, mdp clk should not be
increased for this case. Also slightly increase mdp ib to make
sure there is no bw access bottleneck.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: naseer <naseer@codeaurora.org>