[RK3399][Android7.1] 调试笔记 --- HDMI作主屏无法正常显示

Platform: RK3399
OS: Android 7.1
Kernel: v4.4.83

背景:
之前有调试好主屏edp+副屏hdmi双屏显示的,现在需要把hdmi当主屏显示,没有副屏。修改后系统能开机,但是无法显示。


异常Log:

01-01 08:02:41.026 E/hwc-drm-resources( 223): failed to find primary display


解决方法:

系统的build.prop中添加如下一行
sys.hwc.device.primary=HDMI-A

相关代码分析可参考 ConfigurePossibleDisplays()@Drmsources.cpp


DTS关于HDMI改动如下:

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-eco.dts b/arch/arm64/boot/dts/rockchip/rk3399-eco.dts
index 51f52af..6d0cfa7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-eco.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-eco.dts
@@ -52,6 +52,7 @@
 	compatible = "rockchip,rk3399-mid", "rockchip,rk3399";
 
 	edp_panel: edp-panel {
+	status = "disabled";
 		//Kris,180628, 9.7inch sharp lcd.
 		compatible = "lg,lp097qx1-spa1", "panel-simple";
 		bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
@@ -1038,7 +1039,7 @@
 };
 
 &edp {
-	status = "okay";
+	status = "disabled";
 	//Kris
 	force-hpd;
 	ports {
@@ -1054,9 +1055,6 @@
 	};
 };
 
-&edp_in_vopl {
-	status = "disabled";
-};
 
 
 //Kris, 190408, add hdmi support.
@@ -1065,10 +1063,10 @@
 	ddc-i2c-bus = <&i2c4>;
 };
 
-&hdmi_in_vopb {
-	status = "disabled";
-};
 
+&hdmi_in_vopl {
+           status = "disabled";
+    };
 &cdn_dp {
 	//Kris,180628,disable it.
 	status = "disabled";
@@ -1086,6 +1084,22 @@
 };
 
 &route_edp {
+	status = "disabled";
+	logo,mode = "center";
+};
+
+
+&route_hdmi {
 	status = "okay";
+	connect = <&vopb_out_hdmi>;
 	logo,mode = "center";
 };
+
+&vopb {
+	assigned-clocks = <&cru DCLK_VOP0_DIV>;
+	assigned-clock-parents = <&cru PLL_VPLL>;
+};
+&vopl {
+	assigned-clocks = <&cru DCLK_VOP1_DIV>;
+	assigned-clock-parents = <&cru PLL_CPLL>;
+};


参考:
Rockchip 基于DRM框架的HDMI开发指南 v1.2-20190226

你可能感兴趣的:(RK3399,子类__Display)