From c1119b1b092527fbb6950d0b5e51e076ddb00f29 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 20 Jul 2007 06:39:25 -0700 Subject: 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. --- shared-core/nouveau_notifier.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'shared-core/nouveau_notifier.c') 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; -- cgit v1.2.3