Regression: MODE_H_ILLEGAL starting from kernel v5.5 for UHD 605 [8086:2212]
Prior to kernel v5.5 the setup was working fine. Starting with that release the display goes blank. What is visible in the logs:
UBSAN: array-index-out-of-bounds in /build/linux-hwe-5.15-5Tb11x/linux-hwe-5.15-5.15.0/drivers/gpu/drm/i915/display/intel_display.c:12564:20
index 5 is out of range for type 'u32 [5]'
Full dmesg and lspci attached.
After a bisection I was able to determine that it started with commit 8f4b1068e7fc3df1a77ac8151767e56b208cc87f.
Apparently what happens is this test causes intel_mode_valid
to exit with MODE_H_ILLEGAL:
if (mode->htotal - mode->hdisplay < 32)
return MODE_H_ILLEGAL;
According to the output in the journal:
[drm]] Modeline "800x1280": 50 54000 800 810 820 830 1280 1290 1300 1310 0x8 0xa
so in this case htotal
is 830
and hdisplay
is 800
which makes this condition true and determines the mode is illegal. As a result the display is blank.
Reverting the commit in question restores full functionality