Loading Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +2 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,8 @@ Optional properties: 0 = default value. - qcom,mdss-dsi-bl-max-level: Specifies the max backlight level supported by the panel. 255 = default value. - qcom,mdss-brightness-max-level: Specifies the max brightness level supported. 255 = default value. - qcom,mdss-dsi-interleave-mode: Specifies interleave mode. 0 = default value. - qcom,mdss-dsi-panel-type: Specifies the panel operating mode. Loading Documentation/devicetree/bindings/fb/mdss-edp.txt +2 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ Optional properties Optional properties: - qcom,cont-splash-enabled: Boolean used to enable continuous splash mode. - qcom,mdss-brightness-max-level: Specifies the max brightness level supported. 255 = default value. Example: mdss_edp: qcom,mdss_edp@fd923400 { Loading drivers/video/msm/mdss/mdss_dsi_panel.c +2 −0 Original line number Diff line number Diff line Loading @@ -810,6 +810,8 @@ static int mdss_panel_parse_dt(struct device_node *np, ctrl_pdata->bklt_ctrl = BL_DCS_CMD; } } rc = of_property_read_u32(np, "qcom,mdss-brightness-max-level", &tmp); pinfo->brightness_max = (!rc ? tmp : MDSS_MAX_BL_BRIGHTNESS); rc = of_property_read_u32(np, "qcom,mdss-dsi-bl-min-level", &tmp); pinfo->bl_min = (!rc ? tmp : 0); rc = of_property_read_u32(np, "qcom,mdss-dsi-bl-max-level", &tmp); Loading drivers/video/msm/mdss/mdss_edp.c +6 −0 Original line number Diff line number Diff line Loading @@ -714,10 +714,16 @@ static int mdss_edp_remove(struct platform_device *pdev) static int mdss_edp_device_register(struct mdss_edp_drv_pdata *edp_drv) { int ret; u32 tmp; mdss_edp_edid2pinfo(edp_drv); edp_drv->panel_data.panel_info.bl_min = 1; edp_drv->panel_data.panel_info.bl_max = 255; ret = of_property_read_u32(edp_drv->pdev->dev.of_node, "qcom,mdss-brightness-max-level", &tmp); edp_drv->panel_data.panel_info.brightness_max = (!ret ? tmp : MDSS_MAX_BL_BRIGHTNESS); edp_drv->panel_data.panel_info.edp.frame_rate = DEFAULT_FRAME_RATE;/* 60 fps */ Loading drivers/video/msm/mdss/mdss_fb.c +5 −3 Original line number Diff line number Diff line Loading @@ -155,13 +155,13 @@ static void mdss_fb_set_bl_brightness(struct led_classdev *led_cdev, struct msm_fb_data_type *mfd = dev_get_drvdata(led_cdev->dev->parent); int bl_lvl; if (value > MDSS_MAX_BL_BRIGHTNESS) value = MDSS_MAX_BL_BRIGHTNESS; if (value > mfd->panel_info->brightness_max) value = mfd->panel_info->brightness_max; /* This maps android backlight level 0 to 255 into driver backlight level 0 to bl_max with rounding */ MDSS_BRIGHT_TO_BL(bl_lvl, value, mfd->panel_info->bl_max, MDSS_MAX_BL_BRIGHTNESS); mfd->panel_info->brightness_max); if (!bl_lvl && value) bl_lvl = 1; Loading Loading @@ -376,6 +376,8 @@ static int mdss_fb_probe(struct platform_device *pdev) /* android supports only one lcd-backlight/lcd for now */ if (!lcd_backlight_registered) { backlight_led.brightness = mfd->panel_info->brightness_max; backlight_led.max_brightness = mfd->panel_info->brightness_max; if (led_classdev_register(&pdev->dev, &backlight_led)) pr_err("led_classdev_register failed\n"); else Loading Loading
Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +2 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,8 @@ Optional properties: 0 = default value. - qcom,mdss-dsi-bl-max-level: Specifies the max backlight level supported by the panel. 255 = default value. - qcom,mdss-brightness-max-level: Specifies the max brightness level supported. 255 = default value. - qcom,mdss-dsi-interleave-mode: Specifies interleave mode. 0 = default value. - qcom,mdss-dsi-panel-type: Specifies the panel operating mode. Loading
Documentation/devicetree/bindings/fb/mdss-edp.txt +2 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ Optional properties Optional properties: - qcom,cont-splash-enabled: Boolean used to enable continuous splash mode. - qcom,mdss-brightness-max-level: Specifies the max brightness level supported. 255 = default value. Example: mdss_edp: qcom,mdss_edp@fd923400 { Loading
drivers/video/msm/mdss/mdss_dsi_panel.c +2 −0 Original line number Diff line number Diff line Loading @@ -810,6 +810,8 @@ static int mdss_panel_parse_dt(struct device_node *np, ctrl_pdata->bklt_ctrl = BL_DCS_CMD; } } rc = of_property_read_u32(np, "qcom,mdss-brightness-max-level", &tmp); pinfo->brightness_max = (!rc ? tmp : MDSS_MAX_BL_BRIGHTNESS); rc = of_property_read_u32(np, "qcom,mdss-dsi-bl-min-level", &tmp); pinfo->bl_min = (!rc ? tmp : 0); rc = of_property_read_u32(np, "qcom,mdss-dsi-bl-max-level", &tmp); Loading
drivers/video/msm/mdss/mdss_edp.c +6 −0 Original line number Diff line number Diff line Loading @@ -714,10 +714,16 @@ static int mdss_edp_remove(struct platform_device *pdev) static int mdss_edp_device_register(struct mdss_edp_drv_pdata *edp_drv) { int ret; u32 tmp; mdss_edp_edid2pinfo(edp_drv); edp_drv->panel_data.panel_info.bl_min = 1; edp_drv->panel_data.panel_info.bl_max = 255; ret = of_property_read_u32(edp_drv->pdev->dev.of_node, "qcom,mdss-brightness-max-level", &tmp); edp_drv->panel_data.panel_info.brightness_max = (!ret ? tmp : MDSS_MAX_BL_BRIGHTNESS); edp_drv->panel_data.panel_info.edp.frame_rate = DEFAULT_FRAME_RATE;/* 60 fps */ Loading
drivers/video/msm/mdss/mdss_fb.c +5 −3 Original line number Diff line number Diff line Loading @@ -155,13 +155,13 @@ static void mdss_fb_set_bl_brightness(struct led_classdev *led_cdev, struct msm_fb_data_type *mfd = dev_get_drvdata(led_cdev->dev->parent); int bl_lvl; if (value > MDSS_MAX_BL_BRIGHTNESS) value = MDSS_MAX_BL_BRIGHTNESS; if (value > mfd->panel_info->brightness_max) value = mfd->panel_info->brightness_max; /* This maps android backlight level 0 to 255 into driver backlight level 0 to bl_max with rounding */ MDSS_BRIGHT_TO_BL(bl_lvl, value, mfd->panel_info->bl_max, MDSS_MAX_BL_BRIGHTNESS); mfd->panel_info->brightness_max); if (!bl_lvl && value) bl_lvl = 1; Loading Loading @@ -376,6 +376,8 @@ static int mdss_fb_probe(struct platform_device *pdev) /* android supports only one lcd-backlight/lcd for now */ if (!lcd_backlight_registered) { backlight_led.brightness = mfd->panel_info->brightness_max; backlight_led.max_brightness = mfd->panel_info->brightness_max; if (led_classdev_register(&pdev->dev, &backlight_led)) pr_err("led_classdev_register failed\n"); else Loading