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_bufs.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_bufs.c')
-rw-r--r-- | bsd-core/drm_bufs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c index de28a2cf..bc019741 100644 --- a/bsd-core/drm_bufs.c +++ b/bsd-core/drm_bufs.c @@ -469,7 +469,7 @@ static int drm_do_addbufs_agp(drm_device_t *dev, drm_buf_desc_t *request) buf->address = (void *)(agp_offset + offset); buf->next = NULL; buf->pending = 0; - buf->filp = NULL; + buf->file_priv = NULL; buf->dev_priv_size = dev->driver.buf_priv_size; buf->dev_private = malloc(buf->dev_priv_size, M_DRM, @@ -610,7 +610,7 @@ static int drm_do_addbufs_pci(drm_device_t *dev, drm_buf_desc_t *request) buf->bus_address = dmah->busaddr + offset; buf->next = NULL; buf->pending = 0; - buf->filp = NULL; + buf->file_priv = NULL; buf->dev_priv_size = dev->driver.buf_priv_size; buf->dev_private = malloc(buf->dev_priv_size, M_DRM, @@ -724,7 +724,7 @@ static int drm_do_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request) buf->address = (void *)(agp_offset + offset + dev->sg->handle); buf->next = NULL; buf->pending = 0; - buf->filp = NULL; + buf->file_priv = NULL; buf->dev_priv_size = dev->driver.buf_priv_size; buf->dev_private = malloc(buf->dev_priv_size, M_DRM, @@ -1008,7 +1008,7 @@ int drm_freebufs(DRM_IOCTL_ARGS) break; } buf = dma->buflist[idx]; - if ( buf->filp != filp ) { + if ( buf->file_priv != file_priv ) { DRM_ERROR("Process %d freeing buffer not owned\n", DRM_CURRENTPID); retcode = EINVAL; |