xf86-video-ati: Branch 'master' - 2 commits

George Sapountzis gsap7 at kemper.freedesktop.org
Fri Jan 18 08:19:49 PST 2008


 src/ati.c            |   39 +++++++++++++++++++++++++++++++++++++++
 src/ati.h            |    2 ++
 src/aticonsole.c     |    6 ++++++
 src/atimach64probe.h |    2 ++
 src/atimisc.c        |    6 +++---
 src/atimodule.c      |    2 ++
 src/r128_misc.c      |    5 ++---
 src/r128_probe.h     |    2 ++
 src/radeon_misc.c    |    5 ++---
 src/radeon_probe.h   |    2 ++
 10 files changed, 62 insertions(+), 9 deletions(-)

New commits:
commit 4ba9430ee97dbce8f77db8de6ce9b753a75e453d
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Fri Jan 18 18:18:18 2008 +0200

    mach64: workaround for corruption at upper-left
    
    commit possible workaround, it's reported multiple times ...

diff --git a/src/aticonsole.c b/src/aticonsole.c
index f8f2032..8efe897 100644
--- a/src/aticonsole.c
+++ b/src/aticonsole.c
@@ -649,6 +649,12 @@ ATISwitchMode
 
 #endif /* XF86DRI_DEVEL */
 
+        /* XXX Workaround for X server not hiding the cursor for Xcursor (but
+         * only for core cursor), leaving a 64x64 garbage upper-left.
+         */
+        if (pATI->pCursorInfo)
+            (*pATI->pCursorInfo->HideCursor)(pScreenInfo);
+
         ATIModeSet(pScreenInfo, pATI, &pATI->NewHW);
 
 #ifdef XF86DRI_DEVEL
commit 12c00111b68c9cf4872a424258c6f8b7247aac47
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Fri Jan 18 18:17:40 2008 +0200

    use stand-alone drivers for each chip family.
    
    Do not load the ati wrapper when the user specifies the sub-driver name in
    the Driver line of xorg.conf.  Also, for -configure cause the wrapper to fail
    and let each sub-driver speak for themselves.

diff --git a/src/ati.c b/src/ati.c
index caee443..89e62dc 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -81,6 +81,29 @@ enum
     ATI_CHIP_FAMILY_Radeon
 };
 
+/*
+ * Record which sub-drivers have already been loaded, and thus have called
+ * xf86AddDriver(). For those sub-drivers, cause the ati wrapper later to fail
+ * when probing.
+ *
+ * The check is only called once when the ati wrapper is loaded and depends on
+ * the X server loading all drivers before doing any probes.
+ */
+static Bool mach64_drv_added = FALSE;
+static Bool r128_drv_added = FALSE;
+static Bool radeon_drv_added = FALSE;
+
+void
+ati_check_subdriver_added()
+{
+    if (LoaderSymbol(MACH64_NAME))
+        mach64_drv_added = TRUE;
+    if (LoaderSymbol(R128_NAME))
+        r128_drv_added = TRUE;
+    if (LoaderSymbol(RADEON_NAME))
+        radeon_drv_added = TRUE;
+}
+
 static int ATIChipID(const CARD16);
 
 #ifdef XSERVER_LIBPCIACCESS
@@ -142,6 +165,10 @@ ATIProbe
     Bool        DoRage128 = FALSE, DoRadeon = FALSE;
     int         Chip;
 
+    /* Let the sub-drivers probe & configure for themselves */
+    if (xf86ServerIsOnlyDetecting())
+        return FALSE;
+
 #ifndef XSERVER_LIBPCIACCESS
 
     xf86PciVideoInfo = xf86GetPciVideoInfo();
