Created attachment 145751 [details] xrandr shows available resolustions We have a desktop equipped with i7-8700. Its onboard HDMI port cannot support up to resolution 3840*2160 on Linux (mainline kernel 5.4-rc3+). But Windows supports (must do Windows update to latest which includes the graphic driver). The graphic information 00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Desktop) [8086:3e92] (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] UHD Graphics 630 (Desktop) [1025:124e] Flags: bus master, fast devsel, latency 0, IRQ 138 Memory at a1000000 (64-bit, non-prefetchable) [size=16M] Memory at 90000000 (64-bit, prefetchable) [size=256M] I/O ports at 5000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: [40] Vendor Specific Information: Len=0c <?> Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [d0] Power Management version 2 Capabilities: [100] Process Address Space ID (PASID) Capabilities: [200] Address Translation Service (ATS) Capabilities: [300] Page Request Interface (PRI) Kernel driver in use: i915 Kernel modules: i915 We also check the onboard display port. Display port can support up to resolution 3840*2160 on Linux.
Created attachment 145752 [details] dmesg with DRM debug I appended drm.debug=0xe to boot command to enable DRM debug. [ 1.863260] [drm:drm_dp_dual_mode_detect [drm_kms_helper]] DP dual mode HDMI ID: DP-HDMI ADAPTOR\004 (err 0) [ 1.864262] [drm:drm_dp_dual_mode_detect [drm_kms_helper]] DP dual mode adaptor ID: ff (err 0) [ 1.864287] [drm:intel_hdmi_set_edid [i915]] DP dual mode adaptor (type 1 HDMI) detected (max TMDS clock: 165000 kHz) [ 1.864294] [drm:drm_detect_monitor_audio [drm]] Monitor has basic audio support [ 1.864297] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:86:HDMI-A-1] status updated from unknown to connected [ 1.864306] [drm:drm_add_display_info [drm]] non_desktop set to 0 [ 1.864312] [drm:drm_add_display_info [drm]] HDMI: DVI dual 0, max TMDS clock 600000 kHz [ 1.864317] [drm:drm_add_display_info [drm]] HF-VSDB: max TMDS clock 600000 kHz [ 1.864332] [drm:drm_add_edid_modes [drm]] ELD monitor ASUS VP28U [ 1.864338] [drm:drm_add_edid_modes [drm]] HDMI: latency present 0 0, video latency 0 1, audio latency 96 2 [ 1.864344] [drm:drm_add_edid_modes [drm]] ELD size 36, SAD count 1 [ 1.864349] [drm:drm_add_display_info [drm]] non_desktop set to 0 [ 1.864355] [drm:drm_add_display_info [drm]] HDMI: DVI dual 0, max TMDS clock 600000 kHz [ 1.864361] [drm:drm_add_display_info [drm]] HF-VSDB: max TMDS clock 600000 kHz [ 1.864624] [drm:drm_mode_debug_printmodeline [drm]] Modeline "3840x2160": 60 594000 3840 4016 4104 4400 2160 2168 2178 2250 0x48 0x5 [ 1.864629] [drm:drm_mode_prune_invalid [drm]] Not using 3840x2160 mode: CLOCK_HIGH [ 1.864635] [drm:drm_mode_debug_printmodeline [drm]] Modeline "3840x2160": 30 297000 3840 4016 4104 4400 2160 2168 2178 2250 0x40 0x9 [ 1.864640] [drm:drm_mode_prune_invalid [drm]] Not using 3840x2160 mode: CLOCK_HIGH It shows it is type 1 HDMI adapter with max TMDS clock: 165000 kHz which is lower than the expectation of 3840x2160. Although, the connected monitor ASUS VP28U supports max TMDS clock 600000 kHz.
Created attachment 145753 [details] dmesg with removed type 1 HDMI's max TMDS clock upper bound If I remove the type 1 HDMI clock's upper bound like the diff based on latest mainline kernel, than we can have 4K on this desktop: diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/drm_dp_dual_mode_helper.c index 1c9ea9f7fdaf..da30f4cfb01e 100644 --- a/drivers/gpu/drm/drm_dp_dual_mode_helper.c +++ b/drivers/gpu/drm/drm_dp_dual_mode_helper.c @@ -277,12 +277,12 @@ int drm_dp_dual_mode_max_tmds_clock(enum drm_dp_dual_mode_type type, * Type 1 adaptors are limited to 165MHz * Type 2 adaptors can tells us their limit */ - if (type < DRM_DP_DUAL_MODE_TYPE2_DVI) + if (type < DRM_DP_DUAL_MODE_TYPE1_DVI) return 165000; ret = drm_dp_dual_mode_read(adapter, DP_DUAL_MODE_MAX_TMDS_CLOCK, &max_tmds_clock, sizeof(max_tmds_clock)); - if (ret || max_tmds_clock == 0x00 || max_tmds_clock == 0xff) { + if (ret || max_tmds_clock == 0x00) { DRM_DEBUG_KMS("Failed to query max TMDS clock\n"); return 165000; } The type 1 HDMI's max TMDS clock becomes 637500 kHz, which is higher than the expectation of 3840x2160. [ 3.951002] [drm:drm_dp_dual_mode_detect [drm_kms_helper]] DP dual mode HDMI ID: DP-HDMI ADAPTOR\004 (err 0) [ 3.951966] [drm:drm_dp_dual_mode_detect [drm_kms_helper]] DP dual mode adaptor ID: ff (err 0) [ 3.952970] [drm:intel_hdmi_set_edid [i915]] DP dual mode adaptor (type 1 HDMI) detected (max TMDS clock: 637500 kHz)
Created attachment 145754 [details] xrandr of Comment 2 Xrandr shows the resolution up to 3840x2160 with Comment 2
Created attachment 145756 [details] script to dump the dual mode adapter registers Pleas install i2c-tools and run this like so: dual_mode_dump HDMI-A-1 so that we can see the raw adapter registers. Also please attach a dump of /sys/kernel/debug/dri/0/i915_vbt
Created attachment 145759 [details] dump of /sys/kernel/debug/dri/0/i915_vbt (In reply to Ville Syrjala from comment #4) > Created attachment 145756 [details] > script to dump the dual mode adapter registers > > Pleas install i2c-tools and run this like so: > dual_mode_dump HDMI-A-1 > > so that we can see the raw adapter registers. Tnaks for your reply! Here is the dual_mode_dump of HDMI-A-1 Probing /sys/class/drm/card0-HDMI-A-1/i2c-1 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-1, address 0x40, mode i2c block Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 44 50 2d 48 44 4d 49 20 41 44 41 50 54 4f 52 04 DP-HDMI ADAPTOR? 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > Also please attach a dump of > /sys/kernel/debug/dri/0/i915_vbt The dump is as the attachment.
(In reply to jian-hong from comment #5) > > Also please attach a dump of > > /sys/kernel/debug/dri/0/i915_vbt > > The dump is as the attachment. Sadly I don't see anything obvious we could use as a hint to ignore the dual mode adapter's limit. I was hoping the VBT would declare the port as an internal HDMI port (which it does) *and* it would declare a TMDS clock limit >165MHz (which sadly it does not) :( Well, it does say the limit is 0 ie. "platform max" but that's not a very strong hint to indicate that someone actually tested the thing with a >165MHz clock. Could be just they were too lazy to put in any real number and so left it at 0. So I'm not keen on including that as a valid value in such a heuristic. Feels like that could backfire on us.
After contact the Acer desktop's ODM, they said the onboard HDMI port is HDMI 1.4. According to Table 4-1 Relation of the Cable category and the Supported functions (except Type B) of High-Definition Multimedia Interface Specification Version 1.4 [1], the maximum TMDS clock frequency can go up to 340MHz, if it is Category 2 cable. Wikipedia also arranges the HDMI versions comparison - Main specifications [2]. HDMI Version's Max. TMDS Character Rate 1.0–1.2a 165 MHz 1.3–1.3a 340 MHz 1.4–1.4b 340 MHz 2.0–2.0b 600 MHz Maybe we can find some place to know the HDMI's subversion in somewhere/registers? [1] http://bfiles.chinaaet.com/whpt/blog/20170919/1000008562-6364143185282736974850538.pdf [2] https://en.wikipedia.org/wiki/HDMI#Main_specifications
Created attachment 145832 [details] [review] Debug diff for getting child_device_config->device_type Traced the kernel code with the debug message as the attachment. I learned device_type [1] of struct child_device_config in drivers/gpu/drm/i915/display/intel_vbt_defs.h holds the capability of the adapter. Here are device_type bits' meaning [2]: #define DEVICE_TYPE_CLASS_EXTENSION (1 << 15) #define DEVICE_TYPE_POWER_MANAGEMENT (1 << 14) #define DEVICE_TYPE_HOTPLUG_SIGNALING (1 << 13) #define DEVICE_TYPE_INTERNAL_CONNECTOR (1 << 12) #define DEVICE_TYPE_NOT_HDMI_OUTPUT (1 << 11) #define DEVICE_TYPE_MIPI_OUTPUT (1 << 10) #define DEVICE_TYPE_COMPOSITE_OUTPUT (1 << 9) #define DEVICE_TYPE_DUAL_CHANNEL (1 << 8) #define DEVICE_TYPE_HIGH_SPEED_LINK (1 << 6) #define DEVICE_TYPE_LVDS_SIGNALING (1 << 5) #define DEVICE_TYPE_TMDS_DVI_SIGNALING (1 << 4) #define DEVICE_TYPE_VIDEO_SIGNALING (1 << 3) #define DEVICE_TYPE_DISPLAYPORT_OUTPUT (1 << 2) #define DEVICE_TYPE_DIGITAL_OUTPUT (1 << 1) #define DEVICE_TYPE_ANALOG_OUTPUT (1 << 0) According to the dmesg: Oct 28 14:16:10 endless kernel: [drm:intel_hdmi_set_edid] intel_hdmi_dp_dual_mode_detect: original type 1 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] intel_bios_is_port_dp_dual_mode: checking 0/4 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: port=3 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: 0x1806 & 0x163f, 0x60d6 & 0x163f Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] intel_bios_is_port_dp_dual_mode: checking 1/4 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: port=3 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: 0x60d2 & 0x163f, 0x60d6 & 0x163f Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] intel_bios_is_port_dp_dual_mode: checking 2/4 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: port=3 Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: 0x60d6 & 0x163f, 0x60d6 & 0x163f Oct 28 14:16:10 endless kernel: [drm:intel_bios_is_port_dp_dual_mode] child_dev_is_dp_dual_mode: child->dvo_port=9, port_mapping[port].dp=9 Oct 28 14:16:10 endless kernel: [drm:intel_hdmi_set_edid] intel_hdmi_dp_dual_mode_detect: has_edid=false, !connector->override_edid=true, intel_bios_is_port_dp_dual_mode returns true Oct 28 14:16:10 endless kernel: [drm:intel_hdmi_set_edid] intel_hdmi_dp_dual_mode_detect: final type 0 Both of the device_type values: "0x60d2" and "0x60d6" set the "DEVICE_TYPE_HIGH_SPEED_LINK" bit. The corresponding values are also shown in attachment 145759 [details] (using intel_vbt_decode to decode it). Child device info: Device handle: 0x0040 (EFP 2 (HDMI/DVI/DP)) Device type: 0x60d2 (DVI-D) Power management Hotplug signaling HDMI output Content protection High speed link TMDS/DVI signaling Digital output Does "DEVICE_TYPE_HIGH_SPEED_LINK" mean it supports higher clock (more than 165 MHz)? If it does, we may use it to set the max TMDS clock as higher value. PS. The desktop supports 4K on Windows (must do Windows update to latest which includes the graphic driver). [1]: https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/i915/display/intel_vbt_defs.h#L354 [2]: https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/i915/display/intel_vbt_defs.h#L211
Another idea: If we can feedback the needed change in VBT to the vendor, where/what should be fixed in the VBT? Any suggestion?
Can you also attach attach /sys/kernel/debug/dri/0/i915_display_info ?
Created attachment 145954 [details] The i915_display_info for comment #10 (In reply to Jani Saarinen from comment #10) > Can you also attach attach /sys/kernel/debug/dri/0/i915_display_info ? Here is i915_display_info as the attachment.
Created attachment 145962 [details] Acer XC-860 dmesg with DRM debug We have got another Acer desktop XC-860 equipped with i3-9100 CPU. 00:02.0 VGA compatible controller [0300]: Intel Corporation 8th Gen Core Processor Gaussian Mixture Model [8086:3e91] (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] 8th Gen Core Processor Gaussian Mixture Model [1025:1294] Flags: bus master, fast devsel, latency 0, IRQ 126 Memory at a0000000 (64-bit, non-prefetchable) [size=16M] Memory at 90000000 (64-bit, prefetchable) [size=256M] I/O ports at 4000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: [40] Vendor Specific Information: Len=0c <?> Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [d0] Power Management version 2 Capabilities: [100] Process Address Space ID (PASID) Capabilities: [200] Address Translation Service (ATS) Capabilities: [300] Page Request Interface (PRI) Kernel driver in use: i915 Kernel modules: i915 Acer's ODM said this is HDMI 2.0 adapter onboard. But it is detected as type 1 HDMI, so the max TMDS clock is set as 165 MHz. Therefore, all of the 3840x2160 resolution combinations on the list are disabled. It also hits the same issue. [ 1.392657] [drm:drm_dp_dual_mode_detect [drm_kms_helper]] DP dual mode HDMI ID: DP-HDMI ADAPTOR\004 (err 0) [ 1.393770] [drm:drm_dp_dual_mode_detect [drm_kms_helper]] DP dual mode adaptor ID: ff (err 0) [ 1.393797] [drm:intel_hdmi_set_edid [i915]] DP dual mode adaptor (type 1 HDMI) detected (max TMDS clock: 165000 kHz) [ 1.393822] [drm:drm_detect_monitor_audio [drm]] Monitor has basic audio support [ 1.393826] [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:68:HDMI-A-1] status updated from unknown to connected [ 1.393834] [drm:drm_add_display_info [drm]] non_desktop set to 0 [ 1.393840] [drm:drm_add_display_info [drm]] HDMI: DVI dual 0, max TMDS clock 600000 kHz [ 1.393846] [drm:drm_add_display_info [drm]] HF-VSDB: max TMDS clock 600000 kHz [ 1.393860] [drm:drm_add_edid_modes [drm]] ELD monitor ASUS VP28U [ 1.393884] [drm:drm_add_edid_modes [drm]] HDMI: latency present 0 0, video latency 0 1, audio latency 96 2 [ 1.393889] [drm:drm_add_edid_modes [drm]] ELD size 36, SAD count 1 [ 1.393895] [drm:drm_add_display_info [drm]] non_desktop set to 0 [ 1.393901] [drm:drm_add_display_info [drm]] HDMI: DVI dual 0, max TMDS clock 600000 kHz [ 1.393907] [drm:drm_add_display_info [drm]] HF-VSDB: max TMDS clock 600000 kHz [ 1.394200] [drm:drm_mode_debug_printmodeline [drm]] Modeline "3840x2160": 60 594000 3840 4016 4104 4400 2160 2168 2178 2250 0x48 0x5 [ 1.394205] [drm:drm_mode_prune_invalid [drm]] Not using 3840x2160 mode: CLOCK_HIGH [ 1.394211] [drm:drm_mode_debug_printmodeline [drm]] Modeline "3840x2160": 30 297000 3840 4016 4104 4400 2160 2168 2178 2250 0x40 0x9 [ 1.394217] [drm:drm_mode_prune_invalid [drm]] Not using 3840x2160 mode: CLOCK_HIGH [ 1.394222] [drm:drm_mode_debug_printmodeline [drm]] Modeline "2560x1440": 60 241500 2560 2608 2640 2720 1440 1443 1448 1481 0x40 0x5 [ 1.394228] [drm:drm_mode_prune_invalid [drm]] Not using 2560x1440 mode: CLOCK_HIGH [ 1.394234] [drm:drm_mode_debug_printmodeline [drm]] Modeline "2560x1600": 60 268500 2560 2608 2640 2720 1600 1603 1609 1646 0x40 0x9 [ 1.394239] [drm:drm_mode_prune_invalid [drm]] Not using 2560x1600 mode: CLOCK_HIGH Seems more and more machines hit this issue.
Created attachment 145963 [details] Acer XC-860's /sys/kernel/debug/dri/0/i915_vbt Here is the output of dual_mode_dump HDMI-A-1 on Acer XC-860 $ sudo ./dual_mode_dump.sh HDMI-A-1 Probing /sys/class/drm/card0-HDMI-A-1/i2c-0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x40, mode i2c block Continue? [Y/n] 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 44 50 2d 48 44 4d 49 20 41 44 41 50 54 4f 52 04 DP-HDMI ADAPTOR? 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ Acer XC-860's /sys/kernel/debug/dri/0/i915_vbt is dumped as the attachment
Created attachment 145964 [details] Acer XC-860's /sys/kernel/debug/dri/0/i915_display_info
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/intel/issues/511.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.