4k HDMI output


Recommended Posts

Posted (edited)

Hi everyone,

 

I'm trying to get 4k output from my NanoPi M4.

I have tried (using a Steamlink HDMI cable) directly connected to my TV (to eliminate my receiver as a point of failure/bugs) to get something to output to the screen in 4k.

 

I haven't succeeded.

What information I've gathered so far:

There are two "vops" a big and little, and the little one is not designed to, and cannot output 4k (there was a patch hacking that into vopl but I never dared test it and can't find it now).

There was this change setting the maximum resolution to 4k in a file/subdirectory I cannot find in recent kernels anymore: https://patchwork.ozlabs.org/project/uboot/patch/20200402114125.2501-6-jagan@amarulasolutions.com/

Any LibreElec/Kodi build (Joern-P, @Kwiboo, @balbes150, @@lex) didn't seem to give me any 4K output options, on kernel 4.4 or 5.x.

 

The EDID returned from my TV contains the 4k modes (but seems to not be able to handle them correctly):

Section "Monitor"
        Identifier "LG TV"
        ModelName "LG TV"
        VendorName "GSM"
        # Monitor Manufactured week 1 of 2015
        # EDID version 1.3
        # Digital Display
        DisplaySize 1600 900
        Gamma 2.20
        Option "DPMS" "false"
        Horizsync 30-83
        VertRefresh 58-62
        # Maximum pixel clock is 160MHz
        #Not giving standard mode: 640x480, 60Hz
        #Not giving standard mode: 800x600, 60Hz
        #Not giving standard mode: 1024x768, 60Hz
        #Not giving standard mode: 1152x864, 60Hz
        #Not giving standard mode: 1280x1024, 60Hz

        #Extension block found. Parsing...
#WARNING: I may have missed a mode (CEA mode 93)
#WARNING: I may have missed a mode (CEA mode 94)
#WARNING: I may have missed a mode (CEA mode 95)
#WARNING: I may have missed a mode (CEA mode 98)
#WARNING: I may have missed a mode (CEA mode 99)
#WARNING: I may have missed a mode (CEA mode 100)
        Modeline        "Mode 16" 74.25 1920 2008 2052 2200 540 542 547 562 +hsync +vsync interlace
        Modeline        "Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
        Modeline        "Mode 1" 85.50 1360 1424 1536 1792 768 771 777 795 +hsync +vsync 
        Modeline        "Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 3" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
        Modeline        "Mode 5" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
        Modeline        "Mode 6" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
        Modeline        "Mode 7" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
        Modeline        "Mode 8" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 9" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 10" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 11" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 12" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 13" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 14" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
        Modeline        "Mode 15" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
        Modeline        "Mode 17" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync 
        Option "PreferredMode" "Mode 16"
EndSection

CEA mode 93-95 and 98-100 are all 4k output modes, see the table listing them on Wikipedia.

 

My question is then, what am I missing and how do I get 4k output from my NanoPi M4?

 

Thanks for any input!

Edited by rubenvb
Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

I have some work-in-progress patches at https://github.com/Kwiboo/linux-rockchip/compare/next-20200501...next-20200501-drm-rockchip that should enable up to 4k30hz hdmi modes on rk3399.

 

My focus switched to rkvdec so these patches have been on hold for some time, they need to be synced with some of my older rk3328 patches for 420-mode support before they can be sent upstream. With 10-bit decoding now working I am expecting readying 4k/10-bit hdmi patches to be more fun :-)

Link to post
Share on other sites

I do get 4K 60Hz output via HDMI on NanoPC T4 but only with Android. I haven't tried with NanoPi M4 but it is supported and should work with NanoPi M4 too. Displayport over USB-C also works on the T4, although again only with Android. In the hope it will be useful, I have extracted the device tree Android is using on NanoPC T4. Android Kernel version is "Linux localhost 4.4.126 #2 SMP PREEMPT Fri Mar 15 15:47:49 CST 2019 aarch64".

nanopc-t4-dts

Link to post
Share on other sites
On 5/25/2020 at 9:46 PM, Kwiboo said:

I have some work-in-progress patches at https://github.com/Kwiboo/linux-rockchip/compare/next-20200501...next-20200501-drm-rockchip that should enable up to 4k30hz hdmi modes on rk3399.

 

My focus switched to rkvdec so these patches have been on hold for some time, they need to be synced with some of my older rk3328 patches for 420-mode support before they can be sent upstream. With 10-bit decoding now working I am expecting readying 4k/10-bit hdmi patches to be more fun :-)

 

