summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_notifier.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-07-20 06:39:25 -0700
committerEric Anholt <eric@anholt.net>2007-07-20 13:39:45 -0700
commitc1119b1b092527fbb6950d0b5e51e076ddb00f29 (patch)
tree1d4b0f26e40d572e4c92eb4ebde88e60b9b137e5 /shared-core/nouveau_notifier.c
parent35de4868361ce1fb515cf33f27e6be4c59b07f89 (diff)
Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique identifier of a client" all over the DRM. There is a 1:1 mapping, so this should be a noop. This could be a minor performance improvement, as everything on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls went the other direction.
Diffstat (limited to 'shared-core/nouveau_notifier.c')
-rw-r--r--shared-core/nouveau_notifier.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/shared-core/nouveau_notifier.c b/shared-core/nouveau_notifier.c
index 425e471c..6a78bb23 100644
--- a/shared-core/nouveau_notifier.c
+++ b/shared-core/nouveau_notifier.c
@@ -30,7 +30,8 @@
#include "nouveau_drv.h"
int
-nouveau_notifier_init_channel(struct drm_device *dev, int channel, DRMFILE filp)
+nouveau_notifier_init_channel(struct drm_device *dev, int channel,
+ struct drm_file *file_priv)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_fifo *chan = dev_priv->fifos[channel];
@@ -44,7 +45,8 @@ nouveau_notifier_init_channel(struct drm_device *dev, int channel, DRMFILE filp)
flags = NOUVEAU_MEM_FB;
flags |= NOUVEAU_MEM_MAPPED;
- chan->notifier_block = nouveau_mem_alloc(dev, 0, PAGE_SIZE, flags,filp);
+ chan->notifier_block = nouveau_mem_alloc(dev, 0, PAGE_SIZE, flags,
+ file_priv);
if (!chan->notifier_block)
return -ENOMEM;
@@ -87,7 +89,8 @@ nouveau_notifier_alloc(struct drm_device *dev, int channel, uint32_t handle,
return -EINVAL;
}
- mem = nouveau_mem_alloc_block(chan->notifier_heap, 32, 0, chan->filp);
+ mem = nouveau_mem_alloc_block(chan->notifier_heap, 32, 0,
+ chan->file_priv);
if (!mem) {
DRM_ERROR("Channel %d notifier block full\n", channel);
return -ENOMEM;
@@ -135,7 +138,7 @@ nouveau_ioctl_notifier_alloc(DRM_IOCTL_ARGS)
(struct drm_nouveau_notifier_alloc __user*)data,
sizeof(na));
- if (!nouveau_fifo_owner(dev, filp, na.channel)) {
+ if (!nouveau_fifo_owner(dev, file_priv, na.channel)) {
DRM_ERROR("pid %d doesn't own channel %d\n",
DRM_CURRENTPID, na.channel);
return -EPERM;