diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-25 06:23:09 -0400 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-14 20:38:20 -0400 |
commit | 6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch) | |
tree | a92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/radeon_drv.h | |
parent | 20caafa6ecb2487d9b223aa33e7cc704f912a758 (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/radeon_drv.h')
-rw-r--r-- | drivers/char/drm/radeon_drv.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h index 3b3d9357201c..160c02785b5d 100644 --- a/drivers/char/drm/radeon_drv.h +++ b/drivers/char/drm/radeon_drv.h | |||
@@ -188,7 +188,7 @@ struct mem_block { | |||
188 | struct mem_block *prev; | 188 | struct mem_block *prev; |
189 | int start; | 189 | int start; |
190 | int size; | 190 | int size; |
191 | DRMFILE filp; /* 0: free, -1: heap, other: real files */ | 191 | struct drm_file *file_priv; /* NULL: free, -1: heap, other: real files */ |
192 | }; | 192 | }; |
193 | 193 | ||
194 | struct radeon_surface { | 194 | struct radeon_surface { |
@@ -203,7 +203,7 @@ struct radeon_virt_surface { | |||
203 | u32 lower; | 203 | u32 lower; |
204 | u32 upper; | 204 | u32 upper; |
205 | u32 flags; | 205 | u32 flags; |
206 | DRMFILE filp; | 206 | struct drm_file *file_priv; |
207 | }; | 207 | }; |
208 | 208 | ||
209 | typedef struct drm_radeon_private { | 209 | typedef struct drm_radeon_private { |
@@ -351,7 +351,8 @@ extern int radeon_mem_alloc(DRM_IOCTL_ARGS); | |||
351 | extern int radeon_mem_free(DRM_IOCTL_ARGS); | 351 | extern int radeon_mem_free(DRM_IOCTL_ARGS); |
352 | extern int radeon_mem_init_heap(DRM_IOCTL_ARGS); | 352 | extern int radeon_mem_init_heap(DRM_IOCTL_ARGS); |
353 | extern void radeon_mem_takedown(struct mem_block **heap); | 353 | extern void radeon_mem_takedown(struct mem_block **heap); |
354 | extern void radeon_mem_release(DRMFILE filp, struct mem_block *heap); | 354 | extern void radeon_mem_release(struct drm_file *file_priv, |
355 | struct mem_block *heap); | ||
355 | 356 | ||
356 | /* radeon_irq.c */ | 357 | /* radeon_irq.c */ |
357 | extern int radeon_irq_emit(DRM_IOCTL_ARGS); | 358 | extern int radeon_irq_emit(DRM_IOCTL_ARGS); |
@@ -372,7 +373,7 @@ extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value); | |||
372 | extern int radeon_driver_load(struct drm_device *dev, unsigned long flags); | 373 | extern int radeon_driver_load(struct drm_device *dev, unsigned long flags); |
373 | extern int radeon_driver_unload(struct drm_device *dev); | 374 | extern int radeon_driver_unload(struct drm_device *dev); |
374 | extern int radeon_driver_firstopen(struct drm_device *dev); | 375 | extern int radeon_driver_firstopen(struct drm_device *dev); |
375 | extern void radeon_driver_preclose(struct drm_device * dev, DRMFILE filp); | 376 | extern void radeon_driver_preclose(struct drm_device * dev, struct drm_file *file_priv); |
376 | extern void radeon_driver_postclose(struct drm_device * dev, struct drm_file * filp); | 377 | extern void radeon_driver_postclose(struct drm_device * dev, struct drm_file * filp); |
377 | extern void radeon_driver_lastclose(struct drm_device * dev); | 378 | extern void radeon_driver_lastclose(struct drm_device * dev); |
378 | extern int radeon_driver_open(struct drm_device * dev, struct drm_file * filp_priv); | 379 | extern int radeon_driver_open(struct drm_device * dev, struct drm_file * filp_priv); |
@@ -382,8 +383,8 @@ extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, | |||
382 | /* r300_cmdbuf.c */ | 383 | /* r300_cmdbuf.c */ |
383 | extern void r300_init_reg_flags(void); | 384 | extern void r300_init_reg_flags(void); |
384 | 385 | ||
385 | extern int r300_do_cp_cmdbuf(struct drm_device * dev, DRMFILE filp, | 386 | extern int r300_do_cp_cmdbuf(struct drm_device * dev, |
386 | struct drm_file * filp_priv, | 387 | struct drm_file *file_priv, |
387 | drm_radeon_kcmd_buffer_t * cmdbuf); | 388 | drm_radeon_kcmd_buffer_t * cmdbuf); |
388 | 389 | ||
389 | /* Flags for stats.boxes | 390 | /* Flags for stats.boxes |