aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/r300_cmdbuf.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 06:23:09 -0400
committerDave Airlie <airlied@optimus.(none)>2007-10-14 20:38:20 -0400
commit6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch)
treea92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/r300_cmdbuf.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/r300_cmdbuf.c')
-rw-r--r--drivers/char/drm/r300_cmdbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/drm/r300_cmdbuf.c b/drivers/char/drm/r300_cmdbuf.c
index 669aee68ce24..59b2944811c5 100644
--- a/drivers/char/drm/r300_cmdbuf.c
+++ b/drivers/char/drm/r300_cmdbuf.c
@@ -780,8 +780,7 @@ static int r300_scratch(drm_radeon_private_t *dev_priv,
780 * Called by the ioctl handler function radeon_cp_cmdbuf. 780 * Called by the ioctl handler function radeon_cp_cmdbuf.
781 */ 781 */
782int r300_do_cp_cmdbuf(struct drm_device *dev, 782int r300_do_cp_cmdbuf(struct drm_device *dev,
783 DRMFILE filp, 783 struct drm_file *file_priv,
784 struct drm_file *filp_priv,
785 drm_radeon_kcmd_buffer_t *cmdbuf) 784 drm_radeon_kcmd_buffer_t *cmdbuf)
786{ 785{
787 drm_radeon_private_t *dev_priv = dev->dev_private; 786 drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -884,9 +883,10 @@ int r300_do_cp_cmdbuf(struct drm_device *dev,
884 } 883 }
885 884
886 buf = dma->buflist[idx]; 885 buf = dma->buflist[idx];
887 if (buf->filp != filp || buf->pending) { 886 if (buf->file_priv != file_priv || buf->pending) {
888 DRM_ERROR("bad buffer %p %p %d\n", 887 DRM_ERROR("bad buffer %p %p %d\n",
889 buf->filp, filp, buf->pending); 888 buf->file_priv, file_priv,
889 buf->pending);
890 ret = -EINVAL; 890 ret = -EINVAL;
891 goto cleanup; 891 goto cleanup;
892 } 892 }