drm-panic: kernel: Enable SimpleDRM

Currently on a LFS system booted via legacy BIOS (intead of UEFI), the
users can make two different configurations:

1. The DRM driver for the GPU is built as a module.  Then before the
   module is loaded (i.e. the root fs is properly mounted) the kernel
   messages are displayed via the VGA console.
2. The DRM driver for the GPU is built into the kernel image.  Then the
   kernel messages are displayed via the DRM-emulated framebuffer
   console since a very early stage (before the root fs is properly
   mounted).

When the system is booted via UEFI, we use SimpleDRM on the EFI
framebuffer for displaying kernel messages, thus it's always the case 2.

Both are not good for diagnostic in case the root fs cannot be mounted
properly (it's very frequent on lfs-support):

- With 1 the VGA console can only fit 80x24 characters, so the relevent
  information is often flushed away.
- With 2 the panic message is often displayed improperly when a DRM
  driver is running.

The "DRM panic" feature introduced since Linux 6.11 (but it'll only
become usable for LFS since Linux 6.12) can fix the case 2, while case
1 just cannot be fixed.  So start to make LFS booted via legacy BIOS
to use method 2 now, then we can enable DRM panic and fix this
long-standing issue.
This commit is contained in:
Xi Ruoyao 2024-10-30 19:38:59 +08:00
parent ea48456403
commit fdf21dccba
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
6 changed files with 24 additions and 31 deletions

View File

@ -282,8 +282,8 @@
<listitem> <listitem>
<para>These are needed to display the Linux console on a <para>These are needed to display the Linux console on a
GPU driven by a DRI (Direct Rendering Infrastructure) driver. GPU driven by a DRI (Direct Rendering Infrastructure) driver.
If <option>CONFIG_DRM</option> (Direct Rendering Manager) is As <option>CONFIG_DRM</option> (Direct Rendering Manager) is
enabled, you should enable these two options as well or you'll see enabled, we should enable these two options as well or we'll see
a blank screen once the DRI driver is loaded.</para> a blank screen once the DRI driver is loaded.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -1 +1 @@
6.10.2 6.12.1

View File

@ -13,7 +13,11 @@ STACKPROTECTOR_STRONG='*'
UEVENT_HELPER=' ' UEVENT_HELPER=' '
DEVTMPFS='*' DEVTMPFS='*'
DEVTMPFS_MOUNT='*' DEVTMPFS_MOUNT='*'
DRM=' *M' SYSFB_SIMPLEFB='*'
DRM='*'
DRM_FBDEV_EMULATION='*'
DRM_SIMPLEDRM='*'
FRAMEBUFFER_CONSOLE='*'
NET='*' NET='*'
INET='*' INET='*'
IPV6='*' IPV6='*'
@ -30,11 +34,3 @@ revision='systemd'
[RT_GROUP_SCHED] [RT_GROUP_SCHED]
value = ' ' value = ' '
comment = 'This may cause some systemd features malfunction' comment = 'This may cause some systemd features malfunction'
[DRM_FBDEV_EMULATION]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'
[FRAMEBUFFER_CONSOLE]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'

View File

@ -42,15 +42,15 @@
... [FW_LOADER_USER_HELPER] ... [FW_LOADER_USER_HELPER]
<emphasis role='blue'>F</emphasis>irmware Drivers ---&gt; <emphasis role='blue'>F</emphasis>irmware Drivers ---&gt;
[*] <emphasis role='blue'>E</emphasis>xport DMI identification via sysfs to userspace [DMIID] [*] <emphasis role='blue'>E</emphasis>xport DMI identification via sysfs to userspace [DMIID]
[*] M<emphasis role='blue'>a</emphasis>rk VGA/VBE/EFI FB as generic system framebuffer [SYSFB_SIMPLEFB]
<emphasis role='blue'>G</emphasis>raphics support ---&gt; <emphasis role='blue'>G</emphasis>raphics support ---&gt;
&lt; /*/M&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt; &lt;*&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt;
... [DRM] ... [DRM]
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
[ /*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
... [DRM_FBDEV_EMULATION] ... [DRM_FBDEV_EMULATION]
&lt;*&gt; <emphasis role='blue'>S</emphasis>imple framebuffer driver [DRM_SIMPLEDRM]
<emphasis role='blue'>C</emphasis>onsole display driver support ---&gt; <emphasis role='blue'>C</emphasis>onsole display driver support ---&gt;
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]
[ /*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]
<emphasis role='blue'>F</emphasis>ile systems ---&gt; <emphasis role='blue'>F</emphasis>ile systems ---&gt;
[*] <emphasis role='blue'>I</emphasis>notify support for userspace [INOTIFY_USER] [*] <emphasis role='blue'>I</emphasis>notify support for userspace [INOTIFY_USER]

View File

@ -12,14 +12,10 @@ STACKPROTECTOR_STRONG='*'
UEVENT_HELPER=' ' UEVENT_HELPER=' '
DEVTMPFS='*' DEVTMPFS='*'
DEVTMPFS_MOUNT='*' DEVTMPFS_MOUNT='*'
DRM=' *M' SYSFB_SIMPLEFB='*'
DRM='*'
DRM_FBDEV_EMULATION='*'
DRM_SIMPLEDRM='*'
FRAMEBUFFER_CONSOLE='*'
revision='sysv' revision='sysv'
[DRM_FBDEV_EMULATION]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'
[FRAMEBUFFER_CONSOLE]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'

View File

@ -28,12 +28,13 @@
[*] M<emphasis role='blue'>a</emphasis>intain a devtmpfs filesystem to mount at /dev [DEVTMPFS] [*] M<emphasis role='blue'>a</emphasis>intain a devtmpfs filesystem to mount at /dev [DEVTMPFS]
[*] <emphasis role='blue'>A</emphasis>utomount devtmpfs at /dev, after the kernel mounted the rootfs [*] <emphasis role='blue'>A</emphasis>utomount devtmpfs at /dev, after the kernel mounted the rootfs
... [DEVTMPFS_MOUNT] ... [DEVTMPFS_MOUNT]
<emphasis role='blue'>F</emphasis>irmware Drivers ---&gt;
[*] M<emphasis role='blue'>a</emphasis>rk VGA/VBE/EFI FB as generic system framebuffer [SYSFB_SIMPLEFB]
<emphasis role='blue'>G</emphasis>raphics support ---&gt; <emphasis role='blue'>G</emphasis>raphics support ---&gt;
&lt; /*/M&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt; &lt;*&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt;
... [DRM] ... [DRM]
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
[ /*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
... [DRM_FBDEV_EMULATION] ... [DRM_FBDEV_EMULATION]
&lt;*&gt; <emphasis role='blue'>S</emphasis>imple framebuffer driver [DRM_SIMPLEDRM]
<emphasis role='blue'>C</emphasis>onsole display driver support ---&gt; <emphasis role='blue'>C</emphasis>onsole display driver support ---&gt;
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]</screen>
[ /*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]</screen>