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