On Mon, Feb 10, 2025 at 12:06:58PM +0100, Matthieu Herrb wrote:
> On Mon, Feb 10, 2025 at 09:10:26PM +1100, Jonathan Gray wrote:
> > On Mon, Feb 10, 2025 at 08:29:34AM +0100, Matthieu Herrb wrote:
> > > On Mon, Feb 10, 2025 at 08:20:05AM +0100, Matthieu Herrb wrote:
> > > > On Mon, Feb 10, 2025 at 05:49:37PM +1100, Jonathan Gray wrote:
> > > > > On Mon, Feb 10, 2025 at 07:27:28AM +0100, Matthieu Herrb wrote:
> > > > > > Hi,
> > > > > >
> > > > > > sorry to not having being able to test the drm upgrade on this
> > > > > > machine
> > > > > > earlier, but the new drm code hangs on boot shorly after attachine
> > > > > > drm, clearing the screen and displaying:
> > > > > >
> > > > > > wsdisplay0 at inteldrm0 mux1: console (std, vt100, emulation), using
> > > > > > wskbd1
> > > > > >
> > > > > > It's not a hard hang (the capslock led still toggles, and the CPU
> > > > > > don't seem to go full speed, power use stays uner 1A at 19V), but I
> > > > > > can't enter DDB nor do a Ctl+Alt+Del to trigger a reboot.
> > > > > > I've the latest BIOS for this machine.
> > > > >
> > > > > I had another report like this today. Machine could still change
> > > > > virtual terminals. It was also Alder Lake.
> > > >
> > > > Hmm intersting, switching VT inedeed works and cause a screen refresh.
> > > > So in text mode I can log in and run commands blindly. Switching to
> > > > anothr VT and back will display the result.
> > > >
> > > > Also now I access the machine through the net. In my previous attempt
> > > > I couldn't, probably because I did enter DDB after hitting
> > > > Ctrl+Alt+ESC, but without output on the screen I thought it failed.
> > > >
> > > > None of the printfs show up, but here's a full dmesg with DRMDEBUG
> > > > (and a few VT switches that add more lines at the end)
> > > >
> > >
> > > Another data point: X or Wayland work normally if I start them from
> > > these VT switches. So it's just wsdisplat that doesnt't refresh. (And
> > > if I had xenodm started by rc.conf.local, I probably wouldn't notice
> > > the issue).
> >
> > does forcing a switch help?
>
> No unfortunatly it does not.
going back to intel_fbdev_restore_mode() ?
Index: sys/dev/pci/drm/i915/i915_driver.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_driver.c,v
diff -u -p -r1.20 i915_driver.c
--- sys/dev/pci/drm/i915/i915_driver.c 7 Feb 2025 03:03:28 -0000 1.20
+++ sys/dev/pci/drm/i915/i915_driver.c 10 Feb 2025 12:35:05 -0000
@@ -1889,6 +1889,7 @@ int inteldrm_getchar(void *, int, int, s
void inteldrm_burner(void *, u_int, u_int);
void inteldrm_burner_cb(void *);
void inteldrm_scrollback(void *, void *, int lines);
+int intel_fbdev_restore_mode(struct drm_i915_private *);
extern const struct pci_device_id pciidlist[];
struct wsscreen_descr inteldrm_stdscreen = {
@@ -2038,7 +2039,7 @@ inteldrm_doswitch(void *v)
struct rasops_info *ri = &dev_priv->ro;
rasops_show_screen(ri, dev_priv->switchcookie, 0, NULL, NULL);
- drm_client_dev_restore(dev);
+ intel_fbdev_restore_mode(dev_priv);
if (dev_priv->switchcb)
(*dev_priv->switchcb)(dev_priv->switchcbarg, 0, 0);
@@ -2055,7 +2056,7 @@ inteldrm_enter_ddb(void *v, void *cookie
return;
rasops_show_screen(ri, cookie, 0, NULL, NULL);
- drm_client_dev_restore(dev);
+ intel_fbdev_restore_mode(dev_priv);
}
int
@@ -2501,7 +2502,7 @@ inteldrm_activate(struct device *self, i
case DVACT_WAKEUP:
i915_drm_resume_early(dev);
i915_drm_resume(dev);
- drm_client_dev_restore(dev);
+ intel_fbdev_restore_mode(dev_priv);
rv = config_suspend(dev->dev, act);
break;
}
Index: sys/dev/pci/drm/i915/display/intel_fbdev.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/display/intel_fbdev.c,v
diff -u -p -r1.14 intel_fbdev.c
--- sys/dev/pci/drm/i915/display/intel_fbdev.c 7 Feb 2025 03:03:29 -0000
1.14
+++ sys/dev/pci/drm/i915/display/intel_fbdev.c 10 Feb 2025 12:32:10 -0000
@@ -599,7 +599,7 @@ static int intel_fbdev_output_poll_chang
return 0;
}
-static int intel_fbdev_restore_mode(struct drm_i915_private *dev_priv)
+int intel_fbdev_restore_mode(struct drm_i915_private *dev_priv)
{
struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
int ret;