diff options
author | Eric Anholt <eric@anholt.net> | 2007-07-20 06:39:25 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-07-20 13:39:45 -0700 |
commit | c1119b1b092527fbb6950d0b5e51e076ddb00f29 (patch) | |
tree | 1d4b0f26e40d572e4c92eb4ebde88e60b9b137e5 /bsd-core/drm_dma.c | |
parent | 35de4868361ce1fb515cf33f27e6be4c59b07f89 (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 'bsd-core/drm_dma.c')
-rw-r--r-- | bsd-core/drm_dma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index 90678dfc..fc219039 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -89,18 +89,18 @@ void drm_free_buffer(drm_device_t *dev, drm_buf_t *buf) if (!buf) return; buf->pending = 0; - buf->filp = NULL; + buf->file_priv= NULL; buf->used = 0; } -void drm_reclaim_buffers(drm_device_t *dev, DRMFILE filp) +void drm_reclaim_buffers(drm_device_t *dev, struct drm_file *file_priv) { drm_device_dma_t *dma = dev->dma; int i; if (!dma) return; for (i = 0; i < dma->buf_count; i++) { - if (dma->buflist[i]->filp == filp) { + if (dma->buflist[i]->file_priv == file_priv) { switch (dma->buflist[i]->list) { case DRM_LIST_NONE: drm_free_buffer(dev, dma->buflist[i]); @@ -122,7 +122,8 @@ int drm_dma(DRM_IOCTL_ARGS) DRM_DEVICE; if (dev->driver.dma_ioctl) { - return -dev->driver.dma_ioctl(kdev, cmd, data, flags, p, filp); + return -dev->driver.dma_ioctl(kdev, cmd, data, flags, p, + file_priv); } else { DRM_DEBUG("DMA ioctl on driver with no dma handler\n"); return EINVAL; |