Skip to content

Commit 95b6628

Browse files
vantomanvbajs
authored andcommitted
drm: msm: dsi_panel: add hbm_skip_set_backlight
to skip changing backlight when HBM is enabled Signed-off-by: Yahya Wessam <yahyawessam2002@gmail.com>
1 parent c74f31f commit 95b6628

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/gpu/drm/msm/dsi-staging/dsi_panel.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,11 @@ static bool dc_set_backlight(struct dsi_panel *panel, u32 bl_lvl)
898898
}
899899
}
900900

901+
bool hbm_skip_set_backlight(struct dsi_panel *panel, u32 bl_lvl)
902+
{
903+
return panel->hbm_mode && bl_lvl && bl_lvl != 0 && panel->last_bl_lvl != 0;
904+
}
905+
901906
int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl)
902907
{
903908
int rc = 0;
@@ -909,6 +914,11 @@ int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl)
909914

910915
pr_debug("backlight type:%d lvl:%d\n", bl->type, bl_lvl);
911916

917+
if (hbm_skip_set_backlight(panel, bl_lvl)) {
918+
panel->last_bl_lvl = bl_lvl;
919+
return rc;
920+
}
921+
912922
if (dc_set_backlight(panel, bl_lvl)) {
913923
panel->last_bl_lvl = bl_lvl;
914924
pr_debug("set dc backlight bacase dc enable %d, bl %d\n", panel->dc_enable, bl_lvl);

0 commit comments

Comments
 (0)