mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
kernel:pnangn:update 2nd panel brightness settings to 11bits
pnangn:update 2nd panel brightness settings to 11bits Change-Id: I945dc7db9bf0eabfc30250e13f38f775a523c5ed Signed-off-by: longch98 <longch98@motorola.com> Reviewed-on: https://gerrit.mot.com/2432251 SLTApproved: Slta Waiver Reviewed-by: Jing Hu <hujing3@lenovo.com> SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
f059348756
commit
583452c1f3
2 changed files with 12 additions and 1 deletions
|
|
@ -734,11 +734,15 @@ static int dsi_panel_update_backlight(struct dsi_panel *panel,
|
|||
DSI_DEBUG("case BIT11_4, trans bl_lvl=0x%04x\n", bl_lvl);
|
||||
}
|
||||
|
||||
if (panel->bl_config.bl_shift_left_1bit)
|
||||
{
|
||||
bl_lvl = (bl_lvl << 1);
|
||||
}
|
||||
|
||||
if (panel->bl_config.bl_inverted_dbv)
|
||||
{
|
||||
bl_lvl = (((bl_lvl & 0xff) << 8) | (bl_lvl >> 8));
|
||||
}
|
||||
|
||||
if (bl->bl_2bytes_enable){
|
||||
bl_lvl_2bytes = ((bl_lvl & 0xff00) >> 8) | ((bl_lvl & 0xff) << 8);
|
||||
rc = mipi_dsi_dcs_set_display_brightness(dsi, bl_lvl_2bytes);
|
||||
|
|
@ -3222,6 +3226,12 @@ static int dsi_panel_parse_bl_config(struct dsi_panel *panel)
|
|||
DSI_INFO("[%s] bl_2bytes_enable=%d\n", panel->name,
|
||||
panel->bl_config.bl_2bytes_enable);
|
||||
|
||||
panel->bl_config.bl_shift_left_1bit = utils->read_bool(utils->data,
|
||||
"qcom,mdss-dsi-bl-level-shift-left-1bit");
|
||||
|
||||
DSI_INFO("[%s] bl_shift_left_1bit=%d\n", panel->name,
|
||||
panel->bl_config.bl_shift_left_1bit);
|
||||
|
||||
panel->bl_config.bl_demura_cmd= utils->read_bool(utils->data,
|
||||
"qcom,brightness-demura-command");
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ struct dsi_backlight_config {
|
|||
enum bl_update_flag bl_update;
|
||||
|
||||
bool bl_2bytes_enable;
|
||||
bool bl_shift_left_1bit;
|
||||
u32 bl_min_level;
|
||||
u32 bl_max_level;
|
||||
u32 brightness_max_level;
|
||||
|
|
|
|||
Loading…
Reference in a new issue