Skip to content

Commit 979f7c0

Browse files
pwnrazronettboots
authored andcommitted
display: misc changes from yaap/kernel_oneplus_sm8150@2269448
Signed-off-by: onettboots <blackcocopet@gmail.com>
1 parent 93c38a6 commit 979f7c0

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ int dsi_display_set_backlight(struct drm_connector *connector,
229229
if (rc)
230230
pr_err("unable to set backlight\n");
231231

232-
if (bl_lvl > 2047 && panel->bl_config.bl_level <= 2047)
232+
if (bl_lvl == 4095 && panel->bl_config.bl_level <= 2047)
233233
{
234234
panel->hbm_mode = 1;
235235
rc = dsi_panel_apply_hbm_mode(panel);
236236
}
237-
else if (bl_lvl <= 2047 && panel->bl_config.bl_level > 2047)
237+
else if (bl_lvl <= 2047 && panel->bl_config.bl_level == 4095)
238238
{
239239
panel->hbm_mode = 0;
240240
rc = dsi_panel_apply_hbm_mode(panel);

drivers/gpu/drm/msm/sde/sde_connector.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ static int sde_backlight_device_update_status(struct backlight_device *bd)
102102
bl_lvl = 0;
103103
}
104104

105+
if (bl_lvl > 2047)
106+
bl_lvl = 4095;
107+
105108
if (!c_conn->allow_bl_update) {
106109
c_conn->unset_bl_level = bl_lvl;
107110
return 0;

0 commit comments

Comments
 (0)