[LCD][kernel] 亮屏后立马黑屏
-
Hello all,
- 芯片:R818
- 系统:TINA 2.0
- LCD屏幕型号: k101im2byl02l
- 背景:之前我们的产品用 TINA 0.2 可以使用,目前想要迁移到 TINA 2.0 看看是否能够解决显示的其他问题
- 现象: 经过 uboot 和 kernel 的适配, 进入 uboot 和 kernel 可以看到画面,但是过了一会儿屏幕就灭了。
- 尝试的排查方法:DE截屏(echo /a.bmp > /sys/class/disp/disp/attr/capture_dump) 能够获取到黑屏前的画面
- 参考资料:《Tina Linux LCD v1.1 (2020.03.06 版本)》
- 附件1:我们目前的 board.dts 文件
- 附件2:r818B/configs/evb1/sys_config.fex
- 附件3:屏显现象: 显示 color bar 后屏幕熄灭
先谢谢各位大佬了
-
@rayzhang
背光正常吗? -
@rayzhang
1、确认是哪个阶段后黑屏的,内核加载disp驱动后?
2、colorbar是什么时候显示的?到内核后执行命令显示的?
3、确认黑屏状态背光是否有,屏供电是否有,lcd的各gpio是否正常
4、开机后尝试休眠唤醒lcd,看能否点亮mount -t debugfs none /sys/kernel/debug cd /sys/kernel/debug/dispdbg //休眠 echo suspend > command; echo disp0 > name; echo 1 > start //唤醒 echo resume > command; echo disp0 > name; echo 1 > start
-
hello @whycan
查看了一下
root@TinaLinux:/# cat /sys/kernel/debug/pwm platform/7020c00.pwm, 1 PWM device pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: normal platform/300a000.pwm, 16 PWM devices pwm-0 (lcd ): requested enabled period: 20000 ns duty: 3984 ns polarity: inverse pwm-1 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-2 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-3 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-4 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-5 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-6 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-7 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-8 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-9 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-10 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-11 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-12 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-13 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-14 ((null) ): period: 0 ns duty: 0 ns polarity: normal pwm-15 ((null) ): period: 0 ns duty: 0 ns polarity: normal
根据《Tina Linux LCD v1.1 (2020.03.06 版本)》,
上面的“requested enabled”表示请求并且使能了
,但是polarity: inverse
不知道有没有问题? -
hello @anruliu
-
确认是哪个阶段后黑屏的,内核加载disp驱动后?
--> 我看代码有pr_info("[DISP]%s\n", __func__);
不过开机后,dmesg
没有看到dev_disp.c
的代码。休眠唤醒后dmesg | grep -i disp
才能看到相关代码。 -
colorbar是什么时候显示的?到内核后执行命令显示的?
--> 开头的视频我没有执行任何操作,只是单纯的系统启动。 colorbar 是因为 kernel_menuconfig 的时候配置了CONFIG_DISP2_SUNXI_BOOT_COLORBAR=y
后来我找到了相关代码在 drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 的 disp_draw_colorbar 函数,所以 按道理,这时候 disp驱动已经被加载到 kernel 了吧?
3、确认黑屏状态背光是否有,屏供电是否有,lcd的各gpio是否正常
--> 楼上我贴了cat /sys/kernel/debug/pwm
, 不知道polarity: inverse
之类的有没有问题呢?
(PS1: 休眠唤醒后发现 一直都是polarity: inverse
)
(PS2: 休眠唤醒并且正常显示 COLORBAR 的状态时候, 用 brightnesstester 程序,发现brightness
数值大小和实际效果是正相关的,说明这时候 背光 应该是 OK的?)4、开机后尝试休眠唤醒lcd,看能否点亮
--> 非常神奇的是,唤醒 后, 屏幕就正常亮了~ 并且使用echo X > /sys/class/disp/disp/attr/colorbar
命令(X: 0~8),可以 显示不同的图像出来。所以现在不知道是什么原因,手动休眠唤醒LCD就可以了? 这是什么原理呢?
多谢多谢 -
-
@rayzhang 可以用示波器量下黑屏那一刻,屏的各gpio有没有什么变化,电有没有变化。比较常见的是开机过程中rest被拉低了
-
hello @anruliu , 请教一下整个显示流程哪个步骤会拉低RESET呢? 我们现在是手头上没有示波器这些硬件调试手段
PS1: 现在 uboot 阶段偶尔不亮屏幕
PS2: 休眠唤醒lcd 一定能够亮起屏幕
PS3: 我们现在手头上的源码(tina 2.0) 信息如下,应该不会有问题吧?# repo forall -c "pwd; git log --oneline;echo;echo" /works/to-download/build 9677096 smartx-r818-tina-v2.0-release release 11276aa smartx-r818-tina-v1.0.0-release release 0aee083 smartx-r818-tina-v0.2.0-release release /r818/config b9b4e3e smartx-r818-tina-v1.0.0-release release c265e5d smartx-r818-tina-v0.2.0-release release /r818/device/config/chips/r818 961a3d9 [fix] 适配产品,可以 烧写并 adb shell 7667829 smartx-r818-tina-v2.0-release release /r818/device/config/common d3d5e39 smartx-r818-tina-v1.0.0-release release a76bf10 smartx-r818-tina-v0.2.0-release release /r818/dl 6b687c4 remove unused package 1819cd9 smartx-r818-tina-v1.0.0-release release 0e5a144 smartx-r818-tina-v0.2.0-release release /r818/docs e4127ef smartx-r818-tina-v0.2.0-release release /r818/lichee/arisc c357572 smartx-r818-tina-v2.0-release release 589bc39 smartx-r818-tina-v1.0.0-release release bfc598f smartx-r818-tina-v0.2.0-release release /r818/lichee/brandy-2.0/spl 0ca0957 smartx-r818-tina-v2.0-release release 0f2b788 smartx-r818-tina-v1.0.0-release release 9ab7078 smartx-r818-tina-v0.2.0-release release /r818/lichee/brandy-2.0/tools 3f0f997 smartx-r818-tina-v1.0.0-release release 77e0592 smartx-r818-tina-v0.2.0-release release /r818/lichee/brandy-2.0/u-boot-2018 5ec57ef [fix] 勾选 LCD_SUPPORT_K101IM2BYL02L e568104 smartx-r818-tina-v2.0-release release 9b56363 smartx-r818-tina-v1.0.0-release release 44e5477 smartx-r818-tina-v0.2.0-release release /r818/lichee/linux-4.9 8a99727f0 [feature]添加 k101im2byl02l 屏幕显示驱动 8b9cb8723 smartx-r818-tina-v2.0-release release 352550f19 smartx-r818-tina-v1.0.0-release release 842f0db32 smartx-r818-tina-v0.2.0-release release /r818/package 38e46ac3 smartx-r818-tina-v2.0-release release 04e65073 remove unused package 667cc61e smartx-r818-tina-v1.0.0-release release 047ce9bd smartx-r818-tina-v0.2.0-release release /r818/prebuilt d771fad smartx-r818-tina-v0.2.0-release release /r818/scripts 37ecb36 smartx-r818-tina-v2.0-release release 984d79d smartx-r818-tina-v1.0.0-release release 1c87d6c smartx-r818-tina-v0.2.0-release release /r818/target 50cf978 smartx-r818-tina-v2.0-release release b804823 defconfig:remove unused info 7a1879a smartx-r818-tina-v1.0.0-release release 8582b0c smartx-r818-tina-v0.2.0-release release /r818/toolchain 9f90325 smartx-r818-tina-v0.2.0-release release /r818/tools 48b4556 smartx-r818-tina-v2.0-release release 936113f smartx-r818-tina-v1.0.0-release release a4745b7 smartx-r818-tina-v0.2.0-release release
-
RayZhang
Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号