<div dir="ltr">I ran into an issue with the i915 driver not being able to drive a display with this specific modeline:<br><br>[drm]] Modeline "1920x720": 60 120980 1920 1932 1936 1948 720 723 733 1035 0x48 0x9<br>[drm:drm_mode_prune_invalid [drm]] Not using 1920x720 mode: H_ILLEGAL<br><br>After some investigation I found that intel_mode_valid (and in newer kernels, intel_cpu_transcoder_mode_valid) return<span class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(68,68,68)">s </span>MODE_H_ILLEGAL due to (htotal - hdisplay) being lower than 32.<br>The modeline in question indeed does not satisfy this constraint, as HTOTAL(1948) - HDISPLAY(1920) equals 28.<br>Changing the driver code to allow for a hblank span of 28 pixels or lower resulted in the driver successfully rendering to the display.<br>As such I propose this patch to allow for a tighter hblank span.<br><br>Nb: I am uncertain if the hblank span of 32 pixels has been chosen deliberately and what the side-effects could be of lowering this value.<br>Any insights into this or alternative solutions would be very much appreciated! I also considered introducing a kernel module parameter to optionally loosen these mode constraints.<br><br>The referenced modeline is present in a line of ultrawide signage displays and has been known to work on other graphics drivers/OSes.<br><br>Signed-off-by: Sebastiaan Schalbroeck <<a href="mailto:schalbroeck@gmail.com">schalbroeck@gmail.com</a>><br>---<br> drivers/gpu/drm/i915/display/intel_display.c | 4 ++--<br> 1 file changed, 2 insertions(+), 2 deletions(-)<br><br>diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c<br>index b10aad1..f6aba1d 100644<br>--- a/drivers/gpu/drm/i915/display/intel_display.c<br>+++ b/drivers/gpu/drm/i915/display/intel_display.c<br>@@ -7745,13 +7745,13 @@ enum drm_mode_status intel_cpu_transcoder_mode_valid(struct drm_i915_private *de<br>         */<br>        if (DISPLAY_VER(dev_priv) >= 5) {<br>                if (mode->hdisplay < 64 ||<br>-                   mode->htotal - mode->hdisplay < 32)<br>+                   mode->htotal - mode->hdisplay < 28)<br>                        return MODE_H_ILLEGAL;<br><br>                if (mode->vtotal - mode->vdisplay < 5)<br>                        return MODE_V_ILLEGAL;<br>        } else {<br>-               if (mode->htotal - mode->hdisplay < 32)<br>+               if (mode->htotal - mode->hdisplay < 28)<br>                        return MODE_H_ILLEGAL;<br><br>                if (mode->vtotal - mode->vdisplay < 3)<br><br>--<br>2.39.2</div>