On Wed, Apr 24, 2019 at 08:17:25PM +0200, Mark Kettenis wrote: > > Date: Wed, 24 Apr 2019 17:33:58 +0200 > > From: Matthieu Herrb <[email protected]> > > > > Hi, > > > > I have an old Dell Optiplex 755 laying around that I use for OpenBSD > > tests from time to time at work. It worked well under 6.5 development, > > and I just retryed the official 6.5 release kernel. Dmesg from 6.5 > > below. > > > > Under -current the kernel crashes during boot, apparnelty while trying > > to initialise inteldrm. > > > > Adding a radeon card in the AGP slot (and thus disabling the internal > > GPU) lets the machine boot normally. > > > > Below the dmesg a log of the serial console during -current crashes. > > Note that with the MP kernel, 'mach ddbcpu 1' hangs the machine. I > > rebooted with bsd.up, same panic. > > > > I have the machine sitting in ddb for now if someone needs some more > > information. > > Does the diff below fix the issue?
So this is due to inteldrm now having an attack hook and setting the callback late. inteldrm_attachhook i915_driver_load i915_driver_init_early intel_irq_init I wonder if perhaps we should wait until after irq_install which is called later in i915_driver_load() which is after the pre/post hooks have run. i915_driver_load i915_load_modeset_init intel_irq_install drm_irq_install which would mean testing 'dev->irq_enabled' instead. Though I'm ok with this diff going in as well. > > Index: dev/pci/drm/i915/i915_drv.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_drv.c,v > retrieving revision 1.115 > diff -u -p -r1.115 i915_drv.c > --- dev/pci/drm/i915/i915_drv.c 14 Apr 2019 10:14:51 -0000 1.115 > +++ dev/pci/drm/i915/i915_drv.c 24 Apr 2019 18:13:16 -0000 > @@ -3775,7 +3775,10 @@ inteldrm_intr(void *arg) > struct inteldrm_softc *dev_priv = arg; > struct drm_device *dev = &dev_priv->drm; > > - return dev->driver->irq_handler(0, dev); > + if (dev->driver->irq_handler) > + return dev->driver->irq_handler(0, dev); > + > + return 0; > } > > #endif >
