summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-12-10 14:30:16 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2020-03-16 14:25:06 +0000
commitabbe23fae70b7f3bc7033d7603d331570677d431 (patch)
treed7226bf530b24b5485304ba14ce361348255904b
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 <rmh@freebsd.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_probe.c4
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);
}
-#endif
if (ret) {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
"[KMS] drm report modesetting isn't supported.\n");
return FALSE;
}
+#endif
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
"[KMS] Kernel modesetting enabled.\n");
return TRUE;