完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
一,得到屏幕的EDID
1.打开EDID调试信息(查看LCD参数) # vi 。/kernel/drivers/video/fbdev/core/fbmon.c //#undef DEBUG /* define this for verbose EDID parsing output */ #define DEBUG 失败 2.在ububtuPC上安装read-edid查看该LCD参数 # sudo get-edid | parse-edid 。.. Section “Monitor” Identifier “” ModelName “” VendorName “ADA” # Monitor Manufactured week 1 of 2007 # EDID version 1.3 # Digital Display DisplaySize 150 100 Gamma 1.00 Option “DPMS” “false” Modeline “Mode 0” 32.00 800 840 888 928 480 493 496 525 -hsync -vsync 二。尝试修改内核文件 1.在rockchip-hdmi.h (/kernel/drivers/video/rockchip/hdmi) - enum hdmi_video_information_code 尾部增加vic枚举值 HDMI_800x480P_60HZ 2.在rockchip-hdmi-lcdc.c (/kernel/drivers/video/rockchip/hdmi) -struct hdmi_video_timing hdmi_mode增加LCD参数(由上面modeline计算得到) {undefined .mode = {undefined .name = “800x480p@60Hz”,//名称 .refresh = 60, //刷新频率 .xres = 800, //行像素 thd .yres = 480, //列像素 tvd .pixclock = 32000000, //像素时钟 .left_margin = 40, //水平后沿hb .right_margin = 40, //水平前沿hfb .upper_margin = 29, //垂直后沿vb .lower_margin = 13, //垂直前沿 vfb .hsync_len = 48, //行同步脉宽hpw .vsync_len = 3, //列同步脉宽vpw .sync = 0, //水平/垂直同步 .vmode = 0, .flag = 0, }, .vic = HDMI_800x480P_60HZ, .vic_2nd = 0, .pixelrepeat = 1, .interface = OUT_P888, }, 3.增加LCD参数到drm edid_cea_modes (kerneldriversgpudrmdrm_edid.c) 以上更改都不能成功驱动屏幕 4.继续测试,过程中发现是可以成功读到LEDedid的,顺便学习了一下 解析edid [root@rk3328:/sys/devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1]# od -x 。/edid 0000000 ff00 ffff ffff 00ff 8104 0004 0001 0000 0000020 1101 0301 0f80 000a 000a 0000 0000 0000 0000040 0000 0000 0000 0101 0101 0101 0101 0101 0000060 0101 0101 0101 0c80 8020 e030 102d 3028 0000100 00d3 446c 0000 1800 0000 1000 0000 0000 0000120 0000 0000 0000 0000 0000 0000 1000 0000 0000140 0000 0000 0000 0000 0000 0000 0000 1000 0000160 0000 0000 0000 0000 0000 0000 0000 1700 解析128字节 (和pc读到的匹配) 0000000 ff00 ffff ffff 00ff 头 (大小端) 8104 生产商 0004 产品ID 0001 0000 序列号 0000020(10) 1101 生产时间 17年1月 0301 版本号 80 信号类型 0f 宽度 160 0a 高度 100 00 gamma 0a DPMS属性 00 0000 0000 //色度信息 0000 0000040(20) 0000 00 (23) 00 00 00 0101 0101 0101 0101 0101// 0000060(30) 0101 0101 0101 //详细信息描述1 每18字节 0c80 //像素时钟 800*480(0320 01e0) 8020 //水平像素低8(20),水平像素balnking e030 //水平像素高4位(03)&水平像素balnking高四位 垂直像素低8(e0) 102d //垂直像素balnking(2d) 垂直像素高4位(01)&垂直像素balnking高四位 3028 //水平信号偏移 水平脉宽 0000100(40) 00d3 //垂直偏移+垂直脉宽 446c //水平像素低8 垂直像素低8 尺寸mm 0000 //高4位 1800 //标志位 水平垂直同步 0000 1000 0000 0000 //详细信息描述2 0000120(50) 0000 0000 0000 0000 0000 0000 1000 0000 //详细信息描述3 0000140(60) 0000 0000 0000 0000 0000 0000 0000 1000 //详细信息描述4 0000160 0000 0000 0000 0000 0000 0000 0000 00 是否存在扩展edid 17 校验和 5.查看drm相关的dmesg 发现有CLOCK_RANGE(时钟频率出错)报错 //打开drm调试开关 echo 0x1f 》 /sys/module/drm/parameters/debug dmesg | grep drm [ 7500.812744] [drm:drm_helper_hpd_irq_event] [CONNECTOR:69:HDMI-A-1] status updated from disconnected to connected [ 7500.812771] [drm:drm_sysfs_hotplug_event] generating hotplug event [ 7500.812876] [drm:drm_fb_helper_hotplug_event] [ 7500.812899] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:69:HDMI-A-1] [ 7500.919079] [drm:drm_edid_to_eld] ELD: no CEA Extension found [ 7500.919113] [drm:drm_property_unreference_blob] ffffffc07cd62a80: blob ID: 117 (1) [ 7500.919168] [drm:drm_mode_debug_printmodeline] Modeline 77:“800x480” 66 32000 800 840 888 928 480 493 496 525 0x48 0xa [ 7500.919188] [drm:drm_mode_prune_invalid] Not using 800x480 mode: CLOCK_RANGE [ 7500.919216] [drm:drm_setup_crtcs] [ 7500.919237] [drm:drm_enable_connectors] connector 69 enabled? yes [ 7500.919258] [drm:drm_target_preferred] looking for cmdline mode on connector 69 [ 7500.919341] [drm:drm_target_preferred] looking for preferred mode on connector 69 0 [ 7500.919359] [drm:drm_target_preferred] found mode none [ 7500.919378] [drm:drm_setup_crtcs] picking CRTCs for 8192x8192 config [ 7500.920372] [drm:drm_atomic_state_init] Allocated atomic state ffffffc07cd62280 [ 7500.920404] [drm:drm_atomic_get_plane_state] Added [PLANE:58] ffffffc05d7c8200 state to ffffffc07cd62280 [ 7500.920429] [drm:drm_atomic_get_plane_state] Added [PLANE:61] ffffffc05d7c8300 state to ffffffc07cd62280 [ 7500.920449] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ffffffc05d7c8300 [ 7500.920473] [drm:drm_atomic_get_plane_state] Added [PLANE:65] ffffffc05d7c8d00 state to ffffffc07cd62280 [ 7500.920492] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ffffffc05d7c8d00 [ 7500.920518] [drm:drm_atomic_get_crtc_state] Added [CRTC:64] ffffffc07b54a400 state to ffffffc07cd62280 [ 7500.920538] [drm:drm_atomic_set_mode_for_crtc] Set [NOMODE] for CRTC state ffffffc07b54a400 [ 7500.920556] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ffffffc05d7c8200 [ 7500.920578] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:64] to ffffffc07cd62280 [ 7500.920598] [drm:drm_atomic_check_only] checking ffffffc07cd62280 [ 7500.920634] [drm:drm_atomic_commit] commiting ffffffc07cd62280 [ 7500.920678] [drm:drm_atomic_state_default_clear] Clearing atomic state ffffffc07cd62280 [ 7500.920703] [drm:drm_atomic_state_free] Freeing atomic state ffffffc07cd62280 CLOCK_RANGE报错对应的接口添加打印信息发现申请32M得到的时钟是24M drivers/gpu/drm/rockchip/rockchip_drm_vop.c-vop_crtc_mode_valid 三。修改hdmi时钟配置 查看系统时钟 [root@rk3328:~]# cat /sys/kernel/debug/clk/clk_summary 1.尝试新增hdmiphy频率到 pre_pll_cfg_table(kerneldriversphyrockchipphy-rockchip-inno-hdmi-phy.c )添加频率32M { 32000000, 32000000, 1, 64, 2, 2, 2, 12, 2, 2, 2, 0, 0}, //自行尝试 可以成功驱动屏幕 2.咨询厂商,根据RK提供的分频工具得到分频参数 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1567 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
1790 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
4465 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 16:15 , Processed in 0.593816 second(s), Total 41, Slave 34 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号