Merge branch 'mesa_7_6_branch'
[mesa.git] / src / gallium / state_trackers / xorg / xorg_driver.c
index bc3fd54bdb4f8cb504931f38db9ae37fb3f32ccc..4bc87aa613d083ab3bc454666fc627a3cb26544f 100644 (file)
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "compiler.h"
-#include "xf86RAC.h"
 #include "xf86PciInfo.h"
 #include "xf86Pci.h"
-#include "xf86Resources.h"
 #include "mipointer.h"
 #include "micmap.h"
 #include <X11/extensions/randr.h>
@@ -84,42 +82,10 @@ static const OptionInfoRec Options[] = {
     {-1, NULL, OPTV_NONE, {0}, FALSE}
 };
 
-/*
- * Functions that might be needed
- */
-
-static const char *exaSymbols[] = {
-    "exaGetVersion",
-    "exaDriverInit",
-    "exaDriverFini",
-    "exaOffscreenAlloc",
-    "exaOffscreenFree",
-    "exaWaitSync",
-    NULL
-};
-
-static const char *fbSymbols[] = {
-    "fbPictureInit",
-    "fbScreenInit",
-    NULL
-};
-
-static const char *ddcSymbols[] = {
-    "xf86PrintEDID",
-    "xf86SetDDCproperties",
-    NULL
-};
-
 /*
  * Exported Xorg driver functions to winsys
  */
 
-void
-xorg_tracker_loader_ref_sym_lists()
-{
-    LoaderRefSymLists(exaSymbols, fbSymbols, ddcSymbols, NULL);
-}
-
 const OptionInfoRec *
 xorg_tracker_available_options(int chipid, int busid)
 {
@@ -288,10 +254,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
     } else
        ms->entityPrivate = NULL;
 
-    if (xf86RegisterResources(ms->pEnt->index, NULL, ResNone)) {
-       return FALSE;
-    }
-
     if (xf86IsEntityShared(pScrn->entityList[0])) {
        if (xf86IsPrimInitDone(pScrn->entityList[0])) {
            /* do something */
@@ -312,7 +274,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
     if (ms->fd < 0)
        return FALSE;
 
-    pScrn->racMemFlags = RAC_FB | RAC_COLORMAP;
     pScrn->monitor = pScrn->confScreen->monitor;
     pScrn->progClock = TRUE;
     pScrn->rgbBits = 8;
@@ -398,8 +359,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
        return FALSE;
     }
 
-    xf86LoaderReqSymLists(fbSymbols, NULL);
-
     xf86LoadSubModule(pScrn, "exa");
 
 #ifdef DRI2
@@ -599,6 +558,7 @@ ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     xf86SetBlackWhitePixels(pScreen);
 
     ms->exa = xorg_exa_init(pScrn);
+    ms->debug_fallback = debug_get_bool_option("XORG_DEBUG_FALLBACK", TRUE);
 
     miInitializeBackingStore(pScreen);
     xf86SetBackingStore(pScreen);
@@ -766,8 +726,10 @@ CloseScreen(int scrnIndex, ScreenPtr pScreen)
     if (ms->exa)
        xorg_exa_close(pScrn);
 
+    if (ms->api->destroy)
        ms->api->destroy(ms->api);
-       ms->api = NULL;
+    ms->api = NULL;
+
     drmClose(ms->fd);
     ms->fd = -1;