D1哪吒开发板默认输出改成HDMI
-
因为没有钱买官方的MIPI屏幕,所以只能用HDMI屏幕来玩,但是默认源码和官方提供的固件默认输出都是MIPI的虽然在线文档里有提供切换成HDMI输出的方法,但是自己真正做的时候,还是需要把默认输出改成HDMI,于是有了此贴,记录小白摸索怎么改HDMI的过程,之前在另外一位朋友的帖子下提问,现在切过来自己开一贴,以免影响人家的时间线。
另外一个朋友的帖子传送门:
请问哪吒 D1 开发板拔插 HDMI 显示器, 提示sink do not support this mode 是什么问题? 换了两台显示器了. -
根据官方在线文档的介绍,其实可以开机后命令行手动切:
cd /sys/kernel/debug/dispdbg echo disp0 > name; echo switch1 > command; echo 4 10 0 0 0x4 0x101 0 0 0 8 > param; echo 1 > start;
在线文档传送门:
D1在线文档-切换到HDMI输出 -
DTS中对于显示部分配置的注释介绍
-
# fbset mode "800x1280-62" # D: 70.004 MHz, H: 80.649 kHz, V: 61.517 Hz geometry 800 1280 800 2560 32 timings 14285 28 36 8 19 4 4 accel false rgba 8/16,8/8,8/0,8/24 endmode #
为什么我的切了之后变成了竖屏? 和屏幕有关系吗?
-
@tigger 在 D1哪吒开发板默认输出改成HDMI 中说:
# fbset mode "800x1280-62" # D: 70.004 MHz, H: 80.649 kHz, V: 61.517 Hz geometry 800 1280 800 2560 32 timings 14285 28 36 8 19 4 4 accel false rgba 8/16,8/8,8/0,8/24 endmode #
为什么我的切了之后变成了竖屏? 和屏幕有关系吗?
换华为的2K电视屏, 也是一样的问题.
-
把uboot-board.dts文件下的dev0_output_type改成4之后,默认输出倒是改成HDMI了,就是logo显示不正常,现在是一片绿色:
yida@AwExdroid89:~/workspace/d_tina_d1_open_v1.0/device/config/chips/d1/configs/nezha$ git diff . diff --git a/configs/nezha/uboot-board.dts b/configs/nezha/uboot-board.dts index 793dec2..bb5ee2b 100644 --- a/configs/nezha/uboot-board.dts +++ b/configs/nezha/uboot-board.dts @@ -229,8 +229,8 @@ screen1_output_scan = <0>; screen1_output_aspect_ratio = <8>; - dev0_output_type = <1>; - dev0_output_mode = <4>; + dev0_output_type = <4>; + dev0_output_mode = <10>; dev0_screen_id = <0>; dev0_do_hpd = <0>;
-
@nideyida 在 D1哪吒开发板默认输出改成HDMI 中说:
DTS中对于显示部分配置的注释介绍
echo 4 10 0 0 0x4 0x101 0 0 0 8 > param
请问第一个参数4是 screenx_output_type 吗?
-
查看hdmi_sink节点:
root@TinaLinux:/# cat /sys/devices/virtual/hdmi/hdmi/attr/hdmi_sink Video Mode: 640x480P 720x480P 720x480P 1080I60 480I 480I 1080P60 576P 576P 720P50 1080I50 576I 576I 1080P50 720P60 Only Support YUV420: Also Support YUV420: Pixel Format: RGB YUV444 YUV422 Deep Color: Basic Audio Support: YES Audio Code: LPCM HDCP Tpye:
-
@tigger 应该不是,但是驱动参数配置可能用的一套,所以我也这样配了,确实输出了HDMI,但是输出还没正确
-
-
This post is deleted! -
mount -t debugfs none /sys/kernel/debug; cd /sys/kernel/debug/dispdbg; echo disp0 > name; echo switch1 > command; echo 4 10 0 0 0x4 0x101 0 0 0 8 > param; echo 1 > start;
# cat /sys/devices/virtual/hdmi/hdmi/attr/hdmi_sink Video Mode: 576I 480I 1080P60(native) 1080P50 1080P24 1080P30 2160P24 2160P30 640x480P 720x480P 4096x2160P24 4096x2160P30 720P60 1080I60 2160PP25 4096x2160P25 720x480P 480I 576P 576I 1080P252160P302160P252160P244096x2160P24 Only Support YUV420: Also Support YUV420: 2160P50 2160P60 4096x2160P50 4096x2160P60 576P 720P50 1080I50 Pixel Format: RGB YUV444 YUV422 Deep Color: RGB444_30bit YUV444_30bit RGB444_36bit YUV444_36bit YUV420_36bit YUV420_48bit MaxTmdsCharRate: 120 Basic Audio Support: YES Audio Code: LPCM AC-3 DolbyDigital+ DTS DTS-HD MAT HDCP Tpye: #
# fbset mode "800x1280-62" # D: 70.004 MHz, H: 80.649 kHz, V: 61.517 Hz geometry 800 1280 800 2560 32 timings 14285 28 36 8 19 4 4 accel false rgba 8/16,8/8,8/0,8/24 endmode
车载显示器,华为2K电视机都是半屏,我做错了什么吗?
-
board.dts和uboot-board.dts你都这样改:
tina/device/config/chips/d1/configs/nezha$ git diff . diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts index bfeed6c..335895e 100755 --- a/configs/nezha/linux-5.4/board.dts +++ b/configs/nezha/linux-5.4/board.dts @@ -1128,25 +1128,25 @@ chn_cfg_mode : Hardware DE channel allocation config. 0:single display with disp_init_enable = <1>; disp_mode = <0>; - screen0_output_type = <1>; - screen0_output_mode = <4>; - - screen1_output_type = <4>; - screen1_output_mode = <10>; - - screen1_output_format = <0>; - screen1_output_bits = <0>; - screen1_output_eotf = <4>; - screen1_output_cs = <257>; - screen1_output_dvi_hdmi = <2>; - screen1_output_range = <2>; - screen1_output_scan = <0>; - screen1_output_aspect_ratio = <8>; - - dev0_output_type = <1>; - dev0_output_mode = <4>; + screen0_output_type = <3>; + screen0_output_mode = <10>; + + screen0_output_format = <0>; + screen0_output_bits = <0>; + screen0_output_eotf = <4>; + screen0_output_cs = <257>; + screen0_output_dvi_hdmi = <2>; + screen0_output_range = <2>; + screen0_output_scan = <0>; + screen0_output_aspect_ratio = <8>; + + screen1_output_type = <1>; + screen1_output_mode = <4>; + + dev0_output_type = <4>; + dev0_output_mode = <10>; dev0_screen_id = <0>;
-
@xiaowenge 在 D1哪吒开发板默认输出改成HDMI 中说:
board.dts和uboot-board.dts你都这样改:
tina/device/config/chips/d1/configs/nezha$ git diff . diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts index bfeed6c..335895e 100755 --- a/configs/nezha/linux-5.4/board.dts +++ b/configs/nezha/linux-5.4/board.dts @@ -1128,25 +1128,25 @@ chn_cfg_mode : Hardware DE channel allocation config. 0:single display with disp_init_enable = <1>; disp_mode = <0>; - screen0_output_type = <1>; - screen0_output_mode = <4>; - - screen1_output_type = <3>; - screen1_output_mode = <10>; - - screen1_output_format = <0>; - screen1_output_bits = <0>; - screen1_output_eotf = <4>; - screen1_output_cs = <257>; - screen1_output_dvi_hdmi = <2>; - screen1_output_range = <2>; - screen1_output_scan = <0>; - screen1_output_aspect_ratio = <8>; - - dev0_output_type = <1>; - dev0_output_mode = <4>; + screen0_output_type = <3>; + screen0_output_mode = <10>; + + screen0_output_format = <0>; + screen0_output_bits = <0>; + screen0_output_eotf = <4>; + screen0_output_cs = <257>; + screen0_output_dvi_hdmi = <2>; + screen0_output_range = <2>; + screen0_output_scan = <0>; + screen0_output_aspect_ratio = <8>; + + screen1_output_type = <1>; + screen1_output_mode = <4>; + + dev0_output_type = <4>; + dev0_output_mode = <10>; dev0_screen_id = <0>;
哇,确实可以了!感谢大佬!
这么改完开机logo默认就从我插着的HDMI显示器输出了
但是好像还有一点问题,就是我cat colorbar的时候,颜色不太对,有点绿,好像是跟我一开始那个ev0_output_type改成4之后打印的绿色重合了,才有了这个效果:
-
我先用在线文档介绍的方法切到HDMI输出:
cd /sys/kernel/debug/dispdbg echo disp0 > name; echo switch1 > command; echo 4 10 0 0 0x4 0x101 0 0 0 8 > param; echo 1 > start;
再cat colorbar,就不绿了,说明不是硬件或者显示器的问题,应该是我配置的问题
echo 1 > /sys/class/disp/disp/attr/colorbar
-
@nideyida 在 D1哪吒开发板默认输出改成HDMI 中说:
我先用在线文档介绍的方法切到HDMI输出:
cd /sys/kernel/debug/dispdbg echo disp0 > name; echo switch1 > command; echo 4 10 0 0 0x4 0x101 0 0 0 8 > param; echo 1 > start;
再cat colorbar,就不绿了,说明不是硬件或者显示器的问题,应该是我配置的问题
echo 1 > /sys/class/disp/disp/attr/colorbar
实测播放视频没绿。。。。就cat colorbar就绿,这就很尴尬了。。。
-
@xiaowenge 在 D1哪吒开发板默认输出改成HDMI 中说:
board.dts和uboot-board.dts你都这样改:
tina/device/config/chips/d1/configs/nezha$ git diff . diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts index bfeed6c..335895e 100755 --- a/configs/nezha/linux-5.4/board.dts +++ b/configs/nezha/linux-5.4/board.dts @@ -1128,25 +1128,25 @@ chn_cfg_mode : Hardware DE channel allocation config. 0:single display with disp_init_enable = <1>; disp_mode = <0>; - screen0_output_type = <1>; - screen0_output_mode = <4>; - - screen1_output_type = <3>; - screen1_output_mode = <10>; - - screen1_output_format = <0>; - screen1_output_bits = <0>; - screen1_output_eotf = <4>; - screen1_output_cs = <257>; - screen1_output_dvi_hdmi = <2>; - screen1_output_range = <2>; - screen1_output_scan = <0>; - screen1_output_aspect_ratio = <8>; - - dev0_output_type = <1>; - dev0_output_mode = <4>; + screen0_output_type = <3>; + screen0_output_mode = <10>; + + screen0_output_format = <0>; + screen0_output_bits = <0>; + screen0_output_eotf = <4>; + screen0_output_cs = <257>; + screen0_output_dvi_hdmi = <2>; + screen0_output_range = <2>; + screen0_output_scan = <0>; + screen0_output_aspect_ratio = <8>; + + screen1_output_type = <1>; + screen1_output_mode = <4>; + + dev0_output_type = <4>; + dev0_output_mode = <10>; dev0_screen_id = <0>;
[ 2.469165] Loading compiled-in X.509 certificates [ 2.476746] HDMI 2.0 driver init start! [ 2.481047] boot_hdmi=true [ 2.484190] ERROR: pinctrl_get for HDMI2.0 DDC fail [ 2.491137] HDMI2.0 module init end [ 2.495100] [DISP] disp_device_attached,line:158: [ 2.495107] attached ok, mgr1<-->device0, type=4 [ 2.521233] [HDMI receive params]: tv mode: 0xa format:0x1 data bits:0x0 eotf:0x4 cs:0x101 dvi_hdmi:2 range:0 scan:0 aspect_ratio:8 [ 2.537187] [DISP] disp_hdmi_set_mode,line:680: [ 2.537191] hdmi_set_mode is null! [ 2.546131] disp_al_manager_apply ouput_type:0 [ 2.551697] random: fast init done [ 2.580483] random: crng init done
插着HDMI启动, 串口就挂了,不能输入.
[ 2.440078] Loading compiled-in X.509 certificates [ 2.447650] HDMI 2.0 driver init start! [ 2.452027] boot_hdmi=false [ 2.455200] ERROR: pinctrl_get for HDMI2.0 DDC fail [ 2.462154] HDMI2.0 module init end [ 2.471232] [DISP] bsp_disp_sync_with_hw,line:657: [ 2.471239] Can't find device(207) for manager 1 [ 2.496434] twi twi2: twi2 supply twi not found, using dummy regulator [ 2.511058] pcf857x 2-0038: probed [ 2.515014] sunxi_i2c_probe()2262 - [i2c2] probe success [ 2.525108] debugfs: Directory '2031000.dmic' with parent 'snddmic' already present! [ 2.535266] sunxi-audio-card 2031060.sounddmic: dmic-hifi <-> 2031000.dmic mapping ok [ 2.545368] debugfs: Directory '2034000.daudio' with parent 'sndhdmi' already present! [ 2.555971] sunxi-audio-card 20340a0.sounddaudio2: 20340a4.hdmiaudio <-> 2034000.daudio mapping ok [ 2.567240] get ehci0-controller wakeup-source is fail. [ 2.573225] sunxi ehci0-controller don't init wakeup source [ 2.579446] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe0008fbb58, 0x:ffffffd004f88000, irq_no:2e [ 2.592978] [sunxi-ehci0]: Not init ehci0 [ 2.597890] get ohci0-controller wakeup-source is fail. [ 2.603869] sunxi ohci0-controller don't init wakeup source [ 2.610089] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe0008fc698 [ 2.620519] [sunxi-ohci0]: Not init ohci0 [ 2.627166] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.638031] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.645634] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.655322] clk: Not disabling unused clocks [ 2.660091] ALSA device list: [ 2.663517] cfg80211: failed to load regulatory.db [ 2.668933] #0: audiocodec [ 2.672217] #1: snddmic [ 2.675137] #2: sndhdmi
不插HDMI,串口就正常.
-
有朋友提到用我以上的修改还是会绿屏(满屏绿那种),我回忆了一下修改点,我之前是改掉了原SDK自带那个哪吒的启动logo,改成了linux小企鹅,大家可以把tina/device/config/chips/d1/configs/nezha/config 下面的bootlogo.bmp文件替换成下面这个文件试试:
bootlogo.7z
(文件是小企鹅启动logo)
(之前改掉启动logo是因为哪吒那张图3M多太大了,我不是故意改掉不告诉你们的。。。。) -
@xiaowenge 赞,搭顺风车问下,这个企鹅是240320的黑底的照片,背景也是黑色的,这种显示比较好,如果我是白底的400400这种的,背景颜色应该怎么设置呢
-
@tianmao 在 D1哪吒开发板默认输出改成HDMI 中说:
@xiaowenge 赞,搭顺风车问下,这个企鹅是240320的黑底的照片,背景也是黑色的,这种显示比较好,如果我是白底的400400这种的,背景颜色应该怎么设置呢
看了下配置文件注释,好像没有配置背景颜色这么一说(当然也可能是有但是配置文件没有更新,具体要读一下驱动源码)
如果不是黑底的话,应该是P一整张适配整个屏幕大小的开机log吧,这样才不会有色差
-
@xiaowenge 替换了还不行,可以帮忙试下拉v1.01的新codebase然后试下你的修改吗?
-
@cloud_d1 知道了,你们的uboot没更新,因为单独make编译的时候默认是不编译ubootd的。
做这一步://进入uboot代码路径 cboot //单独编译uboot,编完uboot文件会自动复制到方案下,不用管它 muboot //重新编译打包 make -j64 pack
-
@xiaowenge 在 D1哪吒开发板默认输出改成HDMI 中说:
@cloud_d1 知道了,你们的uboot没更新,因为单独make编译的时候默认是不编译ubootd的。
做这一步://进入uboot代码路径 cboot //单独编译uboot,编完uboot文件会自动复制到方案下,不用管它 muboot //重新编译打包 make -j64 pack
附完整dts文件修改,之前的有个***dev0_do_hpd = <1>;***的参数没改到:
tina/device/config/chips/d1/configs/nezha$ git diff . diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts index bfeed6c..1cef004 100755 --- a/configs/nezha/linux-5.4/board.dts +++ b/configs/nezha/linux-5.4/board.dts @@ -1128,30 +1128,25 @@ chn_cfg_mode : Hardware DE channel allocation config. 0:single display with disp_init_enable = <1>; disp_mode = <0>; - screen0_output_type = <1>; - screen0_output_mode = <4>; - - screen1_output_type = <3>; - screen1_output_mode = <10>; - - screen1_output_format = <0>; - screen1_output_bits = <0>; - screen1_output_eotf = <4>; - screen1_output_cs = <257>; - screen1_output_dvi_hdmi = <2>; - screen1_output_range = <2>; - screen1_output_scan = <0>; - screen1_output_aspect_ratio = <8>; - - dev0_output_type = <1>; - dev0_output_mode = <4>; + screen0_output_type = <3>; + screen0_output_mode = <10>; + + screen0_output_format = <0>; + screen0_output_bits = <0>; + screen0_output_eotf = <4>; + screen0_output_cs = <257>; + screen0_output_dvi_hdmi = <2>; + screen0_output_range = <2>; + screen0_output_scan = <0>; + screen0_output_aspect_ratio = <8>; + + screen1_output_type = <1>; + screen1_output_mode = <4>; + + dev0_output_type = <4>; + dev0_output_mode = <10>; dev0_screen_id = <0>; - dev0_do_hpd = <0>; - - dev1_output_type = <4>; - dev1_output_mode = <10>; - dev1_screen_id = <1>; - dev1_do_hpd = <1>; + dev0_do_hpd = <1>; def_output_dev = <0>; hdmi_mode_check = <1>; diff --git a/configs/nezha/uboot-board.dts b/configs/nezha/uboot-board.dts old mode 100644 new mode 100755 index 793dec2..a5c99a2 --- a/configs/nezha/uboot-board.dts +++ b/configs/nezha/uboot-board.dts @@ -214,30 +214,25 @@ disp_init_enable = <1>; disp_mode = <0>; - screen0_output_type = <1>; - screen0_output_mode = <4>; - - screen1_output_type = <3>; - screen1_output_mode = <10>; - - screen1_output_format = <0>; - screen1_output_bits = <0>; - screen1_output_eotf = <4>; - screen1_output_cs = <257>; - screen1_output_dvi_hdmi = <2>; - screen1_output_range = <2>; - screen1_output_scan = <0>; - screen1_output_aspect_ratio = <8>; - - dev0_output_type = <1>; - dev0_output_mode = <4>; + screen0_output_type = <3>; + screen0_output_mode = <10>; + + screen0_output_format = <0>; + screen0_output_bits = <0>; + screen0_output_eotf = <4>; + screen0_output_cs = <257>; + screen0_output_dvi_hdmi = <2>; + screen0_output_range = <2>; + screen0_output_scan = <0>; + screen0_output_aspect_ratio = <8>; + + screen1_output_type = <1>; + screen1_output_mode = <4>; + + dev0_output_type = <4>; + dev0_output_mode = <10>; dev0_screen_id = <0>; - dev0_do_hpd = <0>; - - dev1_output_type = <4>; - dev1_output_mode = <10>; - dev1_screen_id = <1>; - dev1_do_hpd = <1>; + dev0_do_hpd = <1>; def_output_dev = <0>; hdmi_mode_check = <1>;
-
https://bbs.aw-ol.com/topic/297/hdmi/2
【固件发布】D1哪吒HDMI测试固件20210804(开机HDMI就有小企鹅启动logo)我按步骤搞定了, 有修改过的文件包下载,欢迎各位小伙伴测试。
-
围观了一下修改, 就是把 screen1 配置改成 screen0, 这样默认就是 HDMI 输出了。
-
@xiaowenge 你好,我也在改hdmi,修改了uboot-board.dts后就来到lichee/brandy-2.0/u-boot-2018单独编译uboot
请问不是直接输入这两天命令吗? -
@lumen 先在根目录
source build/envsetup.sh
然后lunch
才能用这两个命令 -
@yuzukitsuru 谢谢谢谢
-
@yuzukitsuru 在cboot和muboot之前还要make clean吗?
-
@lumen 在 D1哪吒开发板默认输出改成HDMI 中说:
@yuzukitsuru 在cboot和muboot之前还要make clean吗?
理论上不需要clean,cleane一下也行,不影响,会保险一点,只不过重新编译要比较久。
-
@xiaowenge 请问设备树文件中dev0_screen_id代表什么?我按照你的修改之后,HDMI能够成功显示。如下,(我只需要720p所以mode改成了4):
但我之前改的时候把dev0_screen_id改成了1,我理解的是这样dev0就对应了screen1,就同时修改了screen1的相关参数,具体如下:
但并未正常显示 。
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号