本文主要是介绍Recovery模式下进行重启或者关机LCD会闪一下白屏,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
现象描述:
Recovery模式下进行重启或者关机或者恢复出厂设置后都会闪一下白屏
抓取kernel log未发现明显异常:
[ 40.137930] <0>.(0)[1:init]******** battery driver shutdown!! ********
[ 40.141461] <0>.(0)[58:kworker/0:1]EXT4-fs (mmcblk0p24): re-mounted. Opts: (null)
[ 40.143458] <0>.(0)[58:kworker/0:1]Emergency Remount complete
[ 40.272535] <0>.(0)[181:mtk charger_hv_][charging_get_battery_status] battery exist for bring up.
[ 40.273685] <0>.(0)[181:mtk charger_hv_][charging_get_battery_status] battery exist for bring up.
[ 40.274822] <0>.(0)[181:mtk charger_hv_][charging_get_battery_status] battery exist for bring up.
[ 40.749289] <0>.(0)[1:init][battery_meter_shutdown]
[ 40.751221] <0>.(0)[1:init][MUSB]musb_shutdown 1356: shut down
[ 40.752132] <0>-(0)[1:init][MUSB]mt_usb_disable 340: <1,1>,<3,5,3,2>
[ 40.753801] <0>-(0)[1:init][MUSB]usb_phy_savecurrent 534: usb save current success
[ 40.754777] <0>-(0)[1:init][MUSB]mt_usb_disable 358: <3,5,3,3>
[ 40.756254] <0>-(0)[0:swapper/0][Power/swap]SODI: blocking by uptime count = 14
[ 40.970074] <0>.(0)[1:init]kernel lcm_suspend
[ 40.976840] <0>.(0)[1:init][gps]null pointer!!
[ 40.978227] <0>.(0)[1:init]reboot: Restarting system with command ''
[ 40.979052] <0>-(0)[1:init]machine_restart, arm_pm_restart( (null))
[ 40.979871] <0>-(0)[1:init]ARCH_RESET happen!!!
[ 40.980461] <0>-(0)[1:init]arch_reset: cmd =
[ 40.981046] <0>-(0)[1:init]CPU: 0 PID: 1 Comm: init Tainted: G W 3.18.19 #12
只能看到一行和LCD相关的log信息;
分析过程:
1. log里面看不出来,没辙,想其他办法吧,闲着没事看一下 [ 40.970074] <0>.(0)[1:init]kernel lcm_suspend 看一下这个log是从哪里打印的吧,既然是lcm_suspend就到LCD驱动里卖弄看一下,在lcm_suspend()函数里面添加log信息,发现确实走的是kernel里面我们自己添加的LCD驱动,开机lcd probe驱动log如下:
[ 1.239771] <3>.(3)[1:swapper/0][kernel]:get_lcm_id=83.
[ 1.240421] <3>.(3)[1:swapper/0][kernel]:disp_lcm_probe ,lcm_ic_id=0x83.
[ 1.241256] <3>.(3)[1:swapper/0][kernel]:disp_lcm_probe ,lcd_id_voltage=3._lcm_count()=1
[ 1.242264] <3>.(3)[1:swapper/0][kernel]:disp_lcm_probe ,check lcd:DiJing-ili9806e.lcd_id_voltage=3.
[ 1.243403] <3>.(3)[1:swapper/0][kernel]:disp_lcm_probe ,detect lcd successfully.lcd_name=DiJing-ili9806e.
suspend时没有对屏幕进行灭背光动作,没辙,想其他版本
2. 想到调节LCD亮度有对应的文件节点,通过直接往文件里面echo数值,直接修改亮度,看看是否好使
设备文件节点路径(recovery模式下adb开启需要单独调试出来):
/sys/class/leds/lcd-backlight/brightness
先cat出来brigthness节点初始默认值是多少,
cat /sys/class/leds/lcd-backlight/brightness 后发现为0
echo 200>/sys/class/leds/lcd-backlight/brightness
之后再进行重启或者关机白屏现象不复现,现在有点眉目了,看来和亮度初始值有关
3. 在dts里面找到设置的/sys/class/leds/lcd-backlight/brightness文件节点内容的位置如下:
dts路径:kernel-3.18/arch/arm/boot/dts/$(project).dts
led6:led@6 {
compatible = "mediatek,lcd-backlight";
led_mode = <4>;
data
这篇关于Recovery模式下进行重启或者关机LCD会闪一下白屏的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!