diff options
authorEmil Velikov <>2016-12-10 14:30:16 +0000
committerEmil Velikov <>2020-03-16 14:25:06 +0000
commitabbe23fae70b7f3bc7033d7603d331570677d431 (patch)
parent0b3bc7addf9b5989bfad7c2c31979a15f5ba701d (diff)
Remove drmCheckModesettingSupported and kernel module loading, on Linux
The former of these is a UMS artefact which gives incorrect and misleading promise whether KMS is supported. Not to mention that AMDGPU is a only KMS driver. In a similar fashion xf86LoadKernelModule() is a relic of the times, where platforms had no scheme of detecting and loading the appropriate kernel module. Notes: - Since there is no reply from Robert the code is still around, behind a FreeBSD guard. - If FreeBSD still needs this they should look and fix it ASAP, as: - wayland itself or compositors do _not_ load kernel modules - the kernel module should be loaded early to control the clocks/fan, hence temperature of the card v2: Keep the code as FreeBSD only, add 'Notes' in the commit message. Cc: Robert Millan <> Signed-off-by: Emil Velikov <> Reviewed-by: Michel Dänzer <> Acked-by: Alex Deucher <>
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index 7abe13d..1db78a4 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -93,20 +93,20 @@ static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
static Bool amdgpu_kernel_mode_enabled(ScrnInfoPtr pScrn, char *busIdString)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
int ret = drmCheckModesettingSupported(busIdString);
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if (ret) {
if (xf86LoadKernelModule("amdgpukms"))
ret = drmCheckModesettingSupported(busIdString);
if (ret) {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
"[KMS] drm report modesetting isn't supported.\n");
return FALSE;
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
"[KMS] Kernel modesetting enabled.\n");
return TRUE;