diff options
author | Eric Anholt <eric@anholt.net> | 2007-09-02 22:06:45 -0400 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-14 20:38:20 -0400 |
commit | c153f45f9b7e30289157bba3ff5682291df16caa (patch) | |
tree | 33f21e1ebd83ec548751f3d490afe6230ab99972 /drivers/char/drm/radeon_irq.c | |
parent | b589ee5943a9610ebaea6e4e3433f2ae4d812b0b (diff) |
drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to t
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures. This also means that XFree86 4.2.0 support for i810 DR
is lost.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/radeon_irq.c')
-rw-r--r-- | drivers/char/drm/radeon_irq.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c index 173cb06bb294..f89e57665b64 100644 --- a/drivers/char/drm/radeon_irq.c +++ b/drivers/char/drm/radeon_irq.c | |||
@@ -196,11 +196,10 @@ int radeon_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence) | |||
196 | 196 | ||
197 | /* Needs the lock as it touches the ring. | 197 | /* Needs the lock as it touches the ring. |
198 | */ | 198 | */ |
199 | int radeon_irq_emit(DRM_IOCTL_ARGS) | 199 | int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file *file_priv) |
200 | { | 200 | { |
201 | DRM_DEVICE; | ||
202 | drm_radeon_private_t *dev_priv = dev->dev_private; | 201 | drm_radeon_private_t *dev_priv = dev->dev_private; |
203 | drm_radeon_irq_emit_t emit; | 202 | drm_radeon_irq_emit_t *emit = data; |
204 | int result; | 203 | int result; |
205 | 204 | ||
206 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 205 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
@@ -210,12 +209,9 @@ int radeon_irq_emit(DRM_IOCTL_ARGS) | |||
210 | return -EINVAL; | 209 | return -EINVAL; |
211 | } | 210 | } |
212 | 211 | ||
213 | DRM_COPY_FROM_USER_IOCTL(emit, (drm_radeon_irq_emit_t __user *) data, | ||
214 | sizeof(emit)); | ||
215 | |||
216 | result = radeon_emit_irq(dev); | 212 | result = radeon_emit_irq(dev); |
217 | 213 | ||
218 | if (DRM_COPY_TO_USER(emit.irq_seq, &result, sizeof(int))) { | 214 | if (DRM_COPY_TO_USER(emit->irq_seq, &result, sizeof(int))) { |
219 | DRM_ERROR("copy_to_user\n"); | 215 | DRM_ERROR("copy_to_user\n"); |
220 | return -EFAULT; | 216 | return -EFAULT; |
221 | } | 217 | } |
@@ -225,21 +221,17 @@ int radeon_irq_emit(DRM_IOCTL_ARGS) | |||
225 | 221 | ||
226 | /* Doesn't need the hardware lock. | 222 | /* Doesn't need the hardware lock. |
227 | */ | 223 | */ |
228 | int radeon_irq_wait(DRM_IOCTL_ARGS) | 224 | int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_priv) |
229 | { | 225 | { |
230 | DRM_DEVICE; | ||
231 | drm_radeon_private_t *dev_priv = dev->dev_private; | 226 | drm_radeon_private_t *dev_priv = dev->dev_private; |
232 | drm_radeon_irq_wait_t irqwait; | 227 | drm_radeon_irq_wait_t *irqwait = data; |
233 | 228 | ||
234 | if (!dev_priv) { | 229 | if (!dev_priv) { |
235 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | 230 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); |
236 | return -EINVAL; | 231 | return -EINVAL; |
237 | } | 232 | } |
238 | 233 | ||
239 | DRM_COPY_FROM_USER_IOCTL(irqwait, (drm_radeon_irq_wait_t __user *) data, | 234 | return radeon_wait_irq(dev, irqwait->irq_seq); |
240 | sizeof(irqwait)); | ||
241 | |||
242 | return radeon_wait_irq(dev, irqwait.irq_seq); | ||
243 | } | 235 | } |
244 | 236 | ||
245 | static void radeon_enable_interrupt(struct drm_device *dev) | 237 | static void radeon_enable_interrupt(struct drm_device *dev) |