summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2007-12-21 16:27:51 +0100
committerMatthias Hopf <mhopf@suse.de>2007-12-21 16:27:51 +0100
commitb9277bfc275254be9823578819a13ceb056fc47e (patch)
tree98a724389e93c8ffe3b77951021c652ed017c3e8 /src
parent79e016fde25a4ac713acedeb97cc4e5a6425d1ab (diff)
Check for fglrx kernel module and bark if it is loaded.
Diffstat (limited to 'src')
-rw-r--r--src/rhd_driver.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rhd_driver.c b/src/rhd_driver.c
index 2ef58f3..80a410b 100644
--- a/src/rhd_driver.c
+++ b/src/rhd_driver.c
@@ -84,7 +84,10 @@
#if HAVE_XF86_ANSIC_H
# include "xf86_ansic.h"
#else
+# include <sys/types.h>
+# include <sys/stat.h>
# include <string.h>
+# include <unistd.h>
#endif
/*
@@ -167,6 +170,10 @@ static int pix24bpp = 0;
#define _X_EXPORT
#endif
+#ifdef __linux__
+# define FGLRX_SYS_PATH "/sys/module/fglrx"
+#endif
+
_X_EXPORT DriverRec RADEONHD = {
RHD_VERSION,
RHD_DRIVER_NAME,
@@ -417,12 +424,22 @@ RHDPreInit(ScrnInfoPtr pScrn, int flags)
Bool ret = FALSE;
RHDI2CDataArg i2cArg;
DisplayModePtr Modes; /* Non-RandR-case only */
+ struct stat statbuf;
if (flags & PROBE_DETECT) {
/* do dynamic mode probing */
return TRUE;
}
+#ifdef FGLRX_SYS_PATH
+ /* check for fglrx kernel module */
+ if (stat (FGLRX_SYS_PATH, &statbuf) == 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "The fglrx kernel module is loaded. This can have obvious\n"
+ " or subtle side effects. See radeonhd(4) for details.\n");
+ }
+#endif
+
#ifndef XSERVER_LIBPCIACCESS
/*
* Allocate the RhdRec driverPrivate