<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - I7-8700 onboard HDMI port does not support 4K resolution"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=112018#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - I7-8700 onboard HDMI port does not support 4K resolution"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=112018">bug 112018</a>
              from <span class="vcard"><a class="email" href="mailto:jian-hong@endlessm.com" title="jian-hong@endlessm.com">jian-hong@endlessm.com</a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=145832" name="attach_145832" title="Debug diff for getting child_device_config->device_type">attachment 145832</a> <a href="attachment.cgi?id=145832&action=edit" title="Debug diff for getting child_device_config->device_type">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=112018&attachment=145832'>[review]</a>
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
<span class=""><a href="attachment.cgi?id=145759" name="attach_145759" title="dump of /sys/kernel/debug/dri/0/i915_vbt">attachment 145759</a> <a href="attachment.cgi?id=145759&action=edit" title="dump of /sys/kernel/debug/dri/0/i915_vbt">[details]</a></span> (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]:
<a href="https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/i915/display/intel_vbt_defs.h#L354">https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/i915/display/intel_vbt_defs.h#L354</a>
[2]:
<a href="https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/i915/display/intel_vbt_defs.h#L211">https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/gpu/drm/i915/display/intel_vbt_defs.h#L211</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>