summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2013-02-16 20:48:43 +0000
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-06-12 10:39:55 +0200
commitb5d1a9bd269c9d2758fee37492cdcccc976fcc3b (patch)
tree09bf6e6049a303e0cc5b156e70df0181ae1e6892 /src
parent7c3f6cd8d6b14aea561fb877f6006d339d156f35 (diff)
downloadxorg-driver-xf86-video-nouveau-b5d1a9bd269c9d2758fee37492cdcccc976fcc3b.tar.gz
nouveau: Do not load dri {sub,}module
Nouveau does not use dri1, thus loading XFree86-DRI is not needed On the other hand, we do use dri2 As a side effect, purge the 'set-but-unused' variable pLibDRMVersion Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/nv_driver.c36
-rw-r--r--src/nv_type.h2
2 files changed, 1 insertions, 37 deletions
diff --git a/src/nv_driver.c b/src/nv_driver.c
index a6a12ec..b83b822 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -651,40 +651,6 @@ NVCloseDRM(ScrnInfoPtr pScrn)
nouveau_device_del(&pNv->dev);
}
-static Bool
-NVDRIGetVersion(ScrnInfoPtr pScrn)
-{
- NVPtr pNv = NVPTR(pScrn);
- int errmaj, errmin;
- pointer ret;
-
- ret = LoadSubModule(pScrn->module, "dri", NULL, NULL, NULL,
- NULL, &errmaj, &errmin);
- if (!ret) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "error %d\n", errmaj);
- LoaderErrorMsg(pScrn->name, "dri", errmaj, errmin);
- }
-
- if (!ret && errmaj != LDR_ONCEONLY)
- return FALSE;
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Loaded DRI module\n");
-
- /* Check the lib version */
- if (xf86LoaderCheckSymbol("drmGetLibVersion"))
- pNv->pLibDRMVersion = drmGetLibVersion(0);
- if (pNv->pLibDRMVersion == NULL) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "NVDRIGetVersion failed because libDRM is really "
- "way to old to even get a version number out of it.\n"
- "[dri] Disabling DRI.\n");
- return FALSE;
- }
-
- return TRUE;
-}
-
static void
nouveau_setup_capabilities(ScrnInfoPtr pScrn)
{
@@ -778,7 +744,7 @@ NVPreInitDRM(ScrnInfoPtr pScrn)
NVPtr pNv = NVPTR(pScrn);
int ret;
- if (!NVDRIGetVersion(pScrn))
+ if (!xf86LoadSubModule(pScrn, "dri2"))
return FALSE;
/* Load the kernel module, and open the DRM */
diff --git a/src/nv_type.h b/src/nv_type.h
index 9c403b5..13b6672 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -74,8 +74,6 @@ typedef struct _NVRec {
CARD32 currentRop;
- drmVersionPtr pLibDRMVersion;
-
void *drmmode; /* for KMS */
/* DRM interface */