@@ -199,6 +226,10 @@ ATIProbe
     {
         DriverRec *radeon;
 
+        /* If the sub-driver was added, let it probe for itself */
+        if (radeon_drv_added)
+            return FALSE;
+
         if (!LoaderSymbol(RADEON_NAME))
             xf86LoadDrvSubModule(pDriver, RADEON_DRIVER_NAME);
 
@@ -222,6 +253,10 @@ ATIProbe
     {
         DriverRec *r128;
 
+        /* If the sub-driver was added, let it probe for itself */
+        if (r128_drv_added)
+            return FALSE;
+
         if (!LoaderSymbol(R128_NAME))
             xf86LoadDrvSubModule(pDriver, R128_DRIVER_NAME);
 
@@ -245,6 +280,10 @@ ATIProbe
     {
         DriverRec *mach64;
 
+        /* If the sub-driver was added, let it probe for itself */
+        if (mach64_drv_added)
+            return FALSE;
+
         if (!LoaderSymbol(MACH64_NAME))
             xf86LoadDrvSubModule(pDriver, MACH64_DRIVER_NAME);
 
diff --git a/src/ati.h b/src/ati.h
index 0a32acf..e86e50c 100644
--- a/src/ati.h
+++ b/src/ati.h
@@ -31,6 +31,8 @@
 
 #include "xf86_OSproc.h"
 
+extern void ati_check_subdriver_added();
+
 extern DriverRec ATI;
 
 #endif /* ___ATI_H___ */
diff --git a/src/atimach64probe.h b/src/atimach64probe.h
index 9d50b63..7b0b4b6 100644
--- a/src/atimach64probe.h
+++ b/src/atimach64probe.h
@@ -25,6 +25,8 @@
 
 #include "xf86str.h"
 
+extern DriverRec MACH64;
+
 extern SymTabRec Mach64Chipsets[];
 
 #endif /* ___ATIMACH64PROBE_H___ */
diff --git a/src/atimisc.c b/src/atimisc.c
index d71b0ad..cf2347a 100644
--- a/src/atimisc.c
+++ b/src/atimisc.c
@@ -27,6 +27,7 @@
 #include "ati.h"
 #include "ativersion.h"
 
+#include "atimach64probe.h"
 #include "atimach64version.h"
 
 /* Module loader interface for subsidiary driver module */
@@ -63,9 +64,8 @@ ATISetup
 
     if (!Inited)
     {
-        /* Ensure main driver module is loaded, but not as a submodule */
-        if (!xf86ServerIsOnlyDetecting() && !LoaderSymbol(ATI_NAME))
-            xf86LoadOneModule(ATI_DRIVER_NAME, Options);
+        if (xf86ServerIsOnlyDetecting() || !LoaderSymbol(ATI_NAME))
+            xf86AddDriver(&MACH64, Module, 0);
 
         Inited = TRUE;
     }
diff --git a/src/atimodule.c b/src/atimodule.c
index 12b4ffd..802c35a 100644
--- a/src/atimodule.c
+++ b/src/atimodule.c
@@ -63,6 +63,8 @@ ATISetup
     {
         Inited = TRUE;
         xf86AddDriver(&ATI, Module, 0);
+
+        ati_check_subdriver_added();
     }
 
     return (pointer)1;
diff --git a/src/r128_misc.c b/src/r128_misc.c
index 49d2803..f8bccfe 100644
--- a/src/r128_misc.c
+++ b/src/r128_misc.c
@@ -65,9 +65,8 @@ R128Setup
 
     if (!Inited)
     {
-        /* Ensure main driver module is loaded, but not as a submodule */
-        if (!xf86ServerIsOnlyDetecting() && !LoaderSymbol(ATI_NAME))
-            xf86LoadOneModule(ATI_DRIVER_NAME, Options);
+        if (xf86ServerIsOnlyDetecting() || !LoaderSymbol(ATI_NAME))
+            xf86AddDriver(&R128, Module, 0);
 
         Inited = TRUE;
     }
diff --git a/src/r128_probe.h b/src/r128_probe.h
index 2885604..719340a 100644
--- a/src/r128_probe.h
+++ b/src/r128_probe.h
@@ -38,6 +38,8 @@
 
 #include "xf86str.h"
 
+extern DriverRec R128;
+
 typedef struct
 {
     Bool IsDRIEnabled;
diff --git a/src/radeon_misc.c b/src/radeon_misc.c
index 7840376..fc608dd 100644
--- a/src/radeon_misc.c
+++ b/src/radeon_misc.c
@@ -64,9 +64,8 @@ RADEONSetup
     static Bool Inited = FALSE;
 
     if (!Inited) {
-        /* Ensure main driver module is loaded, but not as a submodule */
-        if (!xf86ServerIsOnlyDetecting() && !LoaderSymbol(ATI_NAME))
-            xf86LoadOneModule(ATI_DRIVER_NAME, Options);
+        if (xf86ServerIsOnlyDetecting() || !LoaderSymbol(ATI_NAME))
+            xf86AddDriver(&RADEON, Module, 0);
 
         Inited = TRUE;
     }
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index ef4ddbc..17c0f1b 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -53,6 +53,8 @@
 #include "xaa.h"
 #endif
 
+extern DriverRec RADEON;
+
 typedef enum
 {
     MT_UNKNOWN = -1,


More information about the xorg-commit mailing list