Skip to content

Commit

Permalink
techpack: display: add back mi,mdss-dsi-dimlayer-brightness-alpha fet…
Browse files Browse the repository at this point in the history
…ch from dtbo

* Do not break fod on MIUI while using stock MIUI dtbo.
* This partially reverts commit e52177d.

Signed-off-by: Carlos Ayrton Lopez Arroyo <[email protected]>
  • Loading branch information
Official-Ayrton990 committed Jan 24, 2022
1 parent 275f466 commit ffebc4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions techpack/display/msm/dsi/dsi_panel_mi.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,13 @@ int dsi_panel_parse_mi_config(struct dsi_panel *panel,
}

arr = utils->get_property(utils->data,
"qcom,disp-fod-dim-lut", &length);
"mi,mdss-dsi-dimlayer-brightness-alpha-lut", &length);

length = length / sizeof(u32);

pr_info("length: %d\n", length);
if (!arr || length & 0x1 || length != mi_cfg->brightnes_alpha_lut_item_count * 2) {
pr_err("read qcom,disp-fod-dim-lut failed\n");
pr_err("read mi,mdss-dsi-dimlayer-brightness-alpha-lut failed\n");
mi_cfg->fod_dimlayer_enabled = false;
goto skip_dimlayer_parse;
}
Expand All @@ -425,10 +425,10 @@ int dsi_panel_parse_mi_config(struct dsi_panel *panel,
goto skip_dimlayer_parse;
}

rc = utils->read_u32_array(utils->data, "qcom,disp-fod-dim-lut",
rc = utils->read_u32_array(utils->data, "mi,mdss-dsi-dimlayer-brightness-alpha-lut",
(u32 *)mi_cfg->brightness_alpha_lut, length);
if (rc) {
pr_err("cannot read qcom,disp-fod-dim-lut\n");
pr_err("cannot read mi,mdss-dsi-dimlayer-brightness-alpha-lut\n");
mi_cfg->fod_dimlayer_enabled = false;
kfree(mi_cfg->brightness_alpha_lut);
goto skip_dimlayer_parse;
Expand Down

0 comments on commit ffebc4e

Please sign in to comment.