ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RK3288 增加双屏异显 eDP+LVDS

RK3288 增加双屏异显 eDP+LVDS

原创 Linux操作系统 作者:tt7643066 时间:2020-02-16 20:12:52 0 删除 编辑

CPU RK3288

系统: Android 5.1

 

下面是官方文档中的信息。

1 rk3288 支持的显示接口可以任意组合。

2 、双屏异显时,一个显示接口当主屏,另一个当副屏;主副屏由板级 dts 文件确定,启动后无法动态更改。

3 、当两路显示接口显示不同分辨率时, rk3288 只能为一路显示接口提供精确时钟,另一路显示接口时钟会有微小频偏。

 

瑞芯微虽然提供了 Android 5.1 的补丁,但是本人在移植过程中出现一些问题(打补丁最好一行行核对,不要图方便直接使用指令)。

设备 eDP 为主屏, lvds 为副屏。

 

1 )首先修改两个屏参文件 lcd-xxx.dtsi

eDP 屏参文件补丁

diff --git a/kernel/arch/arm/boot/dts/lcd-NV116FH1.dtsi b/kernel/arch/arm/boot/dts/lcd-NV116FH1.dtsi

index 3862b05..7bf992f 100755

--- a/kernel/arch/arm/boot/dts/lcd-NV116FH1.dtsi

+++ b/kernel/arch/arm/boot/dts/lcd-NV116FH1.dtsi

@@ - 3 , 11 + 3 , 9 @@

  *

  */

 

-/ {

-

-        disp_timings: display-timings {

-                        native-mode = <&timing0>;

-                        timing0: timing0 {

+        display-timings {

+                        native-mode = <&nv116fhm>;

+                        nv116fhm: timing0 {

                 screen-type = <SCREEN_EDP>;

                 out -face    = <OUT_P666>;

                 clock-frequency = < 205000000 >;

@@ - 30 , 4 + 30 , 3 @@

                swap-gb = < 0 >;

                         };

               };

-};

lvds 屏参文件补丁

diff --git a/kernel/arch/arm/boot/dts/lcd-ZJ080NA-08A.dtsi b/kernel/arch/arm/boot/dts/lcd-ZJ080NA-08A.dtsi

old mode 100644

new mode 100755

index fc6385c..58f999be

--- a/kernel/arch/arm/boot/dts/lcd-ZJ080NA-08A.dtsi

+++ b/kernel/arch/arm/boot/dts/lcd-ZJ080NA-08A.dtsi

@@ - 3 , 11 + 3 , 10 @@

  *

  */

 

-/ {

 

-        disp_timings: display-timings {

-                        native-mode = <&timing0>;

-                        timing0: timing0 {

+        display-timings {

+                        native-mode = <&zj080na>;

+                        zj080na: timing0 {

                 screen-type = <SCREEN_DUAL_LVDS>;

                 lvds-format = <LVDS_8BIT_1>;

                 out -face    = <OUT_P888>;

@@ - 30 , 4 + 30 , 3 @@

                swap-gb = < 0 >;

             };

         };

-};

 

2 )根据官方提供,打上 kernel 补丁

 kernel 补丁

 

3 )根据官方提供,打上 hardware 补丁

 hardware 补丁

 

4 )根据官方提供,打上  framework 补丁

 framework 补丁

 

5 )官方提供的补丁打完了,但是此时编译可能会报错,如下:

cts/tests/tests/view/src/android/view/cts/WindowTest.java: 846 : error: WindowTest.MockWindow is not abstract and does not override abstract method moveExtendDisplay() in Window

public class MockWindow extends Window {

^

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

1 error

make: *** [ out /target/common/obj/APPS/CtsViewTestCases_intermediates/classes-full-debug.jar] Error 41

make: *** Waiting for unfinished jobs....

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint: unchecked for details.

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint: unchecked for details.

Warning: AndroidManifest.xml already defines minSdkVersion ( in http: //schemas.android.com/apk/res/android); using existing value in manifest.

Warning: AndroidManifest.xml already defines targetSdkVersion ( in http: //schemas.android.com/apk/res/android); using existing value in manifest.

 

#### make failed to build some targets ( 03 : 55 (mm:ss)) ####

根据编译错误提示,需要修改 cts/tests/tests/view/src/android/view/cts/WindowTest.java 文件。

diff --git a/cts/tests/tests/view/src/android/view/cts/WindowTest.java b/cts/tests/tests/view/src/android/view/cts/WindowTest.java

index 3c5386d..8732ae7 100755

--- a/cts/tests/tests/view/src/android/view/cts/WindowTest.java

+++ b/cts/tests/tests/view/src/android/view/cts/WindowTest.java

@@ - 998 , 6 + 998 , 19 @@ public class WindowTest extends ActivityInstrumentationTestCase2<WindowCtsActivi

         }

 

         @Override

+        public void moveAppToDisplay( int id) {

+        }

+

+        @Override

+        public void syncDualDisplay() {

+        }

+

+        @Override

+        public void moveExtendDisplay() {

+        }

+

+

+        @Override

         public void setDefaultWindowFormat( int format) {

             super.setDefaultWindowFormat(format);

         }

 

6 )此时可以编译成功,在屏参正确的前提下,主屏显示正常,副屏出现花屏,需要在  system.prop 里添加属性 ro.htg.force=1

diff --git a/device/rockchip/rk3288/system.prop b/device/rockchip/rk3288/system.prop

index 26a2b09..c4f2c3d 100755

--- a/device/rockchip/rk3288/system.prop

+++ b/device/rockchip/rk3288/system.prop

@@ - 12 , 6 + 12 , 7 @@ rild.libpath=/system/lib/libril-rk29-dataonly.so

 rild.libargs=-d /dev/ttyACM0

 persist.tegra.nvmmlite = 1

 ro.audio.monitorOrientation= true

+ro.htg.force= 1

 

 #NFC

 debug.nfc.fw_download= false

 

此时大功告成,双屏可以正常显示,也可以实现双屏异显。

 

如果 lcd 出现重复性黑屏亮屏,找到对应的屏参文件,在正常范围内调节频率 clk 值即可。

display-timings {

                        native-mode = <&ee101ia>;

                        ee101ia: timing0 {

                screen-type = <SCREEN_DUAL_LVDS>;

                lvds-format = <LVDS_8BIT_1>;

                out -face    = <OUT_P888>;

                color-mode = <COLOR_RGB>;

                // 调节 lcd 频率

                clock-frequency = < 148500000 >;

                hactive = < 1920 >;

                vactive = < 1080 >;

如果单屏调试都正常点亮,打补丁后,点不亮或者有花屏现象,尝试增大对应屏的电源使能延时  

 lcd_en {

    rockchip,power_type = <GPIO>;

    gpios = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;

-   rockchip,delay = < 10 >;

+   rockchip,delay = < 100 >;

};

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69948385/viewspace-2675792/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-09-14

  • 博文量
    27
  • 访问量
    14477