问题记录:最近遇到一个屏背光的问题,主要就是pwm脚没找到的问题
异常logo:
[ 1833.972190] qyc, lcd-backlight mode: 0, bl_level: 353
[ 1833.973325] qyc, mdss_dsi_panel_bklt_pwm
[ 1833.978269] Stage 1, level== 353
[ 1833.982342] Stage 5
[ 1833.985471] mdss_dsi_panel_bklt_pwm: bklt_ctrl=0 pwm_period=100 pwm_gpio=0 pwm_lpg_chan=0
[ 1833.987308] Stage 5
[ 1833.995839] Stage 8
[ 1833.997615] Stage 10
[ 1833.999618] Stage 12 end
---------------------------------------------------------
debug时背光流程是正常跑的,在mdss_panel_parse_bl_settings中没有解析到pwm脚,从而用了默认值0后面解决问题:屏用的是dsi0, 屏蔽了dsi1相关的宏和dtsi主要是 CONFIG_MSM_DBA 和 CONFIG_MSM_DBA_DSI1_BRIDGE
后面正常log:
[ 35.722642] qyc, mdss_dsi_panel_bklt_pwm
[ 35.727694] Stage 1, level== 305
[ 35.731679] Stage 5
[ 35.734788] mdss_dsi_panel_bklt_pwm: bklt_ctrl=0 pwm_period=100 pwm_gpio=1265 pwm_lpg_chan=0
[ 35.736625] Stage 5
[ 35.745461] Stage 8
[ 35.747167] Stage 10
[ 35.749203] Stage 12 end
----------------------------------------------------------
顺便记录下背光流程:
在mdss_dsi_panel_init:ctrl_pdata->panel_data.set_backlight = mdss_dsi_panel_bl_ctrlmdss_dsi_panel_bl_ctrl:case BL_PWM:mdss_dsi_panel_bklt_pwm(ctrl_pdata, bl_level);mdss_dsi_panel_bklt_pwm:---> 打印了pwm_gpio //ctrl->pwm_pmic_gpio---> pwm_config(pwm设备, on time, period)设置mdss_panel_parse_bl_settings:从dtsi解析tmp = of_get_named_gpio(np, "qcom,mdss-dsi-pwm-gpio", 0);dtsi:
-------
&dsi_ili9881c_720p_video {qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";qcom,mdss-dsi-bl-pmic-pwm-frequency = <80>;qcom,mdss-dsi-bl-pmic-bank-select = <0>;qcom,mdss-dsi-pwm-gpio = <&pm8953_mpps 4 0>;qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
};