소스 검색

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 <[email protected]>
Xu Yang 4 년 전
부모
커밋
34c65a3106
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 0
      msm/dsi/dsi_display.c
  2. 2 3
      msm/sde/sde_connector.c

+ 2 - 0
msm/dsi/dsi_display.c

@@ -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);

+ 2 - 3
msm/sde/sde_connector.c

@@ -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;