aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_drv.h
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/radeon_drv.h
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/radeon_drv.h')
-rw-r--r--drivers/char/drm/radeon_drv.h13
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
194struct radeon_surface { 194struct 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
209typedef struct drm_radeon_private { 209typedef struct drm_radeon_private {
@@ -351,7 +351,8 @@ extern int radeon_mem_alloc(DRM_IOCTL_ARGS);
351extern int radeon_mem_free(DRM_IOCTL_ARGS); 351extern int radeon_mem_free(DRM_IOCTL_ARGS);
352extern int radeon_mem_init_heap(DRM_IOCTL_ARGS); 352extern int radeon_mem_init_heap(DRM_IOCTL_ARGS);
353extern void radeon_mem_takedown(struct mem_block **heap); 353extern void radeon_mem_takedown(struct mem_block **heap);
354extern void radeon_mem_release(DRMFILE filp, struct mem_block *heap); 354extern void radeon_mem_release(struct drm_file *file_priv,
355 struct mem_block *heap);
355 356
356 /* radeon_irq.c */ 357 /* radeon_irq.c */
357extern int radeon_irq_emit(DRM_IOCTL_ARGS); 358extern int radeon_irq_emit(DRM_IOCTL_ARGS);
@@ -372,7 +373,7 @@ extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value);
372extern int radeon_driver_load(struct drm_device *dev, unsigned long flags); 373extern int radeon_driver_load(struct drm_device *dev, unsigned long flags);
373extern int radeon_driver_unload(struct drm_device *dev); 374extern int radeon_driver_unload(struct drm_device *dev);
374extern int radeon_driver_firstopen(struct drm_device *dev); 375extern int radeon_driver_firstopen(struct drm_device *dev);
375extern void radeon_driver_preclose(struct drm_device * dev, DRMFILE filp); 376extern void radeon_driver_preclose(struct drm_device * dev, struct drm_file *file_priv);
376extern void radeon_driver_postclose(struct drm_device * dev, struct drm_file * filp); 377extern void radeon_driver_postclose(struct drm_device * dev, struct drm_file * filp);
377extern void radeon_driver_lastclose(struct drm_device * dev); 378extern void radeon_driver_lastclose(struct drm_device * dev);
378extern int radeon_driver_open(struct drm_device * dev, struct drm_file * filp_priv); 379extern 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 */
383extern void r300_init_reg_flags(void); 384extern void r300_init_reg_flags(void);
384 385
385extern int r300_do_cp_cmdbuf(struct drm_device * dev, DRMFILE filp, 386extern 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