summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_mm.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 12:23:09 +0200
committerDave Airlie <airlied@optimus.(none)>2007-10-15 02:38:20 +0200
commit6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch)
treea92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/via_mm.c
parentdrm: Remove DRM_ERR OS macro. (diff)
downloadlinux-6c340eac0285f3d62406d2d902d0e96fbf2a5dc0.tar.xz
linux-6c340eac0285f3d62406d2d902d0e96fbf2a5dc0.zip
drm: 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 everyth on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct went the other direction. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r--drivers/char/drm/via_mm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c
index 36f2547254f9..fe68cbbe787c 100644
--- a/drivers/char/drm/via_mm.c
+++ b/drivers/char/drm/via_mm.c
@@ -149,7 +149,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT;
item = drm_sman_alloc(&dev_priv->sman, mem.type, tmpSize, 0,
- (unsigned long)priv);
+ (unsigned long)file_priv);
mutex_unlock(&dev->struct_mutex);
if (item) {
mem.offset = ((mem.type == VIA_MEM_VIDEO) ?
@@ -188,13 +188,13 @@ int via_mem_free(DRM_IOCTL_ARGS)
}
-void via_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
+void via_reclaim_buffers_locked(struct drm_device * dev,
+ struct drm_file *file_priv)
{
drm_via_private_t *dev_priv = dev->dev_private;
- struct drm_file *priv = filp->private_data;
mutex_lock(&dev->struct_mutex);
- if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)priv)) {
+ if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)file_priv)) {
mutex_unlock(&dev->struct_mutex);
return;
}
@@ -203,7 +203,7 @@ void via_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
dev->driver->dma_quiescent(dev);
}
- drm_sman_owner_cleanup(&dev_priv->sman, (unsigned long)priv);
+ drm_sman_owner_cleanup(&dev_priv->sman, (unsigned long)file_priv);
mutex_unlock(&dev->struct_mutex);
return;
}