mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
drm/dsi_panel: resend hbm off commands
drm: resend hbm off commands, sometimes lhbm is not closed successfully, send again to reduce the possibility. Change-Id: I23d2f23bc9920f1c824e2af50229d62d2d27c906 Signed-off-by: wangyq13 <[email protected]> Reviewed-on: https://gerrit.mot.com/2334757 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Hua Tan <[email protected]> Reviewed-by: <[email protected]> Reviewed-by: Huosheng Liao <[email protected]> Submit-Approved: Jira Key
This commit is contained in:
parent
3ceb892a70
commit
483fe19458
2 changed files with 12 additions and 2 deletions
|
|
@ -1186,9 +1186,15 @@ static int dsi_panel_set_hbm(struct dsi_panel *panel,
|
|||
if (rc < 0) {
|
||||
DSI_ERR("%s: failed to send param cmds. ret=%d\n", __func__, rc);
|
||||
} else {
|
||||
if(lhbm_config->enable)
|
||||
if(lhbm_config->enable) {
|
||||
bl_lvl = lhbm_config->dbv_level;
|
||||
else
|
||||
if (lhbm_config->resend_lbhm_off && param_info->value == HBM_OFF_STATE) {
|
||||
usleep_range(5000, 5010);
|
||||
rc = dsi_panel_send_param_cmd(panel, param_info);
|
||||
if (rc < 0)
|
||||
DSI_ERR("%s: failed to resend param cmds. ret=%d\n", __func__, rc);
|
||||
}
|
||||
} else
|
||||
bl_lvl = HBM_BRIGHTNESS(param_info->value);
|
||||
rc = dsi_panel_set_backlight(panel, bl_lvl);
|
||||
if (rc)
|
||||
|
|
@ -4271,6 +4277,9 @@ static int dsi_panel_parse_local_hbm_config(struct dsi_panel *panel)
|
|||
lhbm_config->enable = false;
|
||||
return rc;
|
||||
}
|
||||
|
||||
lhbm_config->resend_lbhm_off = utils->read_bool(utils->data,
|
||||
"qcom,mdss-dsi-panel-resend-local-hbm-off");
|
||||
} else {
|
||||
DSI_INFO("%s:%d, no local hbm config\n",
|
||||
__func__, __LINE__);
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ struct dsi_panel_spr_info {
|
|||
|
||||
struct dsi_panel_lhbm_config {
|
||||
bool enable;
|
||||
bool resend_lbhm_off;
|
||||
u32 dbv_level;
|
||||
u32 alpha_reg;
|
||||
u32 alpha_size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue