summaryrefslogtreecommitdiff
path: root/src/nv_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nv_dri.c')
-rw-r--r--src/nv_dri.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/nv_dri.c b/src/nv_dri.c
index 7edb865..a489e68 100644
--- a/src/nv_dri.c
+++ b/src/nv_dri.c
@@ -244,7 +244,7 @@ Bool NVDRIGetVersion(ScrnInfoPtr pScrn)
}
/* temporary lock step versioning */
-#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 6
+#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 7
#error nouveau_drm.h doesn't match expected patchlevel, update libdrm.
#endif
if (pNv->pKernelDRMVersion->version_patchlevel !=
@@ -257,6 +257,19 @@ Bool NVDRIGetVersion(ScrnInfoPtr pScrn)
return TRUE;
}
+Bool NVDRICheckModules(ScrnInfoPtr pScrn)
+{
+ if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[dri] GlxSetVisualConfigs not found.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ " NVIDIA's glx present, or glx not loaded.\n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
Bool NVDRIScreenInit(ScrnInfoPtr pScrn)
{
DRIInfoPtr pDRIInfo;
@@ -267,6 +280,9 @@ Bool NVDRIScreenInit(ScrnInfoPtr pScrn)
int drm_page_size;
int irq;
+ if (!NVDRICheckModules(pScrn))
+ return FALSE;
+
drm_page_size = getpagesize();
if (!(pDRIInfo = DRICreateInfoRec())) return FALSE;
@@ -377,7 +393,7 @@ Bool NVDRIFinishScreenInit(ScrnInfoPtr pScrn)
pNOUVEAUDRI->depth = pScrn->depth;
pNOUVEAUDRI->bpp = pScrn->bitsPerPixel;
- pNOUVEAUDRI->front_offset = pNv->FB->offset - pNv->VRAMPhysical;
+ pNOUVEAUDRI->front_offset = pNv->FB->offset;
pNOUVEAUDRI->front_pitch = pScrn->virtualX;
/* back/depth buffers will likely be allocated on a per-drawable
* basis, but these may be useful if we want to support shared back