Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screen disabled when loading radeonkms.ko with SUMO chip #66

Closed
Zirias opened this issue Mar 12, 2021 · 3 comments
Closed

screen disabled when loading radeonkms.ko with SUMO chip #66

Zirias opened this issue Mar 12, 2021 · 3 comments

Comments

@Zirias
Copy link

Zirias commented Mar 12, 2021

Describe the bug
Loading radeonkms.ko disables the screen with error message [drm] Cannot find any crtc or sizes

FreeBSD version
FreeBSD 13.0-RC2 #11 releng/13.0-n244684-13c22f74953: Fri Mar 12 09:49:28 CET 2021

PCI Info

pciconf -lv

hostb0@pci0:0:0:0: class=0x060000 card=0x17051849 chip=0x17051022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h Processor Root Complex'
class = bridge
subclass = HOST-PCI
vgapci0@pci0:0:1:0: class=0x030000 card=0x96401849 chip=0x964a1002 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Sumo [Radeon HD 6530D]'
class = display
subclass = VGA
hdac0@pci0:0:1:1: class=0x040300 card=0x17141849 chip=0x17141002 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]'
class = multimedia
subclass = HDA
pcib1@pci0:0:4:0: class=0x060400 card=0x12341022 chip=0x17091022 rev=0x00 hdr=0x01
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h Processor Root Port'
class = bridge
subclass = PCI-PCI
xhci0@pci0:0:16:0: class=0x0c0330 card=0x78121849 chip=0x78121022 rev=0x03 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB XHCI Controller'
class = serial bus
subclass = USB
xhci1@pci0:0:16:1: class=0x0c0330 card=0x78121849 chip=0x78121022 rev=0x03 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB XHCI Controller'
class = serial bus
subclass = USB
ahci0@pci0:0:17:0: class=0x010601 card=0x78001849 chip=0x78011022 rev=0x40 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH SATA Controller [AHCI mode]'
class = mass storage
subclass = SATA
ohci0@pci0:0:18:0: class=0x0c0310 card=0x78071849 chip=0x78071022 rev=0x11 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB OHCI Controller'
class = serial bus
subclass = USB
ehci0@pci0:0:18:2: class=0x0c0320 card=0x78081849 chip=0x78081022 rev=0x11 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB EHCI Controller'
class = serial bus
subclass = USB
ohci1@pci0:0:19:0: class=0x0c0310 card=0x78071849 chip=0x78071022 rev=0x11 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB OHCI Controller'
class = serial bus
subclass = USB
ehci1@pci0:0:19:2: class=0x0c0320 card=0x78081849 chip=0x78081022 rev=0x11 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB EHCI Controller'
class = serial bus
subclass = USB
intsmb0@pci0:0:20:0: class=0x0c0500 card=0x780b1849 chip=0x780b1022 rev=0x13 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH SMBus Controller'
class = serial bus
subclass = SMBus
atapci0@pci0:0:20:1: class=0x01018a card=0x780c1849 chip=0x780c1022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH IDE Controller'
class = mass storage
subclass = ATA
hdac1@pci0:0:20:2: class=0x040300 card=0x88921849 chip=0x780d1022 rev=0x01 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH Azalia Controller'
class = multimedia
subclass = HDA
isab0@pci0:0:20:3: class=0x060100 card=0x780e1849 chip=0x780e1022 rev=0x11 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH LPC Bridge'
class = bridge
subclass = PCI-ISA
pcib2@pci0:0:20:4: class=0x060401 card=0x00000000 chip=0x780f1022 rev=0x40 hdr=0x01
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH PCI Bridge'
class = bridge
subclass = PCI-PCI
ohci2@pci0:0:20:5: class=0x0c0310 card=0x78091849 chip=0x78091022 rev=0x11 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH USB OHCI Controller'
class = serial bus
subclass = USB
pcib3@pci0:0:21:0: class=0x060400 card=0x00001022 chip=0x43a01022 rev=0x00 hdr=0x01
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Hudson PCI to PCI bridge (PCIE port 0)'
class = bridge
subclass = PCI-PCI
pcib4@pci0:0:21:3: class=0x060400 card=0x00001022 chip=0x43a31022 rev=0x00 hdr=0x01
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Hudson PCI to PCI bridge (PCIE port 3)'
class = bridge
subclass = PCI-PCI
hostb1@pci0:0:24:0: class=0x060000 card=0x00000000 chip=0x17001022 rev=0x43 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 0'
class = bridge
subclass = HOST-PCI
hostb2@pci0:0:24:1: class=0x060000 card=0x00000000 chip=0x17011022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 1'
class = bridge
subclass = HOST-PCI
hostb3@pci0:0:24:2: class=0x060000 card=0x00000000 chip=0x17021022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 2'
class = bridge
subclass = HOST-PCI
hostb4@pci0:0:24:3: class=0x060000 card=0x00000000 chip=0x17031022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 3'
class = bridge
subclass = HOST-PCI
hostb5@pci0:0:24:4: class=0x060000 card=0x00000000 chip=0x17041022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 4'
class = bridge
subclass = HOST-PCI
hostb6@pci0:0:24:5: class=0x060000 card=0x00000000 chip=0x17181022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 6'
class = bridge
subclass = HOST-PCI
hostb7@pci0:0:24:6: class=0x060000 card=0x00000000 chip=0x17161022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 5'
class = bridge
subclass = HOST-PCI
hostb8@pci0:0:24:7: class=0x060000 card=0x00000000 chip=0x17191022 rev=0x00 hdr=0x00
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 12h/14h Processor Function 7'
class = bridge
subclass = HOST-PCI
none0@pci0:1:0:0: class=0x048000 card=0x00016902 chip=0x6178544d rev=0x00 hdr=0x00
vendor = 'TBS Technologies'
device = 'DVB Tuner PCIe Card'
class = multimedia
re0@pci0:4:0:0: class=0x020000 card=0x81681849 chip=0x816810ec rev=0x06 hdr=0x00
vendor = 'Realtek Semiconductor Co., Ltd.'
device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
class = network
subclass = ethernet

