From abbe23fae70b7f3bc7033d7603d331570677d431 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sat, 10 Dec 2016 14:30:16 +0000 Subject: Remove drmCheckModesettingSupported and kernel module loading, on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/amdgpu_probe.c | 4 ++-- 1 file 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; -- cgit v1.2.3