msm/dsi: add backlight and hbm debug log
Modify: add backlight and hbm debug log Change-Id: I900457c2f233a1e2d6d2b6077427171e05b3787c Signed-off-by: daiss1 <daiss1@lenovo.com> Reviewed-on: https://gerrit.mot.com/1508369 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Dezhen Hou <houdz1@motorola.com> Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1510693 Reviewed-by: Hua Tan <tanhua1@motorola.com>
This commit is contained in:
1 parent
9ec15a8bea
commit
7b6a915c99
1 file changed
+5
-1
+5
-1
@@ -856,10 +856,14 @@ static bool dsi_panel_set_hbm_backlight(struct dsi_panel *panel, u32 *bl_lvl)
|
|||||||
bl_level = *bl_lvl;
|
bl_level = *bl_lvl;
|
||||||
|
|
||||||
if (bl_level == BRIGHTNESS_HBM_ON && panel->hbm_type == HBM_TYPE_OLED) {
|
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;
|
return true;
|
||||||
} else if (bl_level == BRIGHTNESS_HBM_ON || bl_level == BRIGHTNESS_HBM_OFF) {
|
} else if (bl_level == BRIGHTNESS_HBM_ON || bl_level == BRIGHTNESS_HBM_OFF) {
|
||||||
*bl_lvl = bl_level == BRIGHTNESS_HBM_ON ?
|
*bl_lvl = bl_level == BRIGHTNESS_HBM_ON ?
|
||||||
panel->bl_config.bl_max_level : panel->bl_lvl_during_hbm;
|
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;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
panel->bl_lvl_during_hbm = bl_level;
|
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))
|
if (dsi_panel_set_hbm_backlight(panel, &bl_lvl))
|
||||||
return 0;
|
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) {
|
switch (bl->type) {
|
||||||
case DSI_BACKLIGHT_WLED:
|
case DSI_BACKLIGHT_WLED:
|
||||||
rc = backlight_device_set_brightness(bl->raw_bd, bl_lvl);
|
rc = backlight_device_set_brightness(bl->raw_bd, bl_lvl);
|
||||||
|
|||||||
Reference in new issue
Block a user