summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_agpsupport.c4
-rw-r--r--linux/drm_agpsupport.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index bab7b45c..6eaadfc2 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -106,6 +106,10 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
if (!dev->agp || dev->agp->acquired || !drm_agp->acquire)
return -EINVAL;
+#ifndef VMAP_4_ARGS
+ if ( dev->agp->cant_use_aperture )
+ return -EINVAL;
+#endif
if ((retcode = drm_agp->acquire())) return retcode;
dev->agp->acquired = 1;
return 0;
diff --git a/linux/drm_agpsupport.h b/linux/drm_agpsupport.h
index bab7b45c..6eaadfc2 100644
--- a/linux/drm_agpsupport.h
+++ b/linux/drm_agpsupport.h
@@ -106,6 +106,10 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
if (!dev->agp || dev->agp->acquired || !drm_agp->acquire)
return -EINVAL;
+#ifndef VMAP_4_ARGS
+ if ( dev->agp->cant_use_aperture )
+ return -EINVAL;
+#endif
if ((retcode = drm_agp->acquire())) return retcode;
dev->agp->acquired = 1;
return 0;