Linux 4.10 and newer limit pixel clock to 165 MHz on Haswell-ULT laptop
Submitted by Michael Hanselmann (hansmi)
Assigned to Intel GFX Bugs mailing list
Link to original bug (#111553)
Description
Created attachment 145258
i915 log of attaching Dell U2715H to Linux 4.19
I've recently upgraded a laptop from Debian 9 (Stretch) which used Linux 4.9 to
10 (Buster) which is using Linux 4.19. For about two years I've successfully
used a custom modeline to drive an external monitor at its native
resolution:
Modeline "2560x1440R" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync
The upgrade involved switching from X.Org to Wayland with KMS. The native
resolution is no longer offered and the monitor is driven at 2048x1152 instead.
The situation is obviously undesirable. I'm not sure whether I've been driving
the hardware out of specs or whether I'm dealing with a bug.
I managed to identify what appears to be the causing condition in
"drivers/gpu/drm/i915/intel_hdmi.c:hdmi_port_clock_limit" and confirmed that
the native resolution is automatically chosen after applying a minor patch (the
same original code exists in Linux 5.2 so it's not specific to 4.19):
---
--- ./drivers/gpu/drm/i915/intel_hdmi.c.orig 2019-09-03 23:43:19.679250829 +0200
+++ ./drivers/gpu/drm/i915/intel_hdmi.c 2019-09-03 23:43:47.223415491 +0200
@@ -1504,10 +1504,6 @@
struct intel_connector *connector = hdmi->attached_connector;
const struct drm_display_info *info = &connector->base.display_info;
-
if (hdmi->dp_dual_mode.max_tmds_clock)<br>
-
max_tmds_clock = min(max_tmds_clock,<br>
-
hdmi->dp_dual_mode.max_tmds_clock);<br>
-
if (info->max_tmds_clock)
max_tmds_clock = min(max_tmds_clock,
info->max_tmds_clock);
---
"dp_dual_mode.max_tmds_clock" is set to 165 MHz by
"drm_dp_dual_mode_max_tmds_clock". I'm attaching a kernel log.
The condition I ended up removing was added in commit b1ba124d8e95 by Ville
Syrjälä in May 2016
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b1ba124d8e95).
Machine information from dmidecode: Toshiba Satellite Z30-A with Intel Core
i7-4500U CPU @ 1.80GHz (Type 0, Family 6, Model 69, Stepping 1).
Monitor information: Dell U2715H with a native resolution of 2560x1440,
connected via a noname HDMI cable. Tests with another cable didn't bring an
improvement.
Kernel: 4.19.0-5-amd64 #1 (moved) SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64
Excerpt from EDID:
---
…
Detailed mode: Clock 241.500 MHz, 597 mm x 336 mm
2560 2608 2640 2720 hborder 0
1440 1443 1448 1481 vborder 0
+hsync -vsync
VertFreq: 59 Hz, HorFreq: 88786 Hz
…
Monitor ranges (GTF): 56-86Hz V, 30-113kHz H, max dotclock 300MHz
…
---
Attachment 145258, "i915 log of attaching Dell U2715H to Linux 4.19":
linux-4.19-i915-u2715h-attach.log