rk3288 android 4.4.4 双屏异显

本文档详细介绍了在RK3288平台上,针对Android 4.4.4系统如何实现双屏异显的配置过程,包括内核dts文件的修改、驱动代码的调整,如hdmi、LVDS、LCD的设置。通过这些改动,可以实现设备的双屏幕独立显示功能。
摘要由CSDN通过智能技术生成

kernel\arch\arm\boot\dts\include\dt-bindings\rkfb\rk_fb.h


+#define DUAL_LCD 3
+#define DEFAULT_MODE 0


dts文件

&fb {

rockchip,disp-mode = <DUAL_LCD>;
rockchip,uboot-logo-on = <0>;
};


&rk_screen {
status = "okay";
screen0 {
screen_prop = <PRMRY>;//PRMRY
native-mode = <DEFAULT_MODE>;
power_ctr {
lcd_en {
rockchip,power_type = <GPIO>;
gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
};
lcd_cs {
rockchip,power_type = <GPIO>;
gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
};
};
display-timings {
            native-mode = <&hn116wx1>;
            compatible = "rockchip,display-timings";
            hn116wx1: timing0 {
screen-type = <SCREEN_EDP>;
lvds-format = <LVDS_8BIT_2>;
out-face    = <OUT_P888>;
clock-frequency = <73000000>;
hactive = <1366>;//720
vactive = <768>;//1280
hback-porch = <70>;
hfront-porch = <70>;
vback-porch = <10>;
vfront-porch = <10>;
hsync-len = <10>;
vsync-len = <2>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <1>;
swap-rb = <0>;
swap-rg = <0>;
swap-gb = <0>;
            };
        };
};
screen1 {
screen_prop = <EXTEND>;//EXTEND
native-mode = <DEFAULT_MODE>;
power_ctr {
lcd_en {
rockchip,power_type = <GPIO>;
gpios = <&gpio5 GPIO_B1 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
};
/*lcd_cs {
rockchip,power_type = <GPIO>;
gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
rockchip,delay = <10>;
};*/
};
display-timings {
            native-mode = <&b156htn04>;
            compatible = "rockchip,display-timings";
            b156htn04: timing0 {
screen-type = <SCREEN_DUAL_LVDS>;
lvds-format = <LVDS_8BIT_1>;
out-face    = <OUT_P888>;
clock-frequency = <142400000>;
hactive = <1920>;  /* Horizontal display area thd 1024       DCLK */
vactive = <1080>;  /* Vertical display area tvd   600 H */
hback-porch = <60>;    /* HS Width +Back Porch   160  160   160  DCLK (Thw+ thbp)*/
hfront-porch = <60>;  /* HS front porch thfp    16   160   216  DCLK */
vback-porch = <20>;  /* VS front porch tvfp 1 12    127  H   */
vfront-porch = <20>;  /* VS Width+Back Porch    23   23    23   H (Tvw+ tvbp) */
hsync-len = <60>;  /* HS Pulse Width thw 1  -    140  DCLK */
vsync-len = <10>;  /* VS Pulse Width tvw 1  - 20  H */
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <1>;
swap-rb = <0>;
swap-rg = <0>;
swap-gb = <0>;
            };
        };
};

};


&lvds {
status = "okay";
prop = <EXTEND>;
};


&edp{
status = "okay";
prop = <PRMRY>;
};


&lcdc1 {
status = "okay";
rockchip,mirror = <NO_MIRROR>;


};


&hdmi {
status = "disabled";
rockchips,hdmi_audio_source = <0>;
};


From c992f04253bd7c1b72b5bb0041cc4cc1e1e1d9d4 Mon Sep 17 00:00:00 2001
From: shen zhi cheng <szc@rock-chips.com>
Date: Sat, 10 Jan 2015 15:21:16 +0800
Subject: [PATCH] android 4.4.4 dual screen kernel


---
 drivers/video/rockchip/hdmi/rk_hdmi_task.c |    1 +
 drivers/video/rockchip/rk_fb.c             |  138 +++++++++++++++++++++++-----
 include/linux/rk_fb.h                      |    2 +
 3 files changed, 120 insertions(+), 21 deletions(-)


diff --git a/drivers/video/rockchip/hdmi/rk_hdmi_task.c b/drivers/video/rockchip/hdmi/rk_hdmi_task.c
index eb3c7db..d99635f 100755
--- a/drivers/video/rockchip/hdmi/rk_hdmi_task.c
+++ b/drivers/video/rockchip/hdmi/rk_hdmi_task.c
@@ -276,6 +276,7 @@ void hdmi_work(struct work_struct *work)
  if (hdmi->uboot_logo) {
  hdmi->state = CONFIG_AUDIO;
  }
+ kobject_uevent_env(&hdmi->ddev->dev->kobj, KOBJ_CHANGE, envp);
  break;
  case CONFIG_VIDEO:
  hdmi->display = HDMI_DISABLE;
diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c
index 66c5045..369e828 100755
--- a/drivers/video/rockchip/rk_fb.c
+++ b/drivers/video/rockchip/rk_fb.c
@@ -58,15 +58,19 @@
 #define H_USE_FENCE 1
 static int hdmi_switch_complete;
 static st

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值