summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2001-03-05 15:52:11 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2001-03-05 15:52:11 +0000
commitd1774bb44cdc1b5ce606c299b8eea1793f4352e3 (patch)
treebc50c3a7c2c692c94aa341b4b4c7e6851fb42610
parent8d3f3f4f9b8a5611888c35b7683661bcf52ef9cc (diff)
downloaddrm-d1774bb44cdc1b5ce606c299b8eea1793f4352e3.tar.gz
fix that last patch to initialize the MTRR when AGP available.
-rw-r--r--linux-core/drm_drv.c5
-rw-r--r--linux/drm_drv.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 55d6a15d..d8a7d992 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -480,14 +480,15 @@ static int __init drm_init( void )
DRM(takedown)( dev );
return -ENOMEM;
}
+#endif
#if __REALLY_HAVE_MTRR
- dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
+ if (dev->agp)
+ dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
dev->agp->agp_info.aper_size*1024*1024,
MTRR_TYPE_WRCOMB,
1 );
#endif
#endif
-#endif
#if __HAVE_CTX_BITMAP
retcode = DRM(ctxbitmap_init)( dev );
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 55d6a15d..d8a7d992 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -480,14 +480,15 @@ static int __init drm_init( void )
DRM(takedown)( dev );
return -ENOMEM;
}
+#endif
#if __REALLY_HAVE_MTRR
- dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
+ if (dev->agp)
+ dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
dev->agp->agp_info.aper_size*1024*1024,
MTRR_TYPE_WRCOMB,
1 );
#endif
#endif
-#endif
#if __HAVE_CTX_BITMAP
retcode = DRM(ctxbitmap_init)( dev );