How to drive non-standard resolution HDMI displays
-
Users may have various resolutions of displays on their hands, some of which are not included in the xf86EdidModes support list. In this case, the software needs to do some processing to support this type of display. The specific steps are as follows:
- Obtaining device's edid information
cat /sys/class/drm/card0-HDMI*/edid > /home/coolpi/share/edid.bin
- Parsing EDID to obtain timings for various resolutions
coolpi@Ubuntu:~/share$ sudo apt-get install read-edid edid-decode coolpi@Ubuntu:~/share$ parse-edid < edid.bin Checksum Correct Section "Monitor" Identifier "HDMI" ModelName "HDMI" VendorName "ICB" # Monitor Manufactured week 50 of 2017 # EDID version 1.3 # Digital Display DisplaySize 1200 340 Gamma 2.20 Option "DPMS" "true" Horizsync 30-180 VertRefresh 48-120 # Maximum pixel clock is 600MHz #Not giving standard mode: 1152x864, 75Hz #Not giving standard mode: 1280x800, 60Hz #Not giving standard mode: 1280x720, 60Hz #Not giving standard mode: 1280x1024, 60Hz #Not giving standard mode: 1440x900, 60Hz #Not giving standard mode: 1600x900, 60Hz #Not giving standard mode: 1680x1050, 60Hz #Extension block found. Parsing... #WARNING: I may have missed a mode (CEA mode 97) #DOUBLE WARNING: It's your first mode, too, so this may actually be important. #WARNING: I may have missed a mode (CEA mode 96) #DOUBLE WARNING: It's your first mode, too, so this may actually be important. #WARNING: I may have missed a mode (CEA mode 90) #DOUBLE WARNING: It's your first mode, too, so this may actually be important. #WARNING: I may have missed a mode (CEA mode 95) Modeline "Mode 11" 297.00 1920 1968 2000 2200 2160 2163 2168 2250 +hsync +vsync Modeline "Mode 0" 282.89 3840 3888 3920 4100 1100 1103 1108 1150 +hsync -vsync Modeline "Mode 1" 540.00 3840 3888 3952 4000 1080 1083 1093 1125 +hsync -vsync Modeline "Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 3" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace Modeline "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync Modeline "Mode 5" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync Modeline "Mode 6" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync Modeline "Mode 7" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync Modeline "Mode 8" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync Modeline "Mode 9" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync Modeline "Mode 10" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync Modeline "Mode 12" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync +vsync Option "PreferredMode" "Mode 11" EndSection
- Increase special resolution timming to DRM_ dmt_ Modes List
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 4fdfb41b91e1..132dd01f28c9 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -575,6 +575,10 @@ static const struct drm_display_mode drm_dmt_modes[] = { { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 556188, 4096, 4104, 4136, 4176, 0, 2160, 2208, 2216, 2222, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, + /* 0x59 - 3840x1100@59.998Hz RB */ + { DRM_MODE("3840x1100", DRM_MODE_TYPE_DRIVER, 282890, 3840, 3888, + 3920, 4100, 0, 1100, 1103, 1108, 1150, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, };
- Modify HDMI clock division method
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts b/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts index 9eee8a7133f0..41155fcfb4fe 100755 --- a/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-cpcm5-evb-v11.dts @@ -1308,6 +1308,16 @@ &uart2 { &display_subsystem { memory-region = <&drm_logo>; memory-region-names = "drm-logo"; + clocks = <&hdptxphy_hdmi_clk0>, <&hdptxphy_hdmi_clk1>; + clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll"; +}; + +&hdptxphy_hdmi_clk0 { +status = "okay"; +}; + +&hdptxphy_hdmi_clk1 { +status = "okay"; }; &rng {
- Recompile and replace the kernel, reboot
-
嘿嘿
-
@george Add 5.5inch HDMI AMOLED edid
https://www.waveshare.net/shop/5.5inch-HDMI-AMOLED.htm
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 4fdfb41b91e1..b1171d8cbf2d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -575,6 +575,14 @@ static const struct drm_display_mode drm_dmt_modes[] = { { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 556188, 4096, 4104, 4136, 4176, 0, 2160, 2208, 2216, 2222, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, + /* 0x59 - 3840x1100@59.998Hz RB */ + { DRM_MODE("3840x1100", DRM_MODE_TYPE_DRIVER, 282890, 3840, 3888, + 3920, 4100, 0, 1100, 1103, 1108, 1150, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, + /* 0x60 - 1080x1920@60Hz RB */ + { DRM_MODE("1080x1920", DRM_MODE_TYPE_DRIVER, 137520, 1080, 1112, + 1144, 1200, 0, 1920, 1928, 1932, 1936, 0, + DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, };