Issue #3497 has been reported by sigttou.
----------------------------------------
Bug #3497: i915: MSI is used on pre-gen5 chips (965GM, g4x), interrupts get
lost and the display freezes
http://bugs.dragonflybsd.org/issues/3497
* Author: sigttou
* Status: New
* Priority: Normal
* Target version: 6.6
* Start date: 2026-12-04
----------------------------------------
The drm compat layer allocates MSI for every drm device in @drm_fill_pdev()@
(@sys/dev/drm/drm_dragonfly.c@, @msi_enable = 1@) before the driver is probed.
The i915 driver only enables MSI on gen5 and later: @i915_drv.c@ still has the
Linux code and its comment ("on the 965GM, MSI interrupts may be lost or
delayed ... MSI interrupts seem to get lost on g4x as well, and interrupt
delivery seems to stay properly dead afterwards. So we'll just disable them for
all pre-gen5 chipsets"), but @pci_enable_msi()@ is under @#if 0@, because the
interrupt is already allocated by @drm_fill_pdev()@. So pre-gen5 chips run with
MSI.
On a Lenovo X61 Tablet (Intel GM965, `8086:2a02`) with master @175de3bdf7@,
video playback in X (modesetting or intel driver, any layout, also in a window
on the panel alone) freezes within seconds to minutes, the system stays blocked
for seconds at a time. What the reporter saw:
- @vmstat -i@ ten seconds apart during a freeze: the GPU line (@vgapci0@) does
not move (1571 -> 1571, 6010 -> 6010), all other interrupts keep counting.
- dmesg: i915 @missed_breadcrumb@ dumps ("waiting for 2bd8", "IRQ? 0x1
(breadcrumbs? yes)", "Idle? yes": the GPU finished but the interrupt never
arrived), then @drm_atomic_helper_wait_for_flip_done ... flip_done timed out@
on the pipes, planes, cursor and connectors, X blocked in kernel waits of 10 s
("event processing lagging behind by 19911ms" in Xorg.0.log).
- @pciconf -lvc@: @MSI supports 1 message enabled with 1 message@ on the GPU.
- With @hw.drm0.msi.enable=0@ and @dev.drm.0.msi.enable=0@ in loader.conf the
GPU interrupt is on the shared legacy line (@vmstat -i@: @uhci2/cbb0/vgapci0@,
about 48 per second) and the freezes are gone (playback of 29 minutes, clean
exit).
Fix: let the i915 driver say whether MSI may be used. @drm_init_pdev()@ keeps
allowing MSI for other drivers; i915 passes @gen >= 5@ from the device info it
already has in @i915_driver_attach()@. Tested on the same GM965 without the
tunables: @vmstat -i@ shows the shared @uhci2/cbb0/vgapci0@ line, the boot
banner says @irq=16@, and video playback, VT switches and VGA hotplug run
without freezes.
Reporter: @vjkarbo
---Files--------------------------------
0001-drm-i915-use-legacy-interrupts-on-pre-gen5-chipsets.patch (4.69 KB)
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://bugs.dragonflybsd.org/my/account