Re: KMS does not work on MSI B350M MORTAR with AMD Ryzen 3 2200g

From: Paul Menzel
Date: Mon Jul 16 2018 - 18:00:21 EST


Dear Alex,


Thank you for your response.

Am 16.07.2018 um 18:30 schrieb Alex Deucher:
On Mon, Jul 16, 2018 at 12:14 PM, Paul Menzel
<pmenzel+amd-gfx@xxxxxxxxxxxxx> wrote:
Dear Linux folks,


Trying to boot Debian Buster/testing with Linux 4.16.16 on a MSI B350M MORTAR [1]
with a Ryzen 3 2200g and a monitor connected over HDMI, when kernel mode setting
(KMS) is enabled the monitor does not receive any updates, that means I do not
see the login prompt and only the Linux and systemd service messages from before.
The system seems to running though.

Debianâs package *firmware-amd-graphics* [2] is from August 2017 and therefore
outdated. I manually installed the firmware files from the Linux firmware
repository [3].

Here is the log.

```
Jul 16 17:54:39 tokeiihto kernel: [ 25.652026] [drm] BIOS signature incorrect 0 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.652058] ATOM BIOS: 113-RAVEN-106
Jul 16 17:54:39 tokeiihto kernel: [ 25.652096] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
Jul 16 17:54:39 tokeiihto kernel: [ 25.652107] amdgpu 0000:38:00.0: VRAM: 1024M 0x000000F400000000 - 0x000000F43FFFFFFF (1024M used)
Jul 16 17:54:39 tokeiihto kernel: [ 25.652109] amdgpu 0000:38:00.0: GTT: 1024M 0x000000F500000000 - 0x000000F53FFFFFFF
Jul 16 17:54:39 tokeiihto kernel: [ 25.652113] [drm] Detected VRAM RAM=1024M, BAR=256M
Jul 16 17:54:39 tokeiihto kernel: [ 25.652114] [drm] RAM width 128bits UNKNOWN
Jul 16 17:54:39 tokeiihto kernel: [ 25.652170] [TTM] Zone kernel: Available graphics memory: 7703370 kiB
Jul 16 17:54:39 tokeiihto kernel: [ 25.652171] [TTM] Zone dma32: Available graphics memory: 2097152 kiB
Jul 16 17:54:39 tokeiihto kernel: [ 25.652171] [TTM] Initializing pool allocator
Jul 16 17:54:39 tokeiihto kernel: [ 25.652174] [TTM] Initializing DMA pool allocator
Jul 16 17:54:39 tokeiihto kernel: [ 25.652202] [drm] amdgpu: 1024M of VRAM memory ready
Jul 16 17:54:39 tokeiihto kernel: [ 25.652203] [drm] amdgpu: 3072M of GTT memory ready.
Jul 16 17:54:39 tokeiihto kernel: [ 25.652220] [drm] GART: num cpu pages 262144, num gpu pages 262144
Jul 16 17:54:39 tokeiihto kernel: [ 25.652433] [drm] PCIE GART of 1024M enabled (table at 0x000000F400800000).
Jul 16 17:54:39 tokeiihto kernel: [ 25.652541] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Jul 16 17:54:39 tokeiihto kernel: [ 25.652541] [drm] Driver supports precise vblank timestamp query.
Jul 16 17:54:39 tokeiihto kernel: [ 25.652983] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_asd.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.653276] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_pfp.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.653498] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_me.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.653668] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_ce.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.653960] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_rlc.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.654817] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_mec.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.656137] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_mec2.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.658217] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_sdma.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.658220] [drm] use_doorbell being set to: [true]
Jul 16 17:54:39 tokeiihto kernel: [ 25.659663] amdgpu 0000:38:00.0: firmware: direct-loading firmware amdgpu/raven_vcn.bin
Jul 16 17:54:39 tokeiihto kernel: [ 25.659667] [drm] Found VCN firmware Version: 1.73 Family ID: 18
Jul 16 17:54:39 tokeiihto kernel: [ 25.847424] [drm] VCN decode and encode initialized successfully.
Jul 16 17:54:39 tokeiihto kernel: [ 25.852189] amdgpu 0000:38:00.0: ring 0(gfx) uses VM inv eng 4 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852191] amdgpu 0000:38:00.0: ring 1(comp_1.0.0) uses VM inv eng 5 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852193] amdgpu 0000:38:00.0: ring 2(comp_1.1.0) uses VM inv eng 6 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852194] amdgpu 0000:38:00.0: ring 3(comp_1.2.0) uses VM inv eng 7 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852195] amdgpu 0000:38:00.0: ring 4(comp_1.3.0) uses VM inv eng 8 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852197] amdgpu 0000:38:00.0: ring 5(comp_1.0.1) uses VM inv eng 9 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852198] amdgpu 0000:38:00.0: ring 6(comp_1.1.1) uses VM inv eng 10 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852200] amdgpu 0000:38:00.0: ring 7(comp_1.2.1) uses VM inv eng 11 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852201] amdgpu 0000:38:00.0: ring 8(comp_1.3.1) uses VM inv eng 12 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852202] amdgpu 0000:38:00.0: ring 9(kiq_2.1.0) uses VM inv eng 13 on hub 0
Jul 16 17:54:39 tokeiihto kernel: [ 25.852204] amdgpu 0000:38:00.0: ring 10(sdma0) uses VM inv eng 4 on hub 1
Jul 16 17:54:39 tokeiihto kernel: [ 25.852205] amdgpu 0000:38:00.0: ring 11(vcn_dec) uses VM inv eng 5 on hub 1
Jul 16 17:54:39 tokeiihto kernel: [ 25.852207] amdgpu 0000:38:00.0: ring 12(vcn_enc0) uses VM inv eng 6 on hub 1
Jul 16 17:54:39 tokeiihto kernel: [ 25.852208] amdgpu 0000:38:00.0: ring 13(vcn_enc1) uses VM inv eng 7 on hub 1
Jul 16 17:54:39 tokeiihto kernel: [ 25.856580] [drm] Initialized amdgpu 3.23.0 20150101 for 0000:38:00.0 on minor 0
```

The messages `[drm] BIOS signature incorrect 0 0` stands out. The latest
mainboard firmware version 7A37v1F from May 2018 is installed [4].

Booting with `nomodeset` works.

Please find attached the full log with the KMS boot messages in the
beginning, and the nomodeset messages in the second part.

Do you have any hints how to get modesetting to work?

Are
CONFIG_DRM_AMD_DC and CONFIG_DRM_AMD_DC_DCN1_0 set in your kernel config?
Those are required for modesetting on raven.

No, the second option is not selected in linux-image-4.16.0-2-amd64 [5].

```
#
# Display Engine Configuration
#
CONFIG_DRM_AMD_DC=y
# CONFIG_DRM_AMD_DC_PRE_VEGA is not set
# CONFIG_DRM_AMD_DC_FBC is not set
# CONFIG_DRM_AMD_DC_DCN1_0 is not set
# CONFIG_DEBUG_KERNEL_DC is not set
```

Itâs selected in linux-image-4.17.0-1 [6]. That version is not yet in Debian Buster/testing.

I wonder, if in the future the Linux kernel could give feedback to the user if options are unselected.


Kind regards,

Paul


[5]: https://packages.debian.org/sid/amd64/linux-image-4.16.0-2-amd64
[6]: https://packages.debian.org/sid/amd64/linux-image-4.17.0-1-amd64