Hi, it's truly amazing work!
I wonder if there are newer commits on top of those for the rk3399? I've been trying for the past couple of days to get QHD or 4k30 without much success so far.

Link to post
Share on other sites

Is there any thread of feature requests specific for RK3399? Or should I go to feature requests forum?
Connecting 1920*1200 display to rockpro64 by hdmi->dvi cable and can't get native resolution by any way. Seems like EDID is not read and kernel config DRM_LOAD_EDID_FIRMWARE is not set.
This board is my only PC for now, is it possible to enable this kernel option in armbian images?

Link to post
Share on other sites
2 hours ago, andrw said:

Is there any thread of feature requests specific for RK3399? Or should I go to feature requests forum?
Connecting 1920*1200 display to rockpro64 by hdmi->dvi cable and can't get native resolution by any way. Seems like EDID is not read and kernel config DRM_LOAD_EDID_FIRMWARE is not set.
This board is my only PC for now, is it possible to enable this kernel option in armbian images?

OMG I think you just identified what's been driving me crazy

 

4k works on Allwinner but hadn't been with Amlogic or rockchip

 

lane@billroyall:~/GIT/build/config$ fgrep DRM_LOAD_EDID_FIRMWARE kernel/*
kernel/linux-imx6-current.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-imx7d-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-meson64-current.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-meson64-dev.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-meson64-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-meson-current.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-meson-dev.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-meson-legacy.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-mt7623-dev.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-mt7623-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-odroidc4-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-odroidxu4-current.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-odroidxu4-dev.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-odroidxu4-legacy.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-rk322x-current.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rk322x-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rk3399-legacy.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-rockchip64-current.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rockchip64-dev.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rockchip64-legacy.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-rockchip-current.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rockchip-dev.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rockchip-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rockpis-dev.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-rockpis-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-s5p6818-legacy.config:# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
kernel/linux-sunxi64-current.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-sunxi64-dev.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-sunxi64-legacy.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-sunxi-current.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-sunxi-dev.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y
kernel/linux-sunxi-legacy.config:CONFIG_DRM_LOAD_EDID_FIRMWARE=y

 

Link to post
Share on other sites
3 hours ago, andrw said:

Is there any thread of feature requests specific for RK3399? Or should I go to feature requests forum?
Connecting 1920*1200 display to rockpro64 by hdmi->dvi cable and can't get native resolution by any way. Seems like EDID is not read and kernel config DRM_LOAD_EDID_FIRMWARE is not set.
This board is my only PC for now, is it possible to enable this kernel option in armbian images?

 

Thank you.. ticket created

https://armbian.atlassian.net/browse/AR-354

Link to post
Share on other sites
1 hour ago, lanefu said:

 

Thank you.. ticket created

https://armbian.atlassian.net/browse/AR-354

 

Thank you!

 

It drives me crazy as well -- I use Linux for years, but this brings me to most ancient times when you play with video modeline and the proper place to store it and the proper software versions to use it, ... (:

 

That Jira tells my email "doesn't have access to Jira on armbian.atlassian.net", so writing here: it may be necessary to generate EDID binaries set as well (in addition to enabling kernel parameter).

 

I googled this recipe for cases when video cable / adapter blocks EDID info and there is no way (?) to force resolution -- armbian kernel tells it doesn't know "edid_firmware" parameter and editing /boot/armbianEnv.txt is not the case (?).

 

Checking /proc/config.gz confirms that edid_firmware parameter shouldn't work for this kernel.

Link to post
Share on other sites
Just now, lanefu said:

well I tried DRM_LOAD_EDID_FIRMWARE.    against Armbian-current w/ Amlogic on n2.. no change

 

tried it on RK3399 (Opi4) against Armbian-dev 5.7.y no change

 

Did you just rebuild kernel? It's also necessary to specify kernel commandline parameter with proper EDID binary. Like this: drm_kms_helper.edid_firmware=edid/your_edid.bin

Link to post
Share on other sites

So I made some progress

 

[drm] Got external EDID base block and 1 extension from "edid/edid.bin" for connector "HDMI-A-1"

but xrandr doesn't see that port "HDMI-A-1"  as an output. 

FYI

drm_kms_helper.edid_firmware=edid/your_edid.bin is deprecated in favor of

 

drm.edid_firmware=edid/your_edid.bin

Link to post
Share on other sites

Thank you, I missed the deprecation.

 

Regarding interface names, kernel should expose them somewhere in /sys, I guess (or /proc maybe). It might be worth to check what appear there and what are the names. For other cases name might be changed by udev rules, but I'm not sure it's applicable to video.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...