summaryrefslogtreecommitdiff
path: root/linux/drm_bufs.h
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2001-04-05 20:57:37 +0000
committerKevin E Martin <kem@kem.org>2001-04-05 20:57:37 +0000
commit84eb47efbeaa07dd7526383b10234389a003d90b (patch)
treeaf1e718f29c3dfca0e577bb0f4d211c6432600e6 /linux/drm_bufs.h
parent2673fcbaaef60aa9f1258a24f3b678d3b1861c73 (diff)
- Merge from trunk into pcigart branchati-pcigart-1-0-0-20010405ati-pcigart-1-0-0-branch
Diffstat (limited to 'linux/drm_bufs.h')
-rw-r--r--linux/drm_bufs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/linux/drm_bufs.h b/linux/drm_bufs.h
index b82d1a26..16af7bd5 100644
--- a/linux/drm_bufs.h
+++ b/linux/drm_bufs.h
@@ -946,18 +946,34 @@ int DRM(mapbufs)( struct inode *inode, struct file *filp,
goto done;
}
+#if LINUX_VERSION_CODE <= 0x020402
down( &current->mm->mmap_sem );
+#else
+ down_write( &current->mm->mmap_sem );
+#endif
virtual = do_mmap( filp, 0, map->size,
PROT_READ | PROT_WRITE,
MAP_SHARED,
(unsigned long)map->offset );
+#if LINUX_VERSION_CODE <= 0x020402
up( &current->mm->mmap_sem );
+#else
+ up_write( &current->mm->mmap_sem );
+#endif
} else {
+#if LINUX_VERSION_CODE <= 0x020402
down( &current->mm->mmap_sem );
+#else
+ down_write( &current->mm->mmap_sem );
+#endif
virtual = do_mmap( filp, 0, dma->byte_count,
PROT_READ | PROT_WRITE,
MAP_SHARED, 0 );
+#if LINUX_VERSION_CODE <= 0x020402
up( &current->mm->mmap_sem );
+#else
+ up_write( &current->mm->mmap_sem );
+#endif
}
if ( virtual > -1024UL ) {
/* Real error */