diff options
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) |