Bug 279247 - graphics/drm-510-kmod: kernel panic on HP/Compaq nc8430 with Radeon R520 since FBSD 13.3
Summary: graphics/drm-510-kmod: kernel panic on HP/Compaq nc8430 with Radeon R520 sinc...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-23 09:43 UTC by Lannig
Modified: 2024-05-31 14:39 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
patch-drivers_gpu_drm_radeon_radeon__device.c (900 bytes, patch)
2024-05-25 18:18 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lannig 2024-05-23 09:43:30 UTC
HP/Compaq nc8430 laptop with ATI Mobility 1600X (R520) GPU was stable in 13.2 with radeonkms module loaded.
Panics at boot when the module is loaded since upgraded to 13.3-RELEASE

Tried deinstalling/reinstalling drm-510-kmod-5.10.163_9 gpu-firmware-kmod-20240401,1 drm-kmod-20220907_3 to no avail.

Session log using serial console:

FreeBSD/i386 ([edited]) (ttyu0)

login: root
Password:
Last login: Thu May 23 11:32:38 from [edited]
FreeBSD 13.3-RELEASE releng/13.3-n257428-80d2b634ddf0 GENERIC

# kldload radeonkms
<6>[drm] radeon kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
<6>[drm] initializing kernel modesetting (RV530 0x1002:0x71C5 0x103C:0x30A3 0x00).
[drm ERROR :radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
<6>[drm] Generation 2 PCI interface, using max accessible memory
drmn0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
drmn0: GTT: 512M 0x0000000010000000 - 0x000000002FFFFFFF
<6>[drm] Detected VRAM RAM=256M, BAR=256M
<6>[drm] RAM width 128bits DDR
panic: vm_fault_lookup: fault on nofault entry, addr: 0x1000
cpuid = 1
time = 1716457277
KDB: stack backtrace:
#0 0x106fbaf at kdb_backtrace+0x4f
#1 0x1029352 at vpanic+0xf2
#2 0x1029254 at panic+0x14
#3 0x12f3616 at vm_fault+0x1506
#4 0x12f2048 at vm_fault_trap+0x88
#5 0x143d58c at trap_pfault+0x12c
#6 0x143caa2 at trap+0x2a2
#7 0xffc0321f at radeon_bo_move.__warn_on_once+0xdc883777
#8 0x28 at ll+0x7
Comment 1 Lannig 2024-05-23 13:41:25 UTC
FYI here are the kernel messages linked to drm when booting this same machine on 13.2 (boots OK):

[drm] initializing kernel modesetting (RV530 0x1002:0x71C5 0x103C:0x30A3 0x00).
[drm ERROR :radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
[drm] Generation 2 PCI interface, using max accessible memory
drmn0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
drmn0: GTT: 512M 0x0000000010000000 - 0x000000002FFFFFFF
[drm] Detected VRAM RAM=256M, BAR=256M
[drm] RAM width 128bits DDR
[drm] radeon: 256M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.
[drm] GART: num cpu pages 131072, num gpu pages 131072
[drm] radeon: power management initialized
[drm] radeon: 1 quad pipes, 2 z pipes initialized.
[drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
drmn0: WB enabled
drmn0: fence driver on ring 0 use gpu addr 0x0000000010000000
drmn0: radeon: MSI limited to 32-bit
drmn0: radeon: using MSI.
[drm] radeon: irq initialized.
[drm] Loading R500 Microcode
drmn0: could not load firmware image 'radeon/R520_cp.bin'
[drm ERROR :r100_cp_init] Failed to load firmware!
drmn0: failed initializing CP (-2).
drmn0: Disabling GPU acceleration
[drm] radeon: cp finalized
lkpi_iicbb0: <LinuxKPI I2CBB> on drmn0
lkpi_iicbb1: <LinuxKPI I2CBB> on drmn0
lkpi_iicbb2: <LinuxKPI I2CBB> on drmn0
lkpi_iicbb3: <LinuxKPI I2CBB> on drmn0
lkpi_iicbb4: <LinuxKPI I2CBB> on drmn0
[drm] Radeon Display Connectors
[drm] Connector 0:
[drm]   VGA-1
[drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
[drm]   Encoders:
[drm]     CRT1: INTERNAL_KLDSCP_DAC1
[drm] Connector 1:
[drm]   LVDS-1
[drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 0x7e5c
[drm]   Encoders:
[drm]     LCD1: INTERNAL_LVTM1
[drm] Connector 2:
[drm]   SVIDEO-1
[drm]   Encoders:
[drm]     TV1: INTERNAL_KLDSCP_DAC2
[drm] Connector 3:
[drm]   DVI-I-1
[drm]   HPD1
[drm]   DDC: 0x7e60 0x7e60 0x7e64 0x7e64 0x7e68 0x7e68 0x7e6c 0x7e6c
[drm]   Encoders:
[drm]     DFP1: INTERNAL_KLDSCP_TMDS1
[drm] fb mappable at 0xE0040000
[drm] vram apper at 0xE0000000
[drm] size 4096000
[drm] fb depth is 24
[drm]    pitch is 5120
name=drmn0 flags=0x0 stride=5120 bpp=32
[drm] Initialized radeon 2.50.0 20080528 for drmn0 on minor 0

Note: see bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270563 about why "could not load firmware image 'radeon/R520_cp.bin'" comes up.
Comment 2 Emmanuel Vadot freebsd_committer freebsd_triage 2024-05-23 14:48:15 UTC
I don't understand, in #270563 you said that it hang with 13.X but worked with 12.4 and now you say that 13.2 worked here ?

Anyway, don't expect much help for this issue because :
1/ It's i386, no body cares about it
2/ It's radeonkms, no body cares about it

Cheers,
Comment 3 Lannig 2024-05-24 11:07:10 UTC
(In reply to Emmanuel Vadot from comment #2)
Thanks for your reply but you haven't read bug #270563 completely if you're asking.

- 12.4: no issue at all
- 13.2: X hangs if the R520 firmware is present and loaded, works OK otherwise (presumably without acceleration - I don't care)
- 13.3 : panics when radeonkms loads, unusable

As for the rest of your comment, well, that's quite helpful, thanks.

Guess I'll be back to Linux then, I wanted to give FreeBSD a chance on this old laptop in memory of the years I used FreeBSD extensively at an ISP I was working for.

The latest Debian 12 works flawlessly on this old notebook.
I still like FreeBSD more, but apparently it's hopeless then.
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2024-05-25 18:18:43 UTC
Created attachment 250955 [details]
patch-drivers_gpu_drm_radeon_radeon__device.c

If you're still interested you could try this patch.  It's an attempt to address the radeon_atombios_init error.  Put the file in /usr/ports/graphics/drm-510-kmod/files/ and rebuild the port.
Comment 5 Lannig 2024-05-31 11:23:27 UTC
Thanks, I'll try it.
FYI I just upgraded a HP Probook 6570B Core i5 machine (hence running FreeBSD/amd64 to 13.3-RELEASE and I have the same crash.
Don't know if I'm supposed to open another bug or if it's no use.
Comment 6 Lannig 2024-05-31 14:20:13 UTC
Still causes panic on my HP Probook 6570B when I load the module.
I'll open a different bug because I'm not sure it's the same exact issue here.
Since it's amd64, maybe I can hope for more attention.
Comment 7 Lannig 2024-05-31 14:39:11 UTC
Sorry for spamming.
Standby. I've just somehow managed to build a module that works on the PB 6570B (amd64 machine). Very confused.
This is without the patch, after updating my ports tree from "latest".
I will try to make sense out of this, try again on the older i386 machine and come back to comment.