Potential fix for bug 5393 - KMSDRM: using atomic mode setting breaks GPU compatibility

Substring

I was trying the KMSDRM video backend with some very simple programs that were working ok on 2.0.12. The same code won?t work on the current dev branch and I get:

DEBUG: check_modesetting: probing ?/dev/dri/card0?
DEBUG: /dev/dri/card0 connector, encoder and CRTC counts are: 4 5 6
DEBUG: check_modesetting: probing ?/dev/dri/card0?
DEBUG: /dev/dri/card0 connector, encoder and CRTC counts are: 4 5 6
DEBUG: KMSDRM_VideoInit()
DEBUG: Opening device /dev/dri/card0
DEBUG: Opened DRM FD (3)
DEBUG: no atomic modesetting support.
DEBUG: Video subsystem has not been initialized
INFO: Using SDL video driver: (null)
DEBUG: Video subsystem has not been initialized

After carefully checking, the radeon driver doesn?t support atomic modesetting. That?s not the only problem : the same happens with the amdgpu driver if we disable Display Core (kernel parameter amdgpu.dc=0, which is required to get analogue outputs working).

This is a major regression in the KMSDRM driver.

Using atomic mode setting is great, but having no fallback to the "standard KMS" is bad.
This commit is contained in:
Sam Lantinga
2020-12-15 12:22:48 -08:00
parent c02d88dd12
commit f8839289b0
16 changed files with 2203 additions and 1 deletions

1
configure vendored
View File

@@ -22119,6 +22119,7 @@ fi
$as_echo "#define SDL_VIDEO_DRIVER_KMSDRM 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
SOURCES="$SOURCES $srcdir/src/video/kmsdrm_legacy/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5