diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ioc32.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ioc32.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c index a1bf11de308a..48b7cea31e08 100644 --- a/drivers/gpu/drm/radeon/radeon_ioc32.c +++ b/drivers/gpu/drm/radeon/radeon_ioc32.c | |||
@@ -92,8 +92,7 @@ static int compat_radeon_cp_init(struct file *file, unsigned int cmd, | |||
92 | &init->gart_textures_offset)) | 92 | &init->gart_textures_offset)) |
93 | return -EFAULT; | 93 | return -EFAULT; |
94 | 94 | ||
95 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 95 | return drm_ioctl(file, DRM_IOCTL_RADEON_CP_INIT, (unsigned long)init); |
96 | DRM_IOCTL_RADEON_CP_INIT, (unsigned long)init); | ||
97 | } | 96 | } |
98 | 97 | ||
99 | typedef struct drm_radeon_clear32 { | 98 | typedef struct drm_radeon_clear32 { |
@@ -125,8 +124,7 @@ static int compat_radeon_cp_clear(struct file *file, unsigned int cmd, | |||
125 | &clr->depth_boxes)) | 124 | &clr->depth_boxes)) |
126 | return -EFAULT; | 125 | return -EFAULT; |
127 | 126 | ||
128 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 127 | return drm_ioctl(file, DRM_IOCTL_RADEON_CLEAR, (unsigned long)clr); |
129 | DRM_IOCTL_RADEON_CLEAR, (unsigned long)clr); | ||
130 | } | 128 | } |
131 | 129 | ||
132 | typedef struct drm_radeon_stipple32 { | 130 | typedef struct drm_radeon_stipple32 { |
@@ -149,8 +147,7 @@ static int compat_radeon_cp_stipple(struct file *file, unsigned int cmd, | |||
149 | &request->mask)) | 147 | &request->mask)) |
150 | return -EFAULT; | 148 | return -EFAULT; |
151 | 149 | ||
152 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 150 | return drm_ioctl(file, DRM_IOCTL_RADEON_STIPPLE, (unsigned long)request); |
153 | DRM_IOCTL_RADEON_STIPPLE, (unsigned long)request); | ||
154 | } | 151 | } |
155 | 152 | ||
156 | typedef struct drm_radeon_tex_image32 { | 153 | typedef struct drm_radeon_tex_image32 { |
@@ -204,8 +201,7 @@ static int compat_radeon_cp_texture(struct file *file, unsigned int cmd, | |||
204 | &image->data)) | 201 | &image->data)) |
205 | return -EFAULT; | 202 | return -EFAULT; |
206 | 203 | ||
207 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 204 | return drm_ioctl(file, DRM_IOCTL_RADEON_TEXTURE, (unsigned long)request); |
208 | DRM_IOCTL_RADEON_TEXTURE, (unsigned long)request); | ||
209 | } | 205 | } |
210 | 206 | ||
211 | typedef struct drm_radeon_vertex2_32 { | 207 | typedef struct drm_radeon_vertex2_32 { |
@@ -238,8 +234,7 @@ static int compat_radeon_cp_vertex2(struct file *file, unsigned int cmd, | |||
238 | &request->prim)) | 234 | &request->prim)) |
239 | return -EFAULT; | 235 | return -EFAULT; |
240 | 236 | ||
241 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 237 | return drm_ioctl(file, DRM_IOCTL_RADEON_VERTEX2, (unsigned long)request); |
242 | DRM_IOCTL_RADEON_VERTEX2, (unsigned long)request); | ||
243 | } | 238 | } |
244 | 239 | ||
245 | typedef struct drm_radeon_cmd_buffer32 { | 240 | typedef struct drm_radeon_cmd_buffer32 { |
@@ -268,8 +263,7 @@ static int compat_radeon_cp_cmdbuf(struct file *file, unsigned int cmd, | |||
268 | &request->boxes)) | 263 | &request->boxes)) |
269 | return -EFAULT; | 264 | return -EFAULT; |
270 | 265 | ||
271 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 266 | return drm_ioctl(file, DRM_IOCTL_RADEON_CMDBUF, (unsigned long)request); |
272 | DRM_IOCTL_RADEON_CMDBUF, (unsigned long)request); | ||
273 | } | 267 | } |
274 | 268 | ||
275 | typedef struct drm_radeon_getparam32 { | 269 | typedef struct drm_radeon_getparam32 { |
@@ -293,8 +287,7 @@ static int compat_radeon_cp_getparam(struct file *file, unsigned int cmd, | |||
293 | &request->value)) | 287 | &request->value)) |
294 | return -EFAULT; | 288 | return -EFAULT; |
295 | 289 | ||
296 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 290 | return drm_ioctl(file, DRM_IOCTL_RADEON_GETPARAM, (unsigned long)request); |
297 | DRM_IOCTL_RADEON_GETPARAM, (unsigned long)request); | ||
298 | } | 291 | } |
299 | 292 | ||
300 | typedef struct drm_radeon_mem_alloc32 { | 293 | typedef struct drm_radeon_mem_alloc32 { |
@@ -322,8 +315,7 @@ static int compat_radeon_mem_alloc(struct file *file, unsigned int cmd, | |||
322 | &request->region_offset)) | 315 | &request->region_offset)) |
323 | return -EFAULT; | 316 | return -EFAULT; |
324 | 317 | ||
325 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 318 | return drm_ioctl(file, DRM_IOCTL_RADEON_ALLOC, (unsigned long)request); |
326 | DRM_IOCTL_RADEON_ALLOC, (unsigned long)request); | ||
327 | } | 319 | } |
328 | 320 | ||
329 | typedef struct drm_radeon_irq_emit32 { | 321 | typedef struct drm_radeon_irq_emit32 { |
@@ -345,8 +337,7 @@ static int compat_radeon_irq_emit(struct file *file, unsigned int cmd, | |||
345 | &request->irq_seq)) | 337 | &request->irq_seq)) |
346 | return -EFAULT; | 338 | return -EFAULT; |
347 | 339 | ||
348 | return drm_ioctl(file->f_path.dentry->d_inode, file, | 340 | return drm_ioctl(file, DRM_IOCTL_RADEON_IRQ_EMIT, (unsigned long)request); |
349 | DRM_IOCTL_RADEON_IRQ_EMIT, (unsigned long)request); | ||
350 | } | 341 | } |
351 | 342 | ||
352 | /* The two 64-bit arches where alignof(u64)==4 in 32-bit code */ | 343 | /* The two 64-bit arches where alignof(u64)==4 in 32-bit code */ |
@@ -372,8 +363,7 @@ static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd, | |||
372 | &request->value)) | 363 | &request->value)) |
373 | return -EFAULT; | 364 | return -EFAULT; |
374 | 365 | ||
375 | return drm_ioctl(file->f_dentry->d_inode, file, | 366 | return drm_ioctl(file, DRM_IOCTL_RADEON_SETPARAM, (unsigned long) request); |
376 | DRM_IOCTL_RADEON_SETPARAM, (unsigned long) request); | ||
377 | } | 367 | } |
378 | #else | 368 | #else |
379 | #define compat_radeon_cp_setparam NULL | 369 | #define compat_radeon_cp_setparam NULL |
@@ -413,12 +403,10 @@ long radeon_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
413 | if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) | 403 | if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) |
414 | fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; | 404 | fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; |
415 | 405 | ||
416 | lock_kernel(); /* XXX for now */ | ||
417 | if (fn != NULL) | 406 | if (fn != NULL) |
418 | ret = (*fn) (filp, cmd, arg); | 407 | ret = (*fn) (filp, cmd, arg); |
419 | else | 408 | else |
420 | ret = drm_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg); | 409 | ret = drm_ioctl(filp, cmd, arg); |
421 | unlock_kernel(); | ||
422 | 410 | ||
423 | return ret; | 411 | return ret; |
424 | } | 412 | } |
@@ -431,9 +419,7 @@ long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long | |||
431 | if (nr < DRM_COMMAND_BASE) | 419 | if (nr < DRM_COMMAND_BASE) |
432 | return drm_compat_ioctl(filp, cmd, arg); | 420 | return drm_compat_ioctl(filp, cmd, arg); |
433 | 421 | ||
434 | lock_kernel(); /* XXX for now */ | 422 | ret = drm_ioctl(filp, cmd, arg); |
435 | ret = drm_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg); | ||
436 | unlock_kernel(); | ||
437 | 423 | ||
438 | return ret; | 424 | return ret; |
439 | } | 425 | } |