1.HDMI默认是关闭的,需要打开:
@@ -146,7 +146,7 @@ }; &hdmi { - status = "disabled"; + status = "okay"; rockchip,hdmi_audio_source = <0>; };
显示配置:
&fb { status = "okay"; rockchip,disp-mode = <NO_DUAL>; rockchip,uboot-logo-on = <1>; }; &rk_screen { status = "okay"; display-timings = <&disp_timings>; }; &lcdc { status = "okay"; //backlight = <&backlight>; pinctrl-names = "default", "gpio"; pinctrl-0 = <&lcdc0_den>; pinctrl-1 = <&lcdc0_sync>; rockchip,fb-win-map = <FB_DEFAULT_ORDER>; power_ctr: power_ctr { rockchip,debug = <0>; }; };
2.HDMI有画面出来,但显示比例有问题,需要修改disp_timings的显示分辨率和HDMI的默认分辨率一致:
查看HDMI默认分辨率:
rk3128:/ $ cat /sys/class/display/HDMI/mode 1280x720p-60
drivers/video/rockchip/hdmi/rockchip-hdmi.h代码中定义如下:
timing的分辨率需要对应是1280x720即可,其他参数可以不用管。
disp_timings: display-timings { native-mode = <&timing0>; timing0: timing0 { screen-type = <SCREEN_RGB>; out-face = <OUT_P888>; color-mode = <COLOR_YCBCR>; clock-frequency = <74250000>; hactive = <1280>; vactive = <720>; hback-porch = <220>; hfront-porch = <110>; vback-porch = <20>; vfront-porch = <5>; hsync-len = <40>; vsync-len = <5>; hsync-active = <1>; vsync-active = <1>; de-active = <0>; pixelclk-active = <0>; swap-rb = <0>; swap-rg = <0>; swap-gb = <0>; size,width = <69>; size,height = <114>; }; };
3.画面显示正常,但发现每次拔掉HDMI,串口都会有大量报错,并且设备会是卡死状态。
通过rk的支持,有文档说明如下:
由于我们设备只用到HDMI显示,是不用接显示屏,所以需要把disp-mode对应设置为NO_DUAL:
diff --git a/arch/arm/boot/dts/rk3128-xzy.dts b/arch/arm/boot/dts/rk3128-xzy.dts index 90c1397..2261d47 100755 --- a/arch/arm/boot/dts/rk3128-xzy.dts +++ b/arch/arm/boot/dts/rk3128-xzy.dts @@ -118,7 +118,7 @@ &fb { status = "okay"; - rockchip,disp-mode = <ONE_DUAL>; + rockchip,disp-mode = <NO_DUAL>; rockchip,uboot-logo-on = <1>; };
从新编译烧录测试,发现在热拔插就没有问题了。
当然,如果需要用到双屏显示,需要把disp-mode对应设置为ONE_DUAL,并找rk要相应的补丁。
标签:disp,HDMI,rockchip,rk3128,mode,dts,调试 From: https://www.cnblogs.com/wmc245376374/p/17926368.html