mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
sde: limit the backlight minimum brightness as bl_min_level
PROPAGATED_from (CR) High-precision brightness will set the brightness level from bl_min_level to bl_max_level. If we enable 12bit brightness, in fact, the hardware will not tolerate very low brightness, these levels cause the backlight unstable. So we have to define the minimum brightness by 'qcom,mdss-dsi-bl-min-level' that the driver does not set the backlight level below that. Change-Id: Ifa20a92388c6dab20cf5550868f3f3685815936f Reviewed-on: https://gerrit.mot.com/1782945 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yeqing Wang <wangyq13@motorola.com> Reviewed-by: Shanshan Dai <daiss1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
07544a623a
commit
4a042b2f3f
1 changed files with 3 additions and 0 deletions
|
|
@ -120,6 +120,9 @@ static int sde_backlight_device_update_status(struct backlight_device *bd)
|
|||
if (brightness > c_conn->thermal_max_brightness)
|
||||
brightness = c_conn->thermal_max_brightness;
|
||||
|
||||
if(brightness && brightness < display->panel->bl_config.bl_min_level)
|
||||
brightness = display->panel->bl_config.bl_min_level;
|
||||
|
||||
/* map UI brightness into driver backlight level with rounding */
|
||||
bl_lvl = mult_frac(brightness, display->panel->bl_config.bl_max_level,
|
||||
display->panel->bl_config.brightness_max_level);
|
||||
|
|
|
|||
Loading…
Reference in a new issue