diff options
author | Dave Airlie <airlied@linux.ie> | 2004-07-31 07:25:58 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-07-31 07:25:58 +0000 |
commit | dc4508c33845602e4c94c3e125536d01fe9110b1 (patch) | |
tree | c847fcb9fca81917b0a8d2a07a856fb1573d6795 /linux-core/i810_dma.c | |
parent | 1cec18a5cd3bcd37aab71c255d63fd394143bc5e (diff) |
athe patch below optimises the drm code to not do put_user() on memory the
kernel allocated and then mmap-installed to userspace, but instead
makes it use the kernel virtual address directly instead.
From: Arjan van de Ven <arjanv@redhat.com>
Diffstat (limited to 'linux-core/i810_dma.c')
-rw-r--r-- | linux-core/i810_dma.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/linux-core/i810_dma.c b/linux-core/i810_dma.c index eb5e192b9..c58a88517 100644 --- a/linux-core/i810_dma.c +++ b/linux-core/i810_dma.c @@ -851,13 +851,10 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev, if (buf_priv->currently_mapped == I810_BUF_MAPPED) { unsigned int prim = (sarea_priv->vertex_prim & PR_MASK); - put_user((GFX_OP_PRIMITIVE | prim | - ((used/4)-2)), - (u32 __user *)buf_priv->virtual); + *(u32 *)buf_priv->kernel_virtual = ((GFX_OP_PRIMITIVE | prim | ((used/4)-2))); if (used & 4) { - put_user(0, - (u32 __user *)((u32)buf_priv->virtual + used)); + *(u32 *)((u32)buf_priv->kernel_virtual + used) = 0; used += 4; } |