[PATCH xf86-video-amdgpu 04/19] Remove drmCheckModesettingSupported and kernel module loading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>

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.

Cc: Robert Millan <rmh at freebsd.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Robert, off the top of my head this should work with FreeBSD. Admittedly
I'm not an expert on the platform. Please give it a test.
---
 src/amdgpu_probe.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index 78cc005..d8d8383 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -52,10 +52,6 @@
 #include "xf86drmMode.h"
 #include "dri.h"
 
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#include <xf86_OSproc.h>
-#endif
-
 #ifdef XSERVER_PLATFORM_BUS
 #include <xf86platformBus.h>
 #endif
@@ -93,27 +89,6 @@ static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
 	return busid;
 }
 
-static Bool amdgpu_kernel_mode_enabled(ScrnInfoPtr pScrn, char *busIdString)
-{
-	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;
-	}
-
-	xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
-		       "[KMS] Kernel modesetting enabled.\n");
-	return TRUE;
-}
-
 static int amdgpu_kernel_open_fd(ScrnInfoPtr pScrn,
 				 struct pci_device *pci_dev,
 				 struct xf86_platform_device *platform_dev)
@@ -150,11 +125,6 @@ static int amdgpu_kernel_open_fd(ScrnInfoPtr pScrn,
 	if (!busid)
 		return -1;
 
-	if (!amdgpu_kernel_mode_enabled(pScrn, busid)) {
-		free(busid);
-		return -1;
-	}
-
 	fd = drmOpen(NULL, busid);
 	if (fd == -1)
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-- 
2.16.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux