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/i830_irq.c | |
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/i830_irq.c')
-rw-r--r-- | drivers/char/drm/i830_irq.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/char/drm/i830_irq.c b/drivers/char/drm/i830_irq.c index a1b5c63c3c3e..9c28939e2db3 100644 --- a/drivers/char/drm/i830_irq.c +++ b/drivers/char/drm/i830_irq.c | |||
@@ -114,16 +114,15 @@ static int i830_wait_irq(struct drm_device * dev, int irq_nr) | |||
114 | 114 | ||
115 | /* Needs the lock as it touches the ring. | 115 | /* Needs the lock as it touches the ring. |
116 | */ | 116 | */ |
117 | int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd, | 117 | int i830_irq_emit(struct inode *inode, struct drm_file *file_priv, |
118 | unsigned long arg) | 118 | unsigned int cmd, unsigned long arg) |
119 | { | 119 | { |
120 | struct drm_file *priv = filp->private_data; | 120 | struct drm_device *dev = file_priv->head->dev; |
121 | struct drm_device *dev = priv->head->dev; | ||
122 | drm_i830_private_t *dev_priv = dev->dev_private; | 121 | drm_i830_private_t *dev_priv = dev->dev_private; |
123 | drm_i830_irq_emit_t emit; | 122 | drm_i830_irq_emit_t emit; |
124 | int result; | 123 | int result; |
125 | 124 | ||
126 | LOCK_TEST_WITH_RETURN(dev, filp); | 125 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
127 | 126 | ||
128 | if (!dev_priv) { | 127 | if (!dev_priv) { |
129 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | 128 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); |
@@ -146,11 +145,10 @@ int i830_irq_emit(struct inode *inode, struct file *filp, unsigned int cmd, | |||
146 | 145 | ||
147 | /* Doesn't need the hardware lock. | 146 | /* Doesn't need the hardware lock. |
148 | */ | 147 | */ |
149 | int i830_irq_wait(struct inode *inode, struct file *filp, unsigned int cmd, | 148 | int i830_irq_wait(struct inode *inode, struct drm_file *file_priv, |
150 | unsigned long arg) | 149 | unsigned int cmd, unsigned long arg) |
151 | { | 150 | { |
152 | struct drm_file *priv = filp->private_data; | 151 | struct drm_device *dev = file_priv->head->dev; |
153 | struct drm_device *dev = priv->head->dev; | ||
154 | drm_i830_private_t *dev_priv = dev->dev_private; | 152 | drm_i830_private_t *dev_priv = dev->dev_private; |
155 | drm_i830_irq_wait_t irqwait; | 153 | drm_i830_irq_wait_t irqwait; |
156 | 154 | ||