RK3288[android 7.1]调试笔记 ----双屏异显(edp屏做主屏,lvds做副屏)

1 找到 在要编译的rk3288-evb-android-rk808-edp.dts
调试思路先将edp和lvds屏配置其dts分别点亮后,最后将两个屏的dts合在一起
在rk3288-evb-android-rk808-edp.dts中加上最终的edp屏和lvds屏的dts配置如下:

。。。。。。。。。。。
// added for edp start <<<
&edp {
	status = "okay";
};

&edp_phy {
	status = "okay";
};
 &route_edp {
	status = "okay";
};
//rk3288 有两路通道vopb(4K) vopl(2K) ,这里异显设vopb通道是edp,vopl通道是lvds
&edp_in_vopb {
	status = "okay";
};
&edp_in_vopl {
	status = "disabled";
};
&edp_panel {
//	compatible = "simple-panel";
    compatible ="lg,lp079qx1-sp0v";
//	backlight = <&backlight>;  //这里异显如果共用背光,只需要配置一个背光
	power-supply = <&vcc_lcd>;
	status = "okay";

	disp_timings: display-timings {
		native-mode = <&edp_panel_name>;

		edp_panel_name: timing0 {
			clock-frequency = <158000000>;
			hactive = <1920>;
			vactive = <1080>;
			hfront-porch = <48>;
			hsync-len = <4>;
			hback-porch = <310>;
			vfront-porch = <3>;
			vsync-len = <4>;
			vback-porch = <60>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <0>;
			pixelclk-active = <0>;
		};
	};
};

// added edp end >>>

// added  for lvds start <<<



&route_lvds {
	status = "okay";
};

&lvds {
	status = "okay";
};
//rk3288 有两路通道vopb(4K) vopl(2K) ,这里异显设vopb通道是edp,vopl通道是lvds
&lvds_in_vopl {
	status = "okay";
};

&lvds_in_vopb {
	status = "disabled";
};

&lvds_panel {
	status = "okay";
	compatible ="simple-panel";
	backlight = <&backlight>;   //这里异显如果共用背光,只需要配置一个背光
//	bus-format = ; ;
//	bus-format = ;
	enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>;
//	enable = <&gpio7 3 GPIO_ACTIVE_HIGH>;
	enable-delay-ms = <10>;
//	power-supply = <&vcc_lcd>;
	rockchip,data-mapping = "vesa";
//	rockchip,data-mapping = "jeida";
	rockchip,data-width = <24>;
	rockchip,output = "duallvds";

	display-timings {
		native-mode = <&lvds_panel_name>;
		lvds_panel_name: timing0 {
			creen-type = ;
			lvds-format = ;
			out-face    = ;
			clock-frequency = <148000000>;
			hactive = <1920>;
			vactive = <1080>;
			hback-porch = <100>;
			hfront-porch = <160>;
			vback-porch = <25>;
			vfront-porch = <10>;
			hsync-len = <1>;
			vsync-len = <1>;
			hsync-active = <20>;
			vsync-active = <10>;
			de-active = <0>;
			pixelclk-active = <0>;
		};
	};
};

// added lvds end <<<
。。。。。。。。。。。

注意:如果需要配置 VOPL(2K)通道是eDP或者DSI(mipi屏),上层还需要关掉 AFBC,打上以下补丁

wangxd@build-server-100:~/work/dsy/rk3288-Android-7.0/hardware/rockchip/libgralloc((3bb0f11...))$ git diff Android.mk
diff --git a/Android.mk b/Android.mk
index 52387b9..00863f8 100755
--- a/Android.mk
+++ b/Android.mk
@@ -153,16 +153,19 @@ endif
 ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t860)
 MALI_AFBC_GRALLOC := 1
-USE_AFBC_LAYER = 1
+USE_AFBC_LAYER = 0
 LOCAL_CFLAGS += -DMALI_PRODUCT_ID_T86X=1
 endif

2 同时在/device/rockchip/rk3288/system.prop文件中配置好主副屏的属性

wangxd@build-server-100:~/work/dsy/rk3288-Android-7.0/device/rockchip/rk3288((f3c5a0a...))$ git diff system.prop
diff --git a/system.prop b/system.prop
old mode 100644
new mode 100755
index be3f161..ce6c558
--- a/system.prop
+++ b/system.prop
@@ -28,7 +28,8 @@ sys.wallpaper.rgb565=0
 sf.power.control=2073600
 sys.rkadb.root=0
 ro.sf.fakerotation=false
 ro.rk.MassStorage=false
 ro.rk.systembar.voiceicon=true
 ro.rk.systembar.tabletUI=false
@@ -42,6 +43,36 @@ wifi.supplicant_scan_interval=15
 ro.factory.tool=0
 ro.kernel.android.checkjni=0
ro.sf.lcd_density=160
 ro.adb.secure=0
 ro.rk.displayd.enable=false
+ # 主屏是eDP
+ sys.hwc.device.primary=eDP 
+ # 副屏是LVDS 
+ sys.hwc.device.extend=LVDS 
+ # 主分辨率一般设置与主屏分辨率一致
+ persist.sys.framebuffer.main=1920x1080
+ # 主屏edp分辨率
+ persist.sys.resolution.main=1920x1080
+ # 副屏lvds分辨率
+ persist.sys.resolution.aux=1920x1080
 +#  副屏是否全屏显示
+ persist.sys.rotation.efull = true
+ # 主屏的旋转方向(设置的值是0 90 180 270)
+ ro.sf.hwrotation=0
+ # 副屏输出旋转方向对应 0 / 90 / 180 / 270(设置的值是0 1 2 3)
+ persist.sys.rotation.einit =0
+ #副屏是否随着 g-sensor 旋转(只关注方向,黑边不关注)
+ ro.sys.rotation.sensor = true
+#主副屏的方向是否相同
+ ro.same.orientation=false
+ #副屏是否随主屏旋转
+ro.rotation.external=true
+#设置 sys.dual_screen.keycodes 属性的方式来修改相应的触发按键
+ sys.dual_screen.keycodes=24,25

3 找RK申请双屏异显的补丁
**主要是打上frameworks和cts层的提供异显接口补丁 **

4 合入提供的双屏异显的framework 目录和cts目录补丁后
按照以下操作
(1)打开 设置的显示->HDMI 中打开如下图片中的双显开关,
(2)用adb输入触发命令 input keyevent 24 25 可以看到双屏异显

5 可以用以下谷歌google原生presentation类实现异显的apk测试异显功能

链接:https://pan.baidu.com/s/1xEsDoKi9ZZ_4rPts-XvIag 
提取码:6cc0 

你可能感兴趣的:(调试笔记,RK)