DRM KMOD version
drm-fbsd13-kmod 5.4.92.g20210202

To Reproduce
kldload radeonkms

Additional context
I had the same problem already with drm-fbsd12.0-kmod on any 12.x RELEASE, see also FreeBSD PR #237223.

Back then, I tried building a branch using DRM from Linux 5.0, which successfully set the mode on the console at least, see this issue: FreeBSDDesktop/kms-drm#195 -- so I assumed the problem would be gone with newer DRM versions.

For 12.x, my workaround was to still use drm-fbsd11.2-kmod (which built and worked with just minor modifications). Unfortunately, it doesn't build any more on 13, so I'm at a dead end here.

Here's the log from loading radeonkms.ko on 13.0-RC2:

Mar 12 13:06:36 nexus kernel: [drm] radeon kernel modesetting enabled.
Mar 12 13:06:36 nexus kernel: drmn0: <drmn> on vgapci0
Mar 12 13:06:36 nexus kernel: vgapci0: child drmn0 requested pci_enable_io
Mar 12 13:06:36 nexus syslogd: last message repeated 1 times
Mar 12 13:06:37 nexus kernel: sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
Mar 12 13:06:37 nexus kernel: [drm] initializing kernel modesetting (SUMO 0x1002:0x964A 0x1849:0x9640 0x00).
Mar 12 13:06:37 nexus kernel: [drm ERROR :radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
Mar 12 13:06:37 nexus kernel: ATOM BIOS: General
Mar 12 13:06:37 nexus kernel: drmn0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
Mar 12 13:06:37 nexus kernel: drmn0: GTT: 1024M 0x0000000010000000 - 0x000000004FFFFFFF
Mar 12 13:06:37 nexus kernel: Failed to add WC MTRR for [0xc0000000-0xcfffffff]: -22; performance may suffer
Mar 12 13:06:37 nexus kernel: [drm] Detected VRAM RAM=256M, BAR=256M
Mar 12 13:06:37 nexus kernel: [drm] RAM width 32bits DDR
Mar 12 13:06:37 nexus kernel: [TTM] Zone  kernel: Available graphics memory: 4031846 KiB
Mar 12 13:06:37 nexus kernel: [TTM] Zone   dma32: Available graphics memory: 2097152 KiB
Mar 12 13:06:37 nexus kernel: [TTM] Initializing pool allocator
Mar 12 13:06:37 nexus kernel: [drm] radeon: 256M of VRAM memory ready
Mar 12 13:06:37 nexus kernel: [drm] radeon: 1024M of GTT memory ready.
Mar 12 13:06:37 nexus kernel: [drm] Loading SUMO Microcode
Mar 12 13:06:37 nexus kernel: drmn0: successfully loaded firmware image 'radeon/SUMO_pfp.bin'
Mar 12 13:06:37 nexus kernel: drmn0: successfully loaded firmware image 'radeon/SUMO_me.bin'
Mar 12 13:06:37 nexus kernel: drmn0: successfully loaded firmware image 'radeon/SUMO_rlc.bin'
Mar 12 13:06:37 nexus kernel: [drm] Internal thermal controller without fan control
Mar 12 13:06:37 nexus kernel: [drm] Found smc ucode version: 0x00011200
Mar 12 13:06:37 nexus kernel: [drm] radeon: dpm initialized
Mar 12 13:06:37 nexus kernel: drmn0: successfully loaded firmware image 'radeon/SUMO_uvd.bin'
Mar 12 13:06:37 nexus kernel: [drm] GART: num cpu pages 262144, num gpu pages 262144
Mar 12 13:06:37 nexus kernel: [drm] PCIE GART of 1024M enabled (table at 0x0000000000162000).
Mar 12 13:06:37 nexus kernel: drmn0: WB enabled
Mar 12 13:06:37 nexus kernel: drmn0: fence driver on ring 0 use gpu addr 0x0000000010000c00 and cpu addr 0x0xfffff800364d1c00
Mar 12 13:06:37 nexus kernel: drmn0: fence driver on ring 3 use gpu addr 0x0000000010000c0c and cpu addr 0x0xfffff800364d1c0c
Mar 12 13:06:37 nexus kernel: drmn0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0x0xfffff800c0072118
Mar 12 13:06:37 nexus kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Mar 12 13:06:37 nexus kernel: [drm] Driver supports precise vblank timestamp query.
Mar 12 13:06:37 nexus kernel: drmn0: radeon: MSI limited to 32-bit
Mar 12 13:06:37 nexus kernel: drmn0: radeon: using MSI.
Mar 12 13:06:37 nexus kernel: [drm] radeon: irq initialized.
Mar 12 13:06:37 nexus kernel: [drm] ring test on 0 succeeded in 2 usecs
Mar 12 13:06:37 nexus kernel: [drm] ring test on 3 succeeded in 3 usecs
Mar 12 13:06:37 nexus kernel: [drm] ring test on 5 succeeded in 1 usecs
Mar 12 13:06:37 nexus kernel: [drm] UVD initialized successfully.
Mar 12 13:06:37 nexus kernel: [drm] ib test on ring 0 succeeded in 0 usecs
Mar 12 13:06:37 nexus kernel: [drm] ib test on ring 3 succeeded in 0 usecs
Mar 12 13:06:37 nexus kernel: [drm] ib test on ring 5 succeeded
Mar 12 13:06:37 nexus kernel: [drm] Connector DVI-D-1: get mode from tunables:
Mar 12 13:06:37 nexus kernel: [drm]   - kern.vt.fb.modes.DVI-D-1
Mar 12 13:06:37 nexus kernel: [drm]   - kern.vt.fb.default_mode
Mar 12 13:06:37 nexus kernel: [drm] Connector DVI-D-2: get mode from tunables:
Mar 12 13:06:37 nexus kernel: [drm]   - kern.vt.fb.modes.DVI-D-2
Mar 12 13:06:37 nexus kernel: [drm]   - kern.vt.fb.default_mode
Mar 12 13:06:37 nexus kernel: [drm] Radeon Display Connectors
Mar 12 13:06:37 nexus kernel: [drm] Connector 0:
Mar 12 13:06:37 nexus kernel: [drm]   DVI-D-1
Mar 12 13:06:37 nexus kernel: [drm]   HPD2
Mar 12 13:06:37 nexus kernel: [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
Mar 12 13:06:37 nexus kernel: [drm]   Encoders:
Mar 12 13:06:37 nexus kernel: [drm]     DFP2: INTERNAL_UNIPHY2
Mar 12 13:06:37 nexus kernel: [drm] Connector 1:
Mar 12 13:06:37 nexus kernel: [drm]   DVI-D-2
Mar 12 13:06:37 nexus kernel: [drm]   HPD1
Mar 12 13:06:37 nexus kernel: [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
Mar 12 13:06:37 nexus kernel: [drm]   Encoders:
Mar 12 13:06:37 nexus kernel: [drm]     DFP1: INTERNAL_UNIPHY2
Mar 12 13:06:37 nexus kernel: [drm] Cannot find any crtc or sizes
Mar 12 13:06:37 nexus kernel: [drm] Initialized radeon 2.50.0 20080528 for drmn0 on minor 0
Mar 12 13:06:39 nexus kernel: [drm] Cannot find any crtc or sizes

For comparison, here's the log when loading radeonkms.ko from drm-fbsd11.2-kmod on FreeBSD 12.2-RELEASE-p3:

Mar 12 14:13:32 nexus kernel: [drm] radeon kernel modesetting enabled.
Mar 12 14:13:32 nexus kernel: drmn0: <drmn> on vgapci0
Mar 12 14:13:32 nexus kernel: vgapci0: child drmn0 requested pci_enable_io
Mar 12 14:13:32 nexus syslogd: last message repeated 1 times
Mar 12 14:13:32 nexus kernel: [drm] initializing kernel modesetting (SUMO 0x1002:0x964A 0x1849:0x9640 0x00).
Mar 12 14:13:32 nexus kernel: [drm] register mmio base: 0xFEB00000
Mar 12 14:13:32 nexus kernel: [drm] register mmio size: 262144
Mar 12 14:13:32 nexus kernel: [drm:radeon_device_init] Unable to find PCI I/O BAR
Mar 12 14:13:32 nexus kernel: [drm:radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
Mar 12 14:13:32 nexus kernel: ATOM BIOS: General
Mar 12 14:13:32 nexus kernel: drmn0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
Mar 12 14:13:32 nexus kernel: drmn0: GTT: 1024M 0x0000000010000000 - 0x000000004FFFFFFF
Mar 12 14:13:32 nexus kernel: Failed to add WC MTRR for [0xc0000000-0xcfffffff]: -22; performance may suffer
Mar 12 14:13:32 nexus kernel: [drm] Detected VRAM RAM=256M, BAR=256M
Mar 12 14:13:32 nexus kernel: [drm] RAM width 32bits DDR
Mar 12 14:13:32 nexus kernel: [TTM] Zone  kernel: Available graphics memory: 4030824 kiB
Mar 12 14:13:32 nexus kernel: [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
Mar 12 14:13:32 nexus kernel: [TTM] Initializing pool allocator
Mar 12 14:13:32 nexus kernel: [drm] radeon: 256M of VRAM memory ready
Mar 12 14:13:32 nexus kernel: [drm] radeon: 1024M of GTT memory ready.
Mar 12 14:13:32 nexus kernel: [drm] Loading SUMO Microcode
Mar 12 14:13:32 nexus kernel: radeon/SUMO_pfp.bin: could not load firmware image, error 2
Mar 12 14:13:32 nexus syslogd: last message repeated 2 times
Mar 12 14:13:32 nexus kernel: radeon/SUMO_me.bin: could not load firmware image, error 2
Mar 12 14:13:32 nexus syslogd: last message repeated 2 times
Mar 12 14:13:32 nexus kernel: radeon/SUMO_rlc.bin: could not load firmware image, error 2
Mar 12 14:13:32 nexus syslogd: last message repeated 2 times
Mar 12 14:13:32 nexus kernel: [drm] Internal thermal controller without fan control
Mar 12 14:13:32 nexus kernel: [drm] Found smc ucode version: 0x00011200
Mar 12 14:13:32 nexus kernel: [drm] radeon: dpm initialized
Mar 12 14:13:32 nexus kernel: radeon/SUMO_uvd.bin: could not load firmware image, error 2
Mar 12 14:13:32 nexus syslogd: last message repeated 2 times
Mar 12 14:13:32 nexus kernel: [drm] GART: num cpu pages 262144, num gpu pages 262144
Mar 12 14:13:32 nexus kernel: [drm] PCIE GART of 1024M enabled (table at 0x0000000000162000).
Mar 12 14:13:32 nexus kernel: drmn0: WB enabled
Mar 12 14:13:32 nexus kernel: drmn0: fence driver on ring 0 use gpu addr 0x0000000010000c00 and cpu addr 0x0xfffff800152e1c00
Mar 12 14:13:32 nexus kernel: drmn0: fence driver on ring 3 use gpu addr 0x0000000010000c0c and cpu addr 0x0xfffff800152e1c0c
Mar 12 14:13:32 nexus kernel: drmn0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0x0xfffff800c0072118
Mar 12 14:13:32 nexus kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Mar 12 14:13:32 nexus kernel: [drm] Driver supports precise vblank timestamp query.
Mar 12 14:13:32 nexus kernel: drmn0: radeon: MSI limited to 32-bit
Mar 12 14:13:32 nexus kernel: [drm] radeon: irq initialized.
Mar 12 14:13:32 nexus kernel: [drm] ring test on 0 succeeded in 1 usecs
Mar 12 14:13:32 nexus kernel: [drm] ring test on 3 succeeded in 3 usecs
Mar 12 14:13:32 nexus kernel: [drm] ring test on 5 succeeded in 1 usecs
Mar 12 14:13:32 nexus kernel: [drm] UVD initialized successfully.
Mar 12 14:13:32 nexus kernel: [drm] ib test on ring 0 succeeded in 0 usecs
Mar 12 14:13:32 nexus kernel: [drm] ib test on ring 3 succeeded in 0 usecs
Mar 12 14:13:32 nexus kernel: [drm] ib test on ring 5 succeeded
Mar 12 14:13:32 nexus kernel: [drm] hw_i2c forced on, you may experience display detection problems!
Mar 12 14:13:32 nexus kernel: [drm] Connector DVI-D-1: get mode from tunables:
Mar 12 14:13:32 nexus kernel: [drm]   - kern.vt.fb.modes.DVI-D-1
Mar 12 14:13:32 nexus kernel: [drm]   - kern.vt.fb.default_mode
Mar 12 14:13:32 nexus kernel: [drm] Connector DVI-D-2: get mode from tunables:
Mar 12 14:13:32 nexus kernel: [drm]   - kern.vt.fb.modes.DVI-D-2
Mar 12 14:13:32 nexus kernel: [drm]   - kern.vt.fb.default_mode
Mar 12 14:13:32 nexus kernel: [drm] Radeon Display Connectors
Mar 12 14:13:32 nexus kernel: [drm] Connector 0:
Mar 12 14:13:32 nexus kernel: [drm]   DVI-D-1
Mar 12 14:13:32 nexus kernel: [drm]   HPD2
Mar 12 14:13:32 nexus kernel: [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
Mar 12 14:13:32 nexus kernel: [drm]   Encoders:
Mar 12 14:13:32 nexus kernel: [drm]     DFP2: INTERNAL_UNIPHY2
Mar 12 14:13:32 nexus kernel: [drm] Connector 1:
Mar 12 14:13:32 nexus kernel: [drm]   DVI-D-2
Mar 12 14:13:32 nexus kernel: [drm]   HPD1
Mar 12 14:13:32 nexus kernel: [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
Mar 12 14:13:32 nexus kernel: [drm]   Encoders:
Mar 12 14:13:32 nexus kernel: [drm]     DFP1: INTERNAL_UNIPHY2
Mar 12 14:13:32 nexus kernel: [drm] fb mappable at 0xC0366000
Mar 12 14:13:32 nexus kernel: [drm] vram apper at 0xC0000000
Mar 12 14:13:32 nexus kernel: [drm] size 7299072
Mar 12 14:13:32 nexus kernel: [drm] fb depth is 24
Mar 12 14:13:32 nexus kernel: [drm]    pitch is 6912
Mar 12 14:13:32 nexus kernel: VT: Replacing driver "vga" with new "fb".

It's interesting that it always complains about not being able to load firmware…

@evadot
Copy link
Contributor

evadot commented Mar 12, 2021

Could you before loading the module do :
kenv hw.dri.drm_debug=0xffffffff
And post the dmesg, it might contain more info.
Same thing with 12.2 but replace the hw.dri.drm_debug by dev.drm.drm_debug

Thanks.

@Zirias
Copy link
Author

Zirias commented Mar 12, 2021

Well, this didn't give any more output as far as I could see, but it made me yet another time look very closely at the logs, and this time I noticed this peculiarity from the log of the old, working version:
[drm] hw_i2c forced on, you may experience display detection problems!

So, I tried setting hw.radeonkms.hw_i2c=1 and ... it works! – the option warning about possible display detection problems makes display detection work here…

Now, is this still considered a bug? I'm fine with just closing it (and pretty happy).

@evadot
Copy link
Contributor

evadot commented Apr 19, 2021

We default to hw_i2c=0 in 2e424b6
So there seems to be case where 1 is better and some others when 0 is better ...
Nothing much I can do about that, especially since radeon isn't really maintained either here or upstream.

@evadot evadot closed this as completed Apr 19, 2021
lutzbichler pushed a commit to lutzbichler/drm-kmod that referenced this issue Oct 6, 2024
…otg master

When booting the system with DCN401, the driver adds the following dmesg
warning:

WARNING: CPU: 8 PID: 175 at
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1923
resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu]

Modules linked in: amdgpu(+) hid_generic amdxcp i2c_algo_bit
drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper drm_buddy
drm_display_helper drm_kms_helper usbhid hid drm i2c_piix4 ahci igc
libahci video wmi

CPU: 8 PID: 175 Comm: systemd-udevd Not tainted 6.8.0-EXTRA-PROMO-MAY-29+ freebsd#66
Hardware name: ASUS System Product Name/TUF GAMING X570-PRO (WI-FI),
BIOS 4021 08/10/2021

RIP: 0010:resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu]
Code: 8b 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 0f 1f 44 00 00 55 48 83 bf f8 07 00 00 00 48 89 e5 74 0c <0f> 0b 31
f6 89 f0 5d e9 0c 65 01 e5 48 83 bf e0 07 00 00 00 75 ea

RSP: 0018:ffffa5f000816ed8 EFLAGS: 00010246
[...]
PKRU: 55555554
Call Trace:
 <TASK>
 ? show_regs+0x65/0x70
 ? __warn+0x85/0x160
 ? resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu]
 ? report_bug+0x192/0x1c0
 ? handle_bug+0x44/0x90
 ? exc_invalid_op+0x18/0x70
[...]

This warning is triggered by a check in the function
resource_get_opp_heads_for_otg_master that validates if the request
operation is in a master OTG pipe; if not, the warning above is
displayed. In other words, another part of the code might be calling
this function in a non-OTG master pipe context, resulting in the log
message.

The reason the ASSERT was triggered is that the current state wasn't
updated after applying the context to the hardware. This means that the
update_dsc_for_odm_change might be called from a non-OTG-MASTER. To
prevent this, it's crucial to check if the current reference is pointing
to an OTG master before operate in the old OTG master reference. If it's
not, the function must set the old OTG reference to NULL and avoid
calling resource_get_opp_heads_for_otg_master before the context is
updated.

Reviewed-by: Wenjing Liu <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Co-developed-by: Wenjing Liu <[email protected]>
Signed-off-by: Wenjing Liu <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
lutzbichler pushed a commit to lutzbichler/drm-kmod that referenced this issue Nov 9, 2024
…otg master

When booting the system with DCN401, the driver adds the following dmesg
warning:

WARNING: CPU: 8 PID: 175 at
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1923
resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu]

Modules linked in: amdgpu(+) hid_generic amdxcp i2c_algo_bit
drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper drm_buddy
drm_display_helper drm_kms_helper usbhid hid drm i2c_piix4 ahci igc
libahci video wmi

CPU: 8 PID: 175 Comm: systemd-udevd Not tainted 6.8.0-EXTRA-PROMO-MAY-29+ freebsd#66
Hardware name: ASUS System Product Name/TUF GAMING X570-PRO (WI-FI),
BIOS 4021 08/10/2021

RIP: 0010:resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu]
Code: 8b 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 0f 1f 44 00 00 55 48 83 bf f8 07 00 00 00 48 89 e5 74 0c <0f> 0b 31
f6 89 f0 5d e9 0c 65 01 e5 48 83 bf e0 07 00 00 00 75 ea

RSP: 0018:ffffa5f000816ed8 EFLAGS: 00010246
[...]
PKRU: 55555554
Call Trace:
 <TASK>
 ? show_regs+0x65/0x70
 ? __warn+0x85/0x160
 ? resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu]
 ? report_bug+0x192/0x1c0
 ? handle_bug+0x44/0x90
 ? exc_invalid_op+0x18/0x70
[...]

This warning is triggered by a check in the function
resource_get_opp_heads_for_otg_master that validates if the request
operation is in a master OTG pipe; if not, the warning above is
displayed. In other words, another part of the code might be calling
this function in a non-OTG master pipe context, resulting in the log
message.

The reason the ASSERT was triggered is that the current state wasn't
updated after applying the context to the hardware. This means that the
update_dsc_for_odm_change might be called from a non-OTG-MASTER. To
prevent this, it's crucial to check if the current reference is pointing
to an OTG master before operate in the old OTG master reference. If it's
not, the function must set the old OTG reference to NULL and avoid
calling resource_get_opp_heads_for_otg_master before the context is
updated.

Reviewed-by: Wenjing Liu <[email protected]>
Acked-by: Hamza Mahfooz <[email protected]>
Co-developed-by: Wenjing Liu <[email protected]>
Signed-off-by: Wenjing Liu <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants