Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54439
b: refs/heads/master
c: 99da6d8
h: refs/heads/master
i:
  54437: 9f37778
  54435: cf79609
  54431: b6a936d
v: v3
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Mar 18, 2007
1 parent 4c83365 commit c7f57dd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6244270ef62203e057191bf85489e2ff91cc0e60
refs/heads/master: 99da6d861c659bb1a961b70f50fad268b9ed5a5f
4 changes: 3 additions & 1 deletion trunk/drivers/char/drm/drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,13 @@ typedef struct drm_set_version {

/**
* Device specific ioctls should only be in their respective headers
* The device specific ioctl range is from 0x40 to 0x79.
* The device specific ioctl range is from 0x40 to 0x99.
* Generic IOCTLS restart at 0xA0.
*
* \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
* drmCommandReadWrite().
*/
#define DRM_COMMAND_BASE 0x40
#define DRM_COMMAND_END 0xA0

#endif
9 changes: 6 additions & 3 deletions trunk/drivers/char/drm/drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,14 @@ int drm_ioctl(struct inode *inode, struct file *filp,
(long)old_encode_dev(priv->head->device),
priv->authenticated);

if (nr < DRIVER_IOCTL_COUNT)
ioctl = &drm_ioctls[nr];
else if ((nr >= DRM_COMMAND_BASE)
if ((nr >= DRIVER_IOCTL_COUNT) &&
((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END)))
goto err_i1;
if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END)
&& (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE))
ioctl = &drm_ioctls[nr];
else
goto err_i1;

Expand Down

0 comments on commit c7f57dd

Please sign in to comment.