drm-kmod: AMD Ryzen Vega 8?

Grzegorz Junka list1 at gjunka.com
Mon Aug 5 18:19:23 UTC 2019


On 05/08/2019 16:21, Greg V wrote:
> On August 5, 2019 6:39:07 PM GMT+03:00, Grzegorz Junka<list1 at gjunka.com>  wrote:
>> Uh, OK. I understood the problem was with the efi loader (BOOTX64.efi)
>> and that the file was updated.
> Interesting. I don't recall anything about that in the commits. Though ACPI/EFI/etc related memory mapping improvements happened very very recently. I'll retest once again.
>
>> I don't use grub.
> That (and the above) gives me an idea… I'll try grub :)


I wrote that I do not use grub, right? :)


>> Please don't tell me I am so lucky to have two different systems setup
>> in a way that didn't supposed to work :)
> The issue never affected i915! So your laptop was supposed to work.


All right, but when I have "amdgpu" in rc.conf it also doesn't panic, 
error or do anything stupid. I see the console output all the way through.

vgapci0: <VGA-compatible display> port 0xe000-0xe0ff mem 
0xa0000000-0xafffffff,0xb0000000-0xb01fffff,0xec400000-0xec43ffff at 
device 0.0 on pci1
vgapci1: <VGA-compatible display> port 0xf000-0xf03f mem 
0xeb000000-0xebffffff,0x2fa0000000-0x2fafffffff at device 2.0 on pci0
vgapci1: Boot video device
pci0: <old, non-VGA display device> at device 19.0 (no driver attached)
(...)
[drm] amdgpu kernel modesetting enabled.

It's only that afterwards it doesn't work (see below). I think the 
amdgpu module loads but fails to initialize the graphics card since 
after that I don't see any other drm messages. I am getting the same 
message ([drm] amdgpu kernel modesetting enabled.) when I try to load 
amdgpu manually from the command line after the system is fully booted 
("kldload amdgpu").


>> What's PRIME?
> The modern way of passing GPU buffers around, used by DRI3 and Wayland-EGL. The name is a reference to Optimus Prime, because Nvidia's dual GPU laptop system is called Optimus.
>
>> complained that the framebuffer couldn't be
>> found
>> if "admgpu" was loaded.
> Interesting. What is the error exactly? What is the exact GPU/laptop model? Does google find reports of the same error on Linux?
>

g at xps:/home/g # startx
xauth:  file /home/g/.serverauth.1821 does not exist


X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 12.0-RELEASE-p5 amd64
Current Operating System: FreeBSD xps.yoonka.com 12.0-RELEASE FreeBSD 
12.0-RELEASE r341666 GENERIC amd64
Build Date: 25 May 2019  06:25:00AM

Current version of pixman: 0.34.0
         Before reporting problems, check http://wiki.x.org
         to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
         (++) from command line, (!!) notice, (II) informational,
         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Aug  5 17:45:56 2019
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
scfb trace: probe start
scfb trace: probe done
(EE)
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs for all 
framebuffer devices
(EE)
(EE)
Please consult the The X.Org Foundation support
          at http://wiki.x.org
  for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for 
additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error



g at xps:/home/g # sway
2019-08-05 17:46:23 - [backend/session/direct-freebsd.c:48] Failed to 
open /dev/drm/0: Operation not supported by device
2019-08-05 17:46:23 - [backend/session/session.c:270] Unable to open 
/dev/drm/0 as DRM device
2019-08-05 17:46:23 - [backend/backend.c:339] Failed to open any DRM device
2019-08-05 17:46:23 - [sway/server.c:47] Unable to create backend


If rc.conf contains 'kld_list="/boot/modules/i915kms.ko"' instead of 
"amdgpu" then the output is:


vgapci0: <VGA-compatible display> port 0xe000-0xe0ff mem 
0xa0000000-0xafffffff,0xb0000000-0xb01fffff,0xec400000-0xec43ffff at 
device 0.0 on pci1
vgapci1: <VGA-compatible display> port 0xf000-0xf03f mem 
0xeb000000-0xebffffff,0x2fa0000000-0x2fafffffff at device 2.0 on pci0
vgapci1: Boot video device
pci0: <old, non-VGA display device> at device 19.0 (no driver attached)
(...)
drmn1: <drmn> on vgapci1
vgapci1: child drmn1 requested pci_enable_io
vgapci1: child drmn1 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be 
disabled(-19).
Failed to add WC MTRR for [0x2fa0000000-0x2fafffffff]: -22; performance 
may suffer
[drm] Got stolen memory base 0x4a800000, size 0x4000000
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] Connector eDP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.eDP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-3
[drm]   - kern.vt.fb.default_mode
[drm] Initialized i915 1.6.0 20171222 for drmn1 on minor 0
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=2160 width=3840 depth=32
cmsize=16 size=33177600
pbase=0x2fa0040000 vbase=0xfffffe008d240000
name=drmn1 flags=0x0 stride=15360 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn1: fb0: inteldrmfb frame buffer device
lo0: link state changed to UP
drmn1: successfully loaded firmware image with name: 
i915/kbl_dmc_ver1_04.bin
[drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)


I also checked the output on my desktop:


vgapci0: <VGA-compatible display> port 0xf000-0xf0ff mem 
0xe0000000-0xefffffff,0xf0000000-0xf01fffff,0xfd100000-0xfd17ffff irq 54 
at device 0.0 on pci16
vgapci0: Boot video device
(...)
[drm] amdgpu kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] initializing kernel modesetting (VEGA10 0x1002:0x687F 
0x1002:0x0B36 0xC0).
[drm] register mmio base: 0xFD100000
[drm] register mmio size: 524288
[drm] PCI I/O BAR is not found.
drmn0: successfully loaded firmware image with name: 
amdgpu/vega10_gpu_info.bin
[drm] probing gen 2 caps for device 1022:1471 = 700d03/e
[drm] probing mlw for device 1002:687f = 400d03
[drm] UVD is enabled in VM mode
[drm] UVD ENC is enabled in VM mode
[drm] VCE enabled in VM mode
ATOM BIOS: 113-D0500500-104
[drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size 
is 9-bit
drmn0: VRAM: 8176M 0x000000F400000000 - 0x000000F5FEFFFFFF (8176M used)
drmn0: GTT: 256M 0x000000F600000000 - 0x000000F60FFFFFFF
Successfully added WC MTRR for [0xe0000000-0xefffffff]: 0;
[drm] Detected VRAM RAM=8176M, BAR=256M
[drm] RAM width 2048bits HBM
[TTM] Zone  kernel: Available graphics memory: 33495516 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[drm] amdgpu: 8176M of VRAM memory ready
[drm] amdgpu: 8176M of GTT memory ready.
i_size_write unimplemented
[drm] GART: num cpu pages 65536, num gpu pages 65536
[drm] PCIE GART of 256M enabled (table at 0x000000F400800000).
drmn0: successfully loaded firmware image with name: amdgpu/vega10_sos.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_asd.bin
drmn0: successfully loaded firmware image with name: 
amdgpu/vega10_acg_smc.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_pfp.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_me.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_ce.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_rlc.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_mec.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_mec2.bin
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/vega10_sdma.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_sdma1.bin
[drm] use_doorbell being set to: [true]
i_size_write unimplemented
[drm] use_doorbell being set to: [true]
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/vega10_uvd.bin
[drm] Found UVD firmware Version: 1.87 Family ID: 17
[drm] PSP loading UVD firmware
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/vega10_vce.bin
[drm] Found VCE firmware Version: 55.3 Binary ID: 4
[drm] PSP loading VCE firmware
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
[drm] Display Core initialized with v3.1.27!
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-3
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] UVD and UVD ENC initialized successfully.
[drm] VCE initialized successfully.
[drm] fb mappable at 0xE0F00000
[drm] vram apper at 0xE0000000
[drm] size 24576000
[drm] fb depth is 24
[drm]    pitch is 15360
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=1600 width=3840 depth=32
cmsize=16 size=24576000
pbase=0xe0f00000 vbase=0xfffff800e0f00000
name=drmn0 flags=0x0 stride=15360 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: amdgpudrmfb frame buffer device
i_size_write unimplemented
drmn0: ring 0(gfx) uses VM inv eng 4 on hub 0
drmn0: ring 1(comp_1.0.0) uses VM inv eng 5 on hub 0
drmn0: ring 2(comp_1.1.0) uses VM inv eng 6 on hub 0
drmn0: ring 3(comp_1.2.0) uses VM inv eng 7 on hub 0
drmn0: ring 4(comp_1.3.0) uses VM inv eng 8 on hub 0
drmn0: ring 5(comp_1.0.1) uses VM inv eng 9 on hub 0
drmn0: ring 6(comp_1.1.1) uses VM inv eng 10 on hub 0
drmn0: ring 7(comp_1.2.1) uses VM inv eng 11 on hub 0
drmn0: ring 8(comp_1.3.1) uses VM inv eng 12 on hub 0
drmn0: ring 9(kiq_2.1.0) uses VM inv eng 13 on hub 0
drmn0: ring 10(sdma0) uses VM inv eng 4 on hub 1
drmn0: ring 11(sdma1) uses VM inv eng 5 on hub 1
drmn0: ring 12(uvd) uses VM inv eng 6 on hub 1
drmn0: ring 13(uvd_enc0) uses VM inv eng 7 on hub 1
drmn0: ring 14(uvd_enc1) uses VM inv eng 8 on hub 1
drmn0: ring 15(vce0) uses VM inv eng 9 on hub 1
drmn0: ring 16(vce1) uses VM inv eng 10 on hub 1
drmn0: ring 17(vce2) uses VM inv eng 11 on hub 1
[drm] ECC is not present.
[drm] Initialized amdgpu 3.23.0 20150101 for drmn0 on minor 0


After EFI loader I see the console output all the time, but after the 
last "drmn0: successfully loaded firmware image with name" I see a 
message, something about switching the framebuffer (not visible in 
dmesg) and then the screen flickers and the resolution changes. After 
that the boot continues and I see the remaining messages copied above, 
up to the login prompt.

The laptop is Dell XPS 15 2-in-1. I didn't look for similar Linux error 
messages as I assumed it's because drm-kmod isn't able to initialize the 
secondary graphics card. BTW Manjaro works fine on this laptop with full 
graphics support.

GrzegorzJ





More information about the freebsd-x11 mailing list