freebsd / drm-kmod

drm driver for FreeBSD
148 stars 68 forks source link

[drm-6.1] kldunload i915kms reboot system on MateBook X Pro 2023 #306

Closed huanghwh closed 3 weeks ago

huanghwh commented 3 weeks ago

Describe the bug kldunload i915kms, screen black, Caps LED is on, and system reboot.

FreeBSD version FreeBSD mbxp.jopens.cn 14.1-RELEASE FreeBSD 14.1-RELEASE #5 n267679-10e31f0946d8-dirty: Tue Jun 11 11:17:29 CST 2024 root@mbxp.jopens.cn:/usr/obj/usr/src/amd64.amd64/sys/MBXP amd64 1401000 1401000

PCI Info hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa707 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P/U 4p+8e cores Host Bridge/DRAM Controller' class = bridge subclass = HOST-PCI vgapci0@pci0:0:2:0: class=0x030000 rev=0x04 hdr=0x00 vendor=0x8086 device=0xa7a0 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P [Iris Xe Graphics]' class = display subclass = VGA none0@pci0:0:4:0: class=0x118000 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa71d subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake Dynamic Platform and Thermal Framework Processor Participant' class = dasp pcib1@pci0:0:6:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x8086 device=0xa74d subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake PCIe 4.0 Graphics Port' class = bridge subclass = PCI-PCI pcib2@pci0:0:7:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x8086 device=0xa76e subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P Thunderbolt 4 PCI Express Root Port' class = bridge subclass = PCI-PCI pcib3@pci0:0:7:2: class=0x060400 rev=0x00 hdr=0x01 vendor=0x8086 device=0xa72f subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P Thunderbolt 4 PCI Express Root Port' class = bridge subclass = PCI-PCI none1@pci0:0:8:0: class=0x088000 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa74f subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'GNA Scoring Accelerator module' class = base peripheral none2@pci0:0:10:0: class=0x118000 rev=0x01 hdr=0x00 vendor=0x8086 device=0xa77d subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake Crashlog and Telemetry' class = dasp xhci0@pci0:0:13:0: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa71e subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P Thunderbolt 4 USB Controller' class = serial bus subclass = USB none3@pci0:0:13:2: class=0x0c0340 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa73e subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P Thunderbolt 4 NHI' class = serial bus subclass = USB none4@pci0:0:13:3: class=0x0c0340 rev=0x00 hdr=0x00 vendor=0x8086 device=0xa76d subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P Thunderbolt 4 NHI' class = serial bus subclass = USB xhci1@pci0:0:20:0: class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51ed subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH USB 3.2 xHCI Host Controller' class = serial bus subclass = USB none5@pci0:0:20:2: class=0x050000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51ef subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH Shared SRAM' class = memory subclass = RAM iwlwifi0@pci0:0:20:3: class=0x028000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51f1 subvendor=0x8086 subdevice=0x0094 vendor = 'Intel Corporation' device = 'Raptor Lake PCH CNVi WiFi' class = network ig4iic0@pci0:0:21:0: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51e8 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH Serial IO I2C Controller' class = serial bus ig4iic1@pci0:0:21:1: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51e9 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH Serial IO I2C Controller' class = serial bus ig4iic2@pci0:0:21:2: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51ea subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH Serial IO I2C Controller' class = serial bus none6@pci0:0:22:0: class=0x078000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51e0 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH HECI Controller' class = simple comms ig4iic3@pci0:0:25:0: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51c5 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake-P Serial IO I2C Controller' class = serial bus ig4iic4@pci0:0:25:1: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51c6 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake-P Serial IO I2C Controller' class = serial bus none7@pci0:0:30:0: class=0x078000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51a8 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH UART' class = simple comms none8@pci0:0:30:2: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51aa subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake SPI Controller' class = serial bus isab0@pci0:0:31:0: class=0x060100 rev=0x01 hdr=0x00 vendor=0x8086 device=0x519d subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake LPC/eSPI Controller' class = bridge subclass = PCI-ISA hdac0@pci0:0:31:3: class=0x040100 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51ca subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Raptor Lake-P/U/H cAVS' class = multimedia subclass = audio ichsmb0@pci0:0:31:4: class=0x0c0500 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51a3 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake PCH-P SMBus Host Controller' class = serial bus subclass = SMBus none9@pci0:0:31:5: class=0x0c8000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x51a4 subvendor=0x19e5 subdevice=0x3e6c vendor = 'Intel Corporation' device = 'Alder Lake-P PCH SPI Controller' class = serial bus nvme0@pci0:1:0:0: class=0x010802 rev=0x01 hdr=0x00 vendor=0x15b7 device=0x5017 subvendor=0x15b7 subdevice=0x5017 vendor = 'Sandisk Corp' device = 'WD Black SN770 / PC SN740 256GB / PC SN560 (DRAM-less) NVMe SSD' class = mass storage subclass = NVM

DRM KMOD version % pkg query -x '%n %v' 'drm.*kmod' drm-61-kmod 6.1.69_2

To Reproduce kldunload i915kms

Additional context I got a vmcore dump in attach files, also have a small patch in base system:

diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c
index 40340c76005a..2cc32b2eadd2 100644
--- a/sys/x86/pci/pci_early_quirks.c
+++ b/sys/x86/pci/pci_early_quirks.c
@@ -261,6 +261,7 @@ static const struct pci_device_id intel_ids[] = {
        INTEL_ADLS_IDS(&intel_stolen_ops_gen11),
        INTEL_ADLP_IDS(&intel_stolen_ops_gen11),
        INTEL_RPLS_IDS(&intel_stolen_ops_gen11),
+       INTEL_RPLP_IDS(&intel_stolen_ops_gen11),
 };

 /*
diff --git a/sys/x86/pci/pci_early_quirks.h b/sys/x86/pci/pci_early_quirks.h
index 2af0408e0ea5..8192b3d3a05e 100644
--- a/sys/x86/pci/pci_early_quirks.h
+++ b/sys/x86/pci/pci_early_quirks.h
@@ -570,4 +570,13 @@
        INTEL_VGA_DEVICE(0xA788, info), \
        INTEL_VGA_DEVICE(0xA789, info)

+/* RPL-P */
+#define INTEL_RPLP_IDS(info) \
+        INTEL_VGA_DEVICE(0xA720, info), \
+        INTEL_VGA_DEVICE(0xA721, info), \
+        INTEL_VGA_DEVICE(0xA7A0, info), \
+        INTEL_VGA_DEVICE(0xA7A1, info), \
+        INTEL_VGA_DEVICE(0xA7A8, info), \
+        INTEL_VGA_DEVICE(0xA7A9, info)
+
 #endif /* _PCI_EARLY_QUIRKS_H_ */

core.txt

evadot commented 3 weeks ago

This is known unloading isn't supported right now, duplicate of #265