disp: msm: extend the maximum value of backlight scale

The maximum value of backlight scaling property is enlarged
from 65535 to U32_MAX. Change supports DRE feature to
increase backlight level through backlight scaling property.

Change-Id: Ibe929308faf8c6f94bacbec7f58cc4ffe8133a85
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
This commit is contained in:
Xu Yang
2020-11-24 09:11:51 +08:00
parent a49d0d9ce1
commit 34c65a3106
2 changed files with 4 additions and 3 deletions

View File

@@ -230,6 +230,8 @@ int dsi_display_set_backlight(struct drm_connector *connector,
bl_scale_sv = panel->bl_config.bl_scale_sv;
bl_temp = (u32)bl_temp * bl_scale_sv / MAX_SV_BL_SCALE_LEVEL;
if (bl_temp > panel->bl_config.bl_max_level)
bl_temp = panel->bl_config.bl_max_level;
DSI_DEBUG("bl_scale = %u, bl_scale_sv = %u, bl_lvl = %u\n",
bl_scale, bl_scale_sv, (u32)bl_temp);

View File

@@ -670,8 +670,7 @@ static int _sde_connector_update_bl_scale(struct sde_connector *c_conn)
bl_config->bl_scale = c_conn->bl_scale > MAX_BL_SCALE_LEVEL ?
MAX_BL_SCALE_LEVEL : c_conn->bl_scale;
bl_config->bl_scale_sv = c_conn->bl_scale_sv > MAX_SV_BL_SCALE_LEVEL ?
MAX_SV_BL_SCALE_LEVEL : c_conn->bl_scale_sv;
bl_config->bl_scale_sv = c_conn->bl_scale_sv;
SDE_DEBUG("bl_scale = %u, bl_scale_sv = %u, bl_level = %u\n",
bl_config->bl_scale, bl_config->bl_scale_sv,
@@ -2836,7 +2835,7 @@ static int _sde_connector_install_properties(struct drm_device *dev,
CONNECTOR_PROP_BL_SCALE);
msm_property_install_range(&c_conn->property_info, "sv_bl_scale",
0x0, 0, MAX_SV_BL_SCALE_LEVEL, MAX_SV_BL_SCALE_LEVEL,
0x0, 0, U32_MAX, MAX_SV_BL_SCALE_LEVEL,
CONNECTOR_PROP_SV_BL_SCALE);
c_conn->bl_scale_dirty = false;