disp: msm: Restore old backlight setting after exitting HBM

The backlight and HBM are using the same command 0x51. The backlight
ranger will be from 0x000 to 0x640 while HBM on will be at 0xfff and
HBM off will be at 0x640. This is why the display driver should
restore the last backlight setting after exiting the HBM mode.

Change-Id: Icd29cd25e5eb4936369dfefb513e62076f994482
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697623
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Bang Nguyen 2019-12-05 15:09:26 -06:00 • committed by tongkun1
commit 17b4f7ee6d

View file

@ -576,11 +576,14 @@ static int dsi_panel_update_backlight(struct dsi_panel *panel,
if (panel->bl_config.bl_inverted_dbv)
bl_lvl = (((bl_lvl & 0xff) << 8) | (bl_lvl >> 8));
if (panel->is_hbm_using_51_cmd && panel->is_hbm_on) {
if (panel->is_hbm_using_51_cmd) {
panel->bl_lvl_during_hbm = bl_lvl;
DSI_DEBUG("HBM is on.. ignore setting backlight. bl_vl=%d\n",
if (panel->is_hbm_on) {
DSI_DEBUG("HBM is on.. ignore setting backlight. bl_vl=%d\n",
panel->bl_lvl_during_hbm);
return 0;
return 0;
}
}
if (bl->bl_2bytes_enable){