aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/drm/sis_mm.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 20:23:09 +1000
committerDave Airlie <airlied@optimus.(none)>2007-10-15 10:38:20 +1000
commit6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch)
treea92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/sis_mm.c
parent20caafa6ecb2487d9b223aa33e7cc704f912a758 (diff)
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/sis_mm.c')
-rw-r--r--drivers/char/drm/sis_mm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c
index 244006a107b..cefbc3086d8 100644
--- a/drivers/char/drm/sis_mm.c
+++ b/drivers/char/drm/sis_mm.c
@@ -123,7 +123,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS)
return 0;
}
-static int sis_drm_alloc(struct drm_device *dev, struct drm_file * priv,
+static int sis_drm_alloc(struct drm_device *dev, struct drm_file *file_priv,
unsigned long data, int pool)
{
drm_sis_private_t *dev_priv = dev->dev_private;
@@ -145,7 +145,7 @@ static int sis_drm_alloc(struct drm_device *dev, struct drm_file * priv,
mem.size = (mem.size + SIS_MM_ALIGN_MASK) >> SIS_MM_ALIGN_SHIFT;
item = drm_sman_alloc(&dev_priv->sman, pool, mem.size, 0,
- (unsigned long)priv);
+ (unsigned long)file_priv);
mutex_unlock(&dev->struct_mutex);
if (item) {
@@ -191,7 +191,7 @@ static int sis_drm_free(DRM_IOCTL_ARGS)
static int sis_fb_alloc(DRM_IOCTL_ARGS)
{
DRM_DEVICE;
- return sis_drm_alloc(dev, priv, data, VIDEO_TYPE);
+ return sis_drm_alloc(dev, file_priv, data, VIDEO_TYPE);
}
static int sis_ioctl_agp_init(DRM_IOCTL_ARGS)
@@ -226,7 +226,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
{
DRM_DEVICE;
- return sis_drm_alloc(dev, priv, data, AGP_TYPE);
+ return sis_drm_alloc(dev, file_priv, data, AGP_TYPE);
}
static drm_local_map_t *sis_reg_init(struct drm_device *dev)
@@ -314,13 +314,13 @@ void sis_lastclose(struct drm_device *dev)
mutex_unlock(&dev->struct_mutex);
}
-void sis_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
+void sis_reclaim_buffers_locked(struct drm_device * dev,
+ struct drm_file *file_priv)
{
drm_sis_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;
}
@@ -329,7 +329,7 @@ void sis_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;
}