FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

Asrock A300 barebone with AMD Ryzen 2400g #146

Open dcschmid opened 5 years ago

dcschmid commented 5 years ago

Hi, i try to load the drm-fbsd12.0-kmod on my Asrock A300 Barebone with the Ryzen 2400g CPU. when i try to load with kldload amdgpu the screen goes black and stay black.

I am on FreeBSD 12 p3. is it possible to get the graphic running without the scfb driver?

When i let i show dmesg per ssh access i see the following lines:

[drm] amdgpu kernel modesetting enabled. drmn0: on vgapci0 vgapci0: child drmn0 requested pci_enable_io vgapci0: child drmn0 requested pci_enable_io [drm] initializing kernel modesetting (RAVEN 0x1002:0x15DD 0x1002:0x15DD 0xC6). [drm] register mmio base: 0xFCB00000 [drm] register mmio size: 524288 [drm] PCI I/O BAR is not found. drmn0: successfully loaded firmware image with name: amdgpu/raven_gpu_info.bin [drm] probing gen 2 caps for device 1022:15db = 700d03/e [drm] probing mlw for device 1002:15dd = 400d03 [drm] VCN decode is enabled in VM mode [drm] VCN encode is enabled in VM mode [drm] BIOS signature incorrect 0 0 ATOM BIOS: 113-RAVEN-113 [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit drmn0: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used) drmn0: GTT: 1024M 0x000000F500000000 - 0x000000F53FFFFFFF Successfully added WC MTRR for [0xe0000000-0xefffffff]: 0; [drm] Detected VRAM RAM=2048M, BAR=256M [drm] RAM width 128bits UNKNOWN [TTM] Zone kernel: Available graphics memory: 15675500 kiB [TTM] Zone dma32: Available graphics memory: 2097152 kiB [TTM] Initializing pool allocator [drm] amdgpu: 2048M of VRAM memory ready [drm] amdgpu: 3072M of GTT memory ready. i_size_write unimplemented [drm] GART: num cpu pages 262144, num gpu pages 262144 [drm] PCIE GART of 1024M enabled (table at 0x000000F400800000). drmn0: successfully loaded firmware image with name: amdgpu/raven_asd.bin drmn0: successfully loaded firmware image with name: amdgpu/raven_pfp.bin drmn0: successfully loaded firmware image with name: amdgpu/raven_me.bin drmn0: successfully loaded firmware image with name: amdgpu/raven_ce.bin drmn0: successfully loaded firmware image with name: amdgpu/raven_rlc.bin drmn0: successfully loaded firmware image with name: amdgpu/raven_mec.bin drmn0: successfully loaded firmware image with name: amdgpu/raven_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/raven_sdma.bin [drm] use_doorbell being set to: [true] i_size_write unimplemented drmn0: successfully loaded firmware image with name: amdgpu/raven_vcn.bin [drm] Found VCN firmware Version: 1.73 Family ID: 18 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 HDMI-A-1: get mode from tunables: [drm] - kern.vt.fb.modes.HDMI-A-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] Supports vblank timestamp caching Rev 2 (21.10.2013). [drm] Driver supports precise vblank timestamp query. [drm:amdgpu_ring_write] amdgpu: writing more dwords to the ring than expected!

valpackett commented 5 years ago

Some people (including @johalun) have definitely had raven laptops work. The v4.16 "stable" driver that's packaged as drm-fbsd12.0-kmod is a bit too old for these laptops, bugs like this can happen.

Try the v5.0 driver

https://github.com/FreeBSDDesktop/kms-drm/tree/drm-v5.0

which currently still requires FreeBSD base from

https://github.com/FreeBSDDesktop/freebsd-base/tree/drm-v5.0

(the base changes are landing right now, so just upstream -CURRENT will be enough soon)

johalun commented 5 years ago

Soon! However, you'll need FreeBSD 12.1 (when released), 12-STABLE or 13-CURRENT.

dcschmid commented 5 years ago

I use 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 right now.

valpackett commented 5 years ago

If you want to try right now, you have to upgrade to -CURRENT (and even that fork of -CURRENT). Otherwise, wait for when 12-STABLE gets the required updates

dcschmid commented 5 years ago

I wait for the updates, i can live in the moment with scfb driver. But thanks for your information.

Crest commented 5 years ago

The moment the 2200G / 2400G is supported I need one as low power daily driver. Is there any note of supported (non-Intel) hardware in releases?

valpackett commented 5 years ago

AMD GPUs before Vega work fine in the release (v4.16). Desktop Vega sort of works sometimes in 4.16 too but I strongly recommend v5.0 for that as well (that's what I use).

dcschmid commented 4 years ago

When will be the new drivers will be released fir FreeBSD 12.1

valpackett commented 4 years ago

The existing code works, you just have to rebuild from ports instead of using the pkg repo. The discussion for solutions for pre-built binary packages is in #183.

dcschmid commented 4 years ago

So i must build drm-kmod and drm-fbsd12.0-kmod new (i will build it with poudriere) and then its works with the vega cpu?

valpackett commented 4 years ago

drm-kmod is a meta port, it contains nothing but a dependency on the appropriate version, you can just build drm-fbsd12.0-kmod. Make sure your poudriere thing has the /usr/src that matches your kernel.

dcschmid commented 4 years ago

I have try it but doesnt work with the vega GPU. So i must wait for the v5 release. Is there a timeline when it will be released fot FreeBSD 12.1.

zeising commented 4 years ago

There are still regressions for drm-kmod comparable to Linux 5.0. It hasn't yet been made the default on current, and there is no timeline for when, if ever, it will be made available for 12.1.

Currently we have to prioritize getting working drm packages for 12.1.

dcschmid commented 4 years ago

Okay i understand. then i must wait. :-(

zeising commented 4 years ago

https://github.com/FreeBSDDesktop/kms-drm/tree/drm-v5.0-fbsd12.1 contains a potential version bump for drm-kmod on FreeBSD 12.1. I don't know exactly which state it is in, but it is possible to clone the repository, check out that branch and hopefully build it. I don't know if it is in working order though.

dcschmid commented 4 years ago

okay i will try that when i am at home.

dcschmid commented 4 years ago

I try it, i cant compile the branch above. And from packages the gpu is not running. :.-(