diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drm_bufs.h | 16 | ||||
-rw-r--r-- | linux/radeon_drv.c | 4 |
2 files changed, 18 insertions, 2 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( ¤t->mm->mmap_sem ); +#else + down_write( ¤t->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( ¤t->mm->mmap_sem ); +#else + up_write( ¤t->mm->mmap_sem ); +#endif } else { +#if LINUX_VERSION_CODE <= 0x020402 down( ¤t->mm->mmap_sem ); +#else + down_write( ¤t->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( ¤t->mm->mmap_sem ); +#else + up_write( ¤t->mm->mmap_sem ); +#endif } if ( virtual > -1024UL ) { /* Real error */ diff --git a/linux/radeon_drv.c b/linux/radeon_drv.c index 59497aca..d7632667 100644 --- a/linux/radeon_drv.c +++ b/linux/radeon_drv.c @@ -40,8 +40,8 @@ #define DRIVER_DATE "20010405" #define DRIVER_MAJOR 1 -#define DRIVER_MINOR 0 -#define DRIVER_PATCHLEVEL 2 +#define DRIVER_MINOR 1 +#define DRIVER_PATCHLEVEL 1 #define DRIVER_IOCTLS \ [DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { radeon_cp_buffers, 1, 0 }, \ |