RK3288 HDMI增加特殊分辨率
转载请注明出处:https://www.cnblogs.com/lialong1st/p/9174475.html
CPU:RK3288
系统:Android 5.1
本帖以 HDMI 800x600p-60 为例,添加新的分辨率。
1、修改文件,打开调试模式,得到 EDID 信息后,记得关闭
diff --git a/kernel/drivers/video/fbmon.c b/kernel/drivers/video/fbmon.c
index 6103fa6..ce9b11e
--- a/kernel/drivers/video/fbmon.c
+++ b/kernel/drivers/video/fbmon.c
@@ -, +, @@
* EDID parser
*/ -#undef DEBUG /* define this for verbose EDID parsing output */
+//#undef DEBUG /* define this for verbose EDID parsing output */
+#define DEBUG #ifdef DEBUG
#define DPRINTK(fmt, args...) printk(fmt,## args)
2、打印出 EDID 信息
[ 0.805638] ========================================
[ 0.805652] Display Information (EDID)
[ 0.805662] ========================================
[ 0.805672] EDID Version 1.3
[ 0.805682] Manufacturer: ROW
[ 0.805691] Model:
[ 0.805699] Serial#:
[ 0.805708] Year: Week
[ 0.805719] Monitor Name: AAA
[ 0.805728] Display Characteristics:
[ 0.805738] Monitor Operating Limits: From EDID
[ 0.805754] H: -80KHz V: -76Hz DCLK: 160MHz
[ 0.805764] Digital Display Input
Sync:
[ 0.805780] Max H-size in cm: variable
[ 0.805791] Max V-size in cm: variable
[ 0.805801] Gamma: 1.0
[ 0.805813] DPMS: Active yes, Suspend no, Standby yes
[ 0.805823] Unknown
[ 0.805832] Chroma
[ 0.805840] RedX: 0.636 RedY: 0.349
[ 0.805852] GreenX: 0.290 GreenY: 0.589
[ 0.805863] BlueX: 0.143 BlueY: 0.080
[ 0.805875] WhiteX: 0.313 WhiteY: 0.329
[ 0.805886] First DETAILED Timing is preferred
[ 0.805899] Detailed Timings
[ 0.805910] MHz +HSync +VSync [ 0.805932] Supported VESA Modes
[ 0.805945] 720x400@70Hz
[ 0.805955] 640x480@60Hz
[ 0.805964] 640x480@72Hz
[ 0.805972] 640x480@75Hz
[ 0.805980] 800x600@56Hz
[ 0.805988] 800x600@60Hz
[ 0.805997] 800x600@72Hz
[ 0.806005] 800x600@75Hz
[ 0.806014] Manufacturer's mask: 0
[ 0.806023] Standard Timings
[ 0.806034] ========================================
Detailed Timings 是主要的 LCD 参数,Supported VESA Modes 是 LCD 支持的分辨率。
通过源码查看各参数的含义:
路径:kernel/drivers/video/fbmon.c
DPRINTK(" %d MHz ", PIXEL_CLOCK/);
DPRINTK("%d %d %d %d ", H_ACTIVE, H_ACTIVE + H_SYNC_OFFSET, H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH, H_ACTIVE + H_BLANKING);
DPRINTK("%d %d %d %d ", V_ACTIVE, V_ACTIVE + V_SYNC_OFFSET, V_ACTIVE + V_SYNC_OFFSET + V_SYNC_WIDTH, V_ACTIVE + V_BLANKING);
DPRINTK("%sHSync %sVSync\n\n", (HSYNC_POSITIVE) ? "+" : "-", (VSYNC_POSITIVE) ? "+" : "-");
由此可以得到 LCD 的各参数:
40M = PIXEL_CLOCK = pixclock
= H_ACTIVE = xres
= H_ACTIVE + H_SYNC_OFFSET = xres + h_fp = +
= H_ACTIVE + H_SYNC_OFFSET + H_SYNC_WIDTH = xres + h_fp + h_pw = + +
= H_ACTIVE + H_BLANKING = xres + h_bp + h_fp + h_pw = + + +
= V_ACTIVE = yres
= V_ACTIVE + V_SYNC_OFFSET = yres + v_fp = +
= V_ACTIVE + V_SYNC_OFFSET + V_SYNC_WIDTH = yres + v_fp + v_pw = + +
= V_ACTIVE + V_BLANKING = yres + v_bp + v_fp + v_pw = + + +
+HSync = HSYNC_POSITIVE
+VSync = VSYNC_POSITIVE
3、在枚举中增加此分辨率,枚举值为 108,并修改默认分辨率
diff --git a/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi.h b/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi.h
index b5475e4..f31f5b9
--- a/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi.h
+++ b/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi.h
@@ -, +, @@ enum hdmi_video_infomation_code {
HDMI_3840X2160P_30HZ_4_3, /**/
HDMI_3840X2160P_50HZ_4_3,
HDMI_3840X2160P_60HZ_4_3,
+ HDMI_800X600P_60HZ, /**/
}; /* HDMI Extended Resolution */
@@ -, +, @@ struct hdmi {
#define HDMI_AUTO_CONFIG false /* HDMI default vide mode */
-#define HDMI_VIDEO_DEFAULT_MODE HDMI_1920X1080P_60HZ//HDMI_1280X720P_60HZ
+#define HDMI_VIDEO_DEFAULT_MODE HDMI_800X600P_60HZ//HDMI_1920X1080P_60HZ//HDMI_1280X720P_60HZ
/*HDMI_1920X1080P_60HZ*/
#define HDMI_VIDEO_DEFAULT_COLORMODE HDMI_COLOR_AUTO
#define HDMI_VIDEO_DEFAULT_COLORDEPTH 8
4、将屏参数据添加到数组 static const struct hdmi_video_timing hdmi_mode[] 中
diff --git a/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi-lcdc.c b/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi-lcdc.c
index 63a5cfb..0f920c2
--- a/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi-lcdc.c
+++ b/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi-lcdc.c
@@ -, +, @@ static const struct hdmi_video_timing hdmi_mode[] = {
{ { "720x576i@50Hz", , , , , , , , , , , , , }, , HDMI_720X576I_50HZ_16_9, , OUT_P888},
{ { "720x480p@60Hz", , , , , , , , , , , , , }, , HDMI_720X480P_60HZ_16_9, , OUT_P888},
{ { "720x576p@50Hz", , , , , , , , , , , , , }, , HDMI_720X576P_50HZ_16_9, , OUT_P888},
+ { { "800x600p@60Hz", , , , , , , , , , , FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, , }, , HDMI_800X600P_60HZ, , OUT_P888},
{ { "1280x720p@24Hz", , , , , , , , , , , FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, , }, , HDMI_1280X720P_24HZ_4_3, , OUT_P888},
{ { "1280x720p@25Hz", , , , , , , , , , , FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, , }, , HDMI_1280X720P_25HZ_4_3, , OUT_P888},
{ { "1280x720p@30Hz", , , , , , , , , , , FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, , }, , HDMI_1280X720P_30HZ_4_3, , OUT_P888},
polariry:水平同步高电平有效和垂直同步高电平有效
PorI:0 为不是隔行扫描。定义文件路径:/kernel/include/uapi/linux/fb.h
flag:不知道什么意思
vic:在分辨率枚举中的编号,本次添加的为 108
5、此时 HDMI 可以正常输入 800x600 的分辨率,但是实际显示可能有问题。
根据显示器的 EDID 修改 dts 中加载的屏参文件,修改值与添加到 HDMI 数组中的相同。
diff --git a/kernel/arch/arm/boot/dts/lcd-800x600.dtsi b/kernel/arch/arm/boot/dts/lcd-800x600.dtsi
index c0baf15..733a157
--- a/kernel/arch/arm/boot/dts/lcd-800x600.dtsi
+++ b/kernel/arch/arm/boot/dts/lcd-800x600.dtsi
@@ -, +, @@
clock-frequency = <>;
- hactive = <>;
- vactive = <>;
- hback-porch = <>;
- hfront-porch = <>;
- vback-porch = <>;
- vfront-porch = <>;
- hsync-len = <>;
- vsync-len = <>;
+ hactive = <>;
+ vactive = <>;
+ hback-porch = <>;
+ hfront-porch = <>;
+ vback-porch = <>;
+ vfront-porch = <>;
+ hsync-len = <>;
+ vsync-len = <>;
hsync-active = <>;
vsync-active = <>;
de-active = <>;
6、编译烧录,HDMI 显示正常,确认当前分辨率可以在设置 -> HDMI ->分辨率设置中查看,也可以通过指令查看。
$ cat /sys/class/display/HDMI/mode
RK3288 HDMI增加特殊分辨率的更多相关文章
- RK3288 HDMI配置和调试
RK3288 最大输出分辨率为 3840x2160 HDMI 驱动代码位于 kernel/drivers/video/rockchip/hdmi/rockchip-hdmiv2 目录 1.设置默认输出 ...
- RK3288 指令查看LCD分辨率
通过下面指令可以查看当前系统设置的分辨率. root@xxx:/ # cd sys/class/graphics/fb0 cd sys/class/graphics/fb0 root@xxx:/sys ...
- virtualbox上,android x86 的分辨率的设置
参考文章: http://stackoverflow.com/questions/6202342/switch-android-x86-screen-resolution 1) 用VBoxManage ...
- 61配置nanopim1plus的HDMI为1080p输出
61配置nanopim1plus的HDMI为1080p输出 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 21504965 AT qq.com 完成时间:2018/4/4 10:21 版本:V1.1 开 ...
- 【超分辨率】—图像超分辨率(Super-Resolution)技术研究
一.相关概念 1.分辨率 图像分辨率指图像中存储的信息量,是每英寸图像内有多少个像素点,分辨率的单位为PPI(Pixels Per Inch),通常叫做像素每英寸.一般情况下,图像分辨率越高,图像中包 ...
- 硕盟SM-T54(TYPE C转HDMI+VGA+USB3.0+PD3.0)
硕盟SM-T54是一款TYPE C转HDMI+VGA+USB3.0+PD3.0四口扩展坞,您可以将含有USB 3.1协议的电脑主机,通过此产品连接到具有HDMI或VGA的显示器.电视机或其他显示设备. ...
- 硕盟SM-T54| TYPE C转HDMI+VGA+USB3.0+PD3.0四合一多功能扩展坞
硕盟SM-T54是一款 TYPE C转HDMI+VGA+USB3.0+PD3.0四合一多功能扩展坞,支持四口同时使用,您可以将含有USB 3.1协议的电脑主机,通过此产品连接到具有HDMI或VGA的显 ...
- 硕盟SM-T54|type-c转接头HDMI+VGA+USB3.0+PD3.0四合一多功能扩展坞接口功能说明
硕盟SM-T54是一款 TYPE C转HDMI+VGA+USB3.0+PD3.0四合一多功能扩展坞,支持四口同时使用,您可以将含有USB 3.1协议的电脑主机,通过此产品连接到具有HDMI或VGA的显 ...
- 硕盟type-c转接头HDMI+VGA+USB3.0+PD3.0四合一多功能扩展坞
硕盟SM-T54是一款 TYPE C转HDMI+VGA+USB3.0+PD3.0四合一多功能扩展坞,支持四口同时使用,您可以将含有USB 3.1协议的电脑主机,通过此产品连接到具有HDMI或VGA的显 ...
随机推荐
- IOS-源代码管理工具(SVN)
一.使用环境 要想利用SVN管理源代码,必须得有2套环境 服务器 用于存储客户端上传的源代码 可以在Windows上安装Visual SVN Server 大部分情况下,公司的开发人员不必亲自搭建SV ...
- 由浅入深了解EventBus:(六)
线程模型 在EventBus3.0框架中执行线程的快速切换,通过ThreadMode来指定线程在哪个线程中执行; 在EventBus3.0框架线程模型有个PendingPost 类负责数据的传递; f ...
- c# out ref 多个返回值问题个人总结
多个返回值可以用ref或者out来实现 如 var b=string.Empty(); var c=string.Empty(); public bool Test(string a, out str ...
- 转载:【Oracle 集群】RAC知识图文详细教程(四)--缓存融合技术和主要后台进程
文章导航 集群概念介绍(一) ORACLE集群概念和原理(二) RAC 工作原理和相关组件(三) 缓存融合技术(四) RAC 特殊问题和实战经验(五) ORACLE 11 G版本2 RAC在LINUX ...
- gridview 后台增加列
BoundField field1 = null; field1 = new BoundField(); //实例化 field1.HeaderText = "序号";field ...
- vue.js 源代码学习笔记 ----- Dep
/* @flow */ import type Watcher from './watcher' import { remove } from '../util/index' let uid = 0 ...
- 《Drools7.0.0.Final规则引擎教程》第4章 4.4 约束(Pattern的一部分)
4.4.3 约束(Pattern的一部分) 前面我们已经介绍了条件约束在Pattern中位置了,那么什么是条件约束呢?简单来说就是一个返回true或者false的表达式,比如下面的5小于6,就是一个约 ...
- 向量点积(Dot Product),向量叉积(Cross Product)
参考的是<游戏和图形学的3D数学入门教程>,非常不错的书,推荐阅读,老外很喜欢把一个东西解释的很详细. 1.向量点积(Dot Product) 向量点积的结果有什么意义?事实上,向量的点积 ...
- vue做路由页面内容跳转
安装----npm npm install vue-router 如果在一个模块化工程中使用它,必须要通过 Vue.use() 明确地安装路由功能: import Vue from 'vue' imp ...
- libudev-dev : Depends: libudev0 (= 175-0ubuntu9) but 175-0ubuntu9.3 is to be installed 错误解决方案
libudev-dev : Depends: libudev0 (= -0ubuntu9) but -0ubuntu9. is to be installed 错误解决方案 参考文章: 1. ubun ...