From 7b6a915c9909fc53bef447e943d200ed613eea89 Mon Sep 17 00:00:00 2001 From: daiss1 Date: Fri, 6 Mar 2020 17:52:09 +0800 Subject: [PATCH] msm/dsi: add backlight and hbm debug log Modify: add backlight and hbm debug log Change-Id: I900457c2f233a1e2d6d2b6077427171e05b3787c Signed-off-by: daiss1 Reviewed-on: https://gerrit.mot.com/1508369 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Dezhen Hou Reviewed-by: Guobin Zhang Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1510693 Reviewed-by: Hua Tan --- msm/dsi/dsi_panel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index 227b08f166f0..30096d05a8e4 100755 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -856,10 +856,14 @@ static bool dsi_panel_set_hbm_backlight(struct dsi_panel *panel, u32 *bl_lvl) bl_level = *bl_lvl; if (bl_level == BRIGHTNESS_HBM_ON && panel->hbm_type == HBM_TYPE_OLED) { + DSI_INFO("OLED HBM is on.. ignore setting backlight. bl_level=%d\n", + bl_level); return true; } else if (bl_level == BRIGHTNESS_HBM_ON || bl_level == BRIGHTNESS_HBM_OFF) { *bl_lvl = bl_level == BRIGHTNESS_HBM_ON ? panel->bl_config.bl_max_level : panel->bl_lvl_during_hbm; + DSI_INFO("HBM set bl_level=%d bl_max_level = %d bl_lvl_during_hbm = %d\n", + bl_level, panel->bl_config.bl_max_level, panel->bl_lvl_during_hbm); return false; } else { panel->bl_lvl_during_hbm = bl_level; @@ -883,7 +887,7 @@ int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl) if (dsi_panel_set_hbm_backlight(panel, &bl_lvl)) return 0; - DSI_DEBUG("backlight type:%d lvl:%d\n", bl->type, bl_lvl); + DSI_INFO("backlight type:%d lvl:%d\n", bl->type, bl_lvl); switch (bl->type) { case DSI_BACKLIGHT_WLED: rc = backlight_device_set_brightness(bl->raw_bd, bl_lvl);