freebsd / drm-kmod

drm driver for FreeBSD
148 stars 68 forks source link

Are there any plans to support Alder/Raptor Lake? #219

Closed ChomperT closed 6 months ago

ChomperT commented 1 year ago

Hello, I found out that OpenBSD is already supported and many laptops on the market now use 12th/13th generation CPUs, is there any plan to support it in the near future?

oliver-giersch commented 1 year ago

For what's it worth, I tried installing 14-CURRENT on a machine with an Alderlake i5 12400 with UHD 730 GPU but the DRM driver does not work. I also tried installing drm-kmod built from the master branch of this repo to no avail.

evadot commented 1 year ago

AFAIK nobody (including me) is working on updating drm-kmod right now.

lin72h commented 1 year ago

Happy 2023! Someone has been working on it

dante-robinson commented 1 year ago

@ChomperT

@oliver-giersch

https://github.com/freebsd/drm-kmod/pull/226 In case you guys wanted to test it.

orbitz commented 1 year ago

Hello! As a recent owner of a 12th Gen Framework Laptop I'm highly motivated in supporting any work that leads to updating the graphics drivers. I see the existing 5.14 work by @dumbbell , is there any effort for 5.15? Is there any way to help if I don't have the software knowledge to make code changes?

dumbbell commented 1 year ago

I would like the 5.13 (#224) and 5.14 (#226) PRs to be merged before starting 5.15 (which is planned as I need the driver myself).

Without coding, testing the current PRs is invaluable if you can, like using FreeBSD on your workstation on a daily basis. Non-obvious issues appear only after several hours of uptime sometimes.

orbitz commented 1 year ago

@dumbbell Great! I'll get this going on my setup. I understand this branch is a bit buggy but I at least want to try it out so I can be ready for follow ups. I'm already in a flow where I'm compiling the system by hand so I think I'm in a good position try run the changes.

And thank you for this hard work, I wish I could help out more.

dante-robinson commented 1 year ago

OpenBSD supports up to 5.15 already in 7.2 and supposedly 6.1 in the next release (and of course current) if you wanted to try a different BSD in the mean time.

dumbbell commented 1 year ago

The Linux 5.15 backport work in progress can be followed in #230.

dumbbell commented 1 year ago

The Linux 5.16 backport work in progress can be followed in #232.

This version should bring stable support for Alder Lake S iGPUs. Linux 5.17 will be required for Alder Lake P stable support.

dumbbell commented 1 year ago

Updates to 5.15 and 5.16 are merged into master.

The Linux 5.17 backport work in progress can be followed in #236.

This version should bring stable support for Alder Lake P iGPUs.

ykla commented 10 months ago

For my test it doesn't support i7-1260P GPU.

drm-kmod on freebsd 14.0 alpha 2.

dumbbell commented 10 months ago

For my test it doesn't support i7-1260P GPU.

drm-kmod on freebsd 14.0 alpha 2.

Hi!

i7-1260P is supported by drm-515-kmod. I don't think this is the package installed by the drm-kmod metaport. You probably need to install drm-515-kmod explicitly.

ykla commented 10 months ago

For my test it doesn't support i7-1260P GPU. drm-kmod on freebsd 14.0 alpha 2.

Hi!

i7-1260P is supported by drm-515-kmod. I don't think this is the package installed by the drm-kmod metaport. You probably need to install drm-515-kmod explicitly.

Actually, I pulled this GitHub project and compiled it for installation. However, I also installed drm-515-kmod according to your method, but the results are the same: when i915kms is loaded, the screen goes black, and the monitor displays "No HDMI signal input."

dumbbell commented 10 months ago

Could you please share the output of dmesg(8) after loading the driver?

ykla commented 10 months ago

Could you please share the output of dmesg(8) after loading the driver?

root@ykla:/home/ykla # dmesg 
---<<BOOT>>---
Copyright (c) 1992-2023 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 14.0-ALPHA2 amd64 1400094 #0 main-n264841-77013f29d048: Fri Aug 18 08:13:49 UTC 2023
    root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
WARNING: WITNESS option enabled, expect reduced performance.
VT(efifb): resolution 1920x1080
CPU: 12th Gen Intel(R) Core(TM) i7-1260P (2496.00-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x906a3  Family=0x6  Model=0x9a  Stepping=3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended Features=0x239c27eb<FSGSBASE,TSCADJ,BMI1,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,NFPUSG,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PROCTRACE,SHA>
  Structured Extended Features2=0x984007bc<UMIP,PKU,OSPKE,WAITPKG,GFNI,VAES,VPCLMULQDQ,RDPID,MOVDIRI,MOVDIR64B>
  Structured Extended Features3=0xfc18c410<FSRM,MD_CLEAR,IBT,IBPB,STIBP,L1DFL,ARCH_CAP,CORE_CAP,SSBD>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  IA32_ARCH_CAPS=0x88fd6b<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME,MDS_NO,TAA_NO>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr
  TSC: P-state invariant, performance statistics
real memory  = 17179869184 (16384 MB)
avail memory = 16287182848 (15532 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I >
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: Non-uniform topology
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-119
Launching APs: 1 4 3 13 14 15 7 10 6 9 8 11 12 5 2
random: entropy device external interface
kbd0 at kbdmux0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
smbios0: <System Management BIOS> at iomem 0x45cbd000-0x45cbd01e
smbios0: Version: 3.6, BCD Revision: 3.6
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS,SHA1,SHA256>
acpi0: <ALASKA A M I >
Firmware Error (ACPI): Could not resolve symbol [\134_SB.PC00.TXHC.RHUB.SS01], AE_NOT_FOUND (20221020/dswload2-315)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20221020/psobject-372)
Firmware Error (ACPI): Could not resolve symbol [\134_SB.PC00.TXHC.RHUB.SS02], AE_NOT_FOUND (20221020/dswload2-315)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20221020/psobject-372)
Firmware Error (ACPI): Could not resolve symbol [\134_SB.PC00.TXHC.RHUB.SS03], AE_NOT_FOUND (20221020/dswload2-315)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20221020/psobject-372)
Firmware Error (ACPI): Could not resolve symbol [\134_SB.PC00.TXHC.RHUB.SS04], AE_NOT_FOUND (20221020/dswload2-315)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20221020/psobject-372)
acpi0: Power Button (fixed)
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 19200000 Hz quality 950
Event timer "HPET" frequency 19200000 Hz quality 350
Event timer "HPET1" frequency 19200000 Hz quality 340
Event timer "HPET2" frequency 19200000 Hz quality 340
Event timer "HPET3" frequency 19200000 Hz quality 340
Event timer "HPET4" frequency 19200000 Hz quality 340
Event timer "HPET5" frequency 19200000 Hz quality 340
Event timer "HPET6" frequency 19200000 Hz quality 340
Event timer "HPET7" frequency 19200000 Hz quality 340
atrtc1: <AT realtime clock> on acpi0
atrtc1: Warning: Couldn't map I/O.
atrtc1: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x5000-0x503f mem 0x6000000000-0x6000ffffff,0x4000000000-0x400fffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
pcib1: <ACPI PCI-PCI bridge> irq 19 at device 6.0 on pci0
pci1: <ACPI PCI bus> on pcib1
nvme0: <Generic NVMe Device> mem 0x50700000-0x50703fff irq 16 at device 0.0 on pci1
xhci0: <Intel Alder Lake USB 3.2 controller> mem 0x6001100000-0x600110ffff irq 16 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <memory, RAM> at device 20.2 (no driver attached)
pci0: <serial bus> at device 21.0 (no driver attached)
pci0: <simple comms> at device 22.0 (no driver attached)
ahci0: <AHCI SATA controller> port 0x5090-0x5097,0x5080-0x5083,0x5060-0x507f mem 0x50800000-0x50801fff,0x50803000-0x508030ff,0x50802000-0x508027ff irq 16 at device 23.0 on pci0
ahci0: AHCI v1.31 with 2 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
pcib2: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 28.4 on pci0
pci3: <ACPI PCI bus> on pcib3
pci3: <network> at device 0.0 (no driver attached)
pcib4: <ACPI PCI-PCI bridge> irq 16 at device 29.0 on pci0
pci4: <ACPI PCI bus> on pcib4
re0: <Realtek PCIe 2.5GbE Family Controller> port 0x4000-0x40ff mem 0x50500000-0x5050ffff,0x50510000-0x50513fff irq 16 at device 0.0 on pci4
re0: Using Memory Mapping!
re0: Using 1 MSI-X message
re0: ASPM disabled
re0: version:1.98.00
re0: Ethernet address: b0:41:6f:0b:51:18

This product is covered by one or more of the following patents:            
US6,570,884, US6,115,776, and US6,327,625.
re0: Ethernet address: b0:41:6f:0b:51:18
pcib5: <ACPI PCI-PCI bridge> irq 17 at device 29.1 on pci0
pci5: <ACPI PCI bus> on pcib5
re1: <Realtek PCIe 2.5GbE Family Controller> port 0x3000-0x30ff mem 0x50400000-0x5040ffff,0x50410000-0x50413fff irq 18 at device 0.0 on pci5
re1: Using Memory Mapping!
re1: Using 1 MSI-X message
re1: ASPM disabled
re1: version:1.98.00
re1: Ethernet address: b0:41:6f:0b:51:19

This product is covered by one or more of the following patents:            
US6,570,884, US6,115,776, and US6,327,625.
re1: Ethernet address: b0:41:6f:0b:51:19
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
hdac0: <Intel Alder Lake-P HDA Controller> mem 0x6001110000-0x6001113fff,0x6001000000-0x60010fffff irq 16 at device 31.3 on pci0
pci0: <serial bus> at device 31.5 (no driver attached)
acpi_button0: <Sleep Button> on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button1: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_syscontainer0: <System Container> on acpi0
acpi_syscontainer1: <System Container> on acpi0
atrtc0: <AT realtime clock> at port 0x70 irq 8 on isa0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
atrtc0: Can't map interrupt.
atrtc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 14.
ns8250: UART FCR is broken
ns8250: UART FCR is broken
uart0: <16550 or compatible> at port 0x3f8 irq 4 flags 0x10 on isa0
uart0: non-PNP ISA device will be removed from GENERIC in FreeBSD 14.
hwpstate_intel0: <Intel Speed Shift> on cpu0
hwpstate_intel1: <Intel Speed Shift> on cpu1
hwpstate_intel2: <Intel Speed Shift> on cpu2
hwpstate_intel3: <Intel Speed Shift> on cpu3
hwpstate_intel4: <Intel Speed Shift> on cpu4
hwpstate_intel5: <Intel Speed Shift> on cpu5
hwpstate_intel6: <Intel Speed Shift> on cpu6
hwpstate_intel7: <Intel Speed Shift> on cpu7
hwpstate_intel8: <Intel Speed Shift> on cpu8
hwpstate_intel9: <Intel Speed Shift> on cpu9
hwpstate_intel10: <Intel Speed Shift> on cpu10
hwpstate_intel11: <Intel Speed Shift> on cpu11
hwpstate_intel12: <Intel Speed Shift> on cpu12
hwpstate_intel13: <Intel Speed Shift> on cpu13
hwpstate_intel14: <Intel Speed Shift> on cpu14
hwpstate_intel15: <Intel Speed Shift> on cpu15
Timecounter "TSC-low" frequency 1247998785 Hz quality 1000
Timecounters tick every 1.000 msec
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
ugen0.1: <Intel XHCI root HUB> at usbus0
uhub0 on usbus0
uhub0: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
nvme0: Allocated 64MB host memory buffer
hdacc0: <Realtek ALC897 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC897 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC897 (Analog)> at nid 27 and 24,25 on hdaa0
pcm1: <Realtek ALC897 (Rear Analog Line-in)> at nid 26 on hdaa0
Trying to mount root from zfs:zroot/ROOT/default []...
WARNING: WITNESS option enabled, expect reduced performance.
ada0 at ahcich1 bus 0 scbus1 target 0 lun 0
ada0: <CHUZUN CS101 VE0R530E> ACS-3 ATA SATA 3.x device
ada0: Serial Number AA202306100000
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 244198MB (500118192 512 byte sectors)
nda0 at nvme0 bus 0 scbus2 target 0 lun 1
nda0: <Fanxiang S690MQ 1TB ELFMC1T0 FXS690MQ233016076>
nda0: Serial Number FXS690MQ233016076
nda0: nvme version 1.4
nda0: 953869MB (1953525168 512 byte sectors)
uhub0: 16 ports with 16 removable, self powered
Root mount waiting for: usbus0
ugen0.2: <PixArt USB Optical Mouse> at usbus0
ugen0.3: <E-Signal USB Gaming Keyboard> at usbus0
ukbd0 on uhub0
ukbd0: <E-Signal USB Gaming Keyboard, class 0/0, rev 2.00/1.00, addr 2> on usbus0
kbd1 at ukbd0
ukbd1 on uhub0
ukbd1: <E-Signal USB Gaming Keyboard, class 0/0, rev 2.00/1.00, addr 2> on usbus0
kbd2 at ukbd1
Root mount waiting for: usbus0
ugen0.4: <vendor 0x8087 product 0x0029> at usbus0
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
drmn0: [drm] Incompatible option enable_guc=-1 - undocumented flag
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm] Got stolen memory base 0x4c800000, size 0x3c00000
drmn0: could not load firmware image 'i915/adlp_dmc_ver2_10.bin'
drmn0: [drm] Failed to load DMC firmware i915/adlp_dmc_ver2_10.bin. Disabling runtime power management.
drmn0: [drm] Run pkg install gpu-firmware-kmod to install it
lkpi_iic0: <LinuxKPI I2C> on drmn0
iicbus0: <Philips I2C bus> on lkpi_iic0
iic0: <I2C generic I/O> on iicbus0
lkpi_iic1: <LinuxKPI I2C> on drmn0
iicbus1: <Philips I2C bus> on lkpi_iic1
iic1: <I2C generic I/O> on iicbus1
lkpi_iic2: <LinuxKPI I2C> on drmn0
iicbus2: <Philips I2C bus> on lkpi_iic2
iic2: <I2C generic I/O> on iicbus2
lkpi_iic3: <LinuxKPI I2C> on drmn0
iicbus3: <Philips I2C bus> on lkpi_iic3
iic3: <I2C generic I/O> on iicbus3
lkpi_iic4: <LinuxKPI I2C> on drmn0
iicbus4: <Philips I2C bus> on lkpi_iic4
iic4: <I2C generic I/O> on iicbus4
lkpi_iic5: <LinuxKPI I2C> on drmn0
iicbus5: <Philips I2C bus> on lkpi_iic5
iic5: <I2C generic I/O> on iicbus5
lkpi_iic6: <LinuxKPI I2C> on drmn0
iicbus6: <Philips I2C bus> on lkpi_iic6
iic6: <I2C generic I/O> on iicbus6
lkpi_iic7: <LinuxKPI I2C> on drmn0
iicbus7: <Philips I2C bus> on lkpi_iic7
iic7: <I2C generic I/O> on iicbus7
lkpi_iic8: <LinuxKPI I2C> on drmn0
iicbus8: <Philips I2C bus> on lkpi_iic8
iic8: <I2C generic I/O> on iicbus8
drmn0: [drm] failed to retrieve link info, disabling eDP
drmn0: could not load firmware image 'i915/adlp_guc_62.0.3.bin'
drmn0: [drm] GuC firmware i915/adlp_guc_62.0.3.bin: fetch failed with error -2
drmn0: [drm] GuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
drmn0: 0xfffffe014b474648Vdrmn0: Please file a bug on drm/i915; see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.drmn0: 0xfffffe014b4746a8Vdrmn0: 0xfffffe014b4746e8Vdrmn0: [drm:0xffffffff83906da0s] 0xfffffe014b474748Vsysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
lkpi_iic9: <LinuxKPI I2C> on drm3
iicbus9: <Philips I2C bus> on lkpi_iic9
iic9: <I2C generic I/O> on iicbus9
[drm] Initialized i915 1.6.0 20201103 for drmn0 on minor 0
drmn0: [drm] Cannot find any crtc or sizes
Intel(R) Wireless WiFi based driver for FreeBSD
acpi_wmi0: <ACPI-WMI mapping> on acpi0
acpi_wmi0: cannot find EC device
acpi_wmi0: Embedded MOF found
ACPI: \134_SB.WFDE.WQCC: 1 arguments were passed to a non-method ACPI object (Buffer) (20221020/nsarguments-361)
acpi_wmi1: <ACPI-WMI mapping> on acpi0
acpi_wmi1: cannot find EC device
acpi_wmi1: Embedded MOF found
ACPI: \134_SB.WFTE.WQCC: 1 arguments were passed to a non-method ACPI object (Buffer) (20221020/nsarguments-361)
ig4iic0: <Intel Alder Lake-P I2C Controller-0> at device 21.0 on pci0
ig4iic0: Using MSI
iicbus10: <Philips I2C bus (ACPI-hinted)> on ig4iic0
drmn0: [drm] Cannot find any crtc or sizes
iicbus10: <unknown card> at addr 0x2c
iic10: <I2C generic I/O> on iicbus10
ichsmb0: <Intel Alder Lake SMBus controller> port 0xefa0-0xefbf mem 0x6001118000-0x60011180ff irq 16 at device 31.4 on pci0
smbus0: <System Management Bus> on ichsmb0
iwlwifi0: <iwlwifi> mem 0x50600000-0x50603fff irq 17 at device 0.0 on pci3
iwlwifi0: successfully loaded firmware image 'iwlwifi-cc-a0-73.ucode'
iwlwifi0: api flags index 2 larger than supported by driver
iwlwifi0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
iwlwifi0: loaded firmware version 73.35c0a2c6.0 cc-a0-73.ucode op_mode iwlmvm
iwlwifi0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340
iwlwifi0: Detected RF HR B3, rfid=0x10a100
iwlwifi0: base HW address: 34:13:e8:b6:b4:3f
lo0: link state changed to UP
re1: link state changed to UP
ums0 on uhub0
ums0: <PixArt USB Optical Mouse, class 0/0, rev 2.00/1.00, addr 1> on usbus0
ums0: 3 buttons and [XYZ] coordinates ID=0
uhid0 on uhub0
uhid0: <E-Signal USB Gaming Keyboard, class 0/0, rev 2.00/1.00, addr 2> on usbus0
ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x0029, class 224/1, rev 2.01/0.01, addr 3> on usbus0
Security policy loaded: MAC/ntpd (mac_ntpd)

Then I try pkg install gpu-firmware-kmod and reboot the OS stop at loading kernel modules

IMG_20230825_052512

dumbbell commented 10 months ago

The master branch of this project is incompatible with Intel 12th gen. Only update-to-v5.17 and 5.15-lts are.

ykla commented 10 months ago

@dumbbell

I followed your instructions, but it seems to have no effect. The system is still stuck in the same place. I used kld_list="i915kms" written to /etc/rc.conf for loading.

I attempted to compile and install update-to-v5.17, but it's still stuck at the same location.

huanghwh commented 6 months ago

Does master branch support Raptor Lake now ?

takawata commented 6 months ago

I tried on ThinkPad X13 Gen 4 (Raptor Lake) and works fine. Thanks.