summaryrefslogtreecommitdiff
path: root/linux/i810_dma.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-04 10:04:55 +0000
committerRik Faith <faith@alephnull.com>2000-08-04 10:04:55 +0000
commitf3ae6786f89a4f63dbba93c5519d3792a1744dd7 (patch)
tree0d9ef964855fc32189fd5553373bb9dcf904ed12 /linux/i810_dma.c
parentbcad11818296fa58a356175bc7e13060579012d0 (diff)
Sync with Linux 2.4.0-test6-pre2
Diffstat (limited to 'linux/i810_dma.c')
-rw-r--r--linux/i810_dma.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/linux/i810_dma.c b/linux/i810_dma.c
index 901be5593..f3d9db43e 100644
--- a/linux/i810_dma.c
+++ b/linux/i810_dma.c
@@ -33,7 +33,6 @@
#define __NO_VERSION__
#include "drmP.h"
#include "i810_drv.h"
-
#include <linux/interrupt.h> /* For task queue support */
/* in case we don't have a 2.3.99-pre6 kernel or later: */
@@ -156,16 +155,23 @@ static struct file_operations i810_buffer_fops = {
int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
{
- drm_file_t *priv = filp->private_data;
- drm_device_t *dev = priv->dev;
- drm_i810_private_t *dev_priv = dev->dev_private;
- drm_buf_t *buf = dev_priv->mmap_buffer;
- drm_i810_buf_priv_t *buf_priv = buf->dev_private;
+ drm_file_t *priv = filp->private_data;
+ drm_device_t *dev;
+ drm_i810_private_t *dev_priv;
+ drm_buf_t *buf;
+ drm_i810_buf_priv_t *buf_priv;
+
+ lock_kernel();
+ dev = priv->dev;
+ dev_priv = dev->dev_private;
+ buf = dev_priv->mmap_buffer;
+ buf_priv = buf->dev_private;
vma->vm_flags |= (VM_IO | VM_DONTCOPY);
vma->vm_file = filp;
buf_priv->currently_mapped = I810_BUF_MAPPED;
+ unlock_kernel();
if (remap_page_range(vma->vm_start,
VM_OFFSET(